
var BT=(function x(){})[-5]=='x'?'FF3':(function x(){})[-6]=='x'?'FF2':/a/[-1]=='a'?'FF':'\v'=='v'?'IE':/a/.__proto__=='//'?'Saf':/s/.test(/a/.toString)?'Chr':/^function \(/.test([].sort)?'Op':'Unknown';BT=(navigator.userAgent.indexOf('Firefox')!=-1)?'FF':BT;BT=(navigator.userAgent.indexOf('Safari')!=-1)?'Sa':BT;BT=(navigator.userAgent.indexOf('Chrome')!=-1)?'Chr':BT;var ISSA=BT=="Sa"?true:false;var ISFF=(BT=='FF'||BT=='FF2'||BT=='FF3')?true:false;var ISCHR=(BT=='Chr')?true:false;var MWB=/http:\/\/exp/g.test(document.URL)?true:false;var MW=(MWB)?"app":"web";var ISIE=(navigator.userAgent.indexOf('MSIE')!=-1)?true:false;var ISOSWIN=(navigator.userAgent.indexOf('Windows')!=-1)?true:false;var ISOSMAC=(navigator.userAgent.indexOf('Mac')!=-1)?true:false;var ISAX=/http:\/\/ch\.gomtv/g.test(document.URL)||/http:\/\/movie\.gomtv/g.test(document.URL)||/http:\/\/drama\.gomtv/g.test(document.URL)?true:false
ISAX=/http:\/\/movie\.gomtv\.com\/index/g.test(document.URL)||/http:\/\/drama\.gomtv\.com\/index/g.test(document.URL)?false:ISAX;ISAX=(document.URL=="http://movie.gomtv.com/")?false:ISAX;ISAX=(document.URL=="http://drama.gomtv.com/")?false:ISAX;onerror=function(){return;}
var DEFN={};DEFN.Browser=(navigator.userAgent.indexOf('MSIE')!=-1)?'MSIE':DEFN.Browser;DEFN.Browser=(navigator.userAgent.indexOf('Firefox')!=-1)?'Firefox':DEFN.Browser;DEFN.Browser=(navigator.userAgent.indexOf('Safari')!=-1)?'Safari':DEFN.Browser;DEFN.Browser=(navigator.userAgent.indexOf('Chrome')!=-1)?'Chrome':DEFN.Browser;DEFN.Browser=(navigator.userAgent.indexOf('Opera')!=-1)?'Opera':DEFN.Browser;DEFN.OS=(navigator.userAgent.indexOf('Windows')!=-1)?"Windows":DEFN.OS;DEFN.OS=(navigator.userAgent.indexOf('Mac')!=-1)?"Mac":DEFN.OS;DEFN.OS=(navigator.userAgent.indexOf('iPhone')!=-1)?"iPhone":DEFN.OS;DEFN.OS=(navigator.userAgent.indexOf('iPod')!=-1)?"iPod":DEFN.OS;if(DEFN.Browser=='MSIE')
{DEFN.Browser=DEFN.Browser+jQuery.browser.version;}
var G={documentGid:null,request:null,setDocumentGid:function(id){this.documentGid=document.getElementById(id);return this.documentGid;},getRequest:function(){if(BT!='IE')
{this.request=new XMLHttpRequest();}
else
{try{this.request=new ActiveXObject("Msxml2.XMLHTTP");}catch(failed){try{this.request=new ActiveXObject("Microsoft.XMLHTTP");}catch(failed){this.request=null;}}}
return this.request;},$:function(id){if(/^#/.test(id))
{var tmpId=id.replace(/#/,'');this.setDocumentGid(tmpId);return this.documentGid;}
else
{this.setDocumentGid(id);return this;}},B:document.body,insertBefore:function(val){this.documentGid.insertBefore(val);return this;},val:function(id){if(id)this.setDocumentGid(id);return this.documentGid.value;},style:function(obj){if(obj.id){this.setDocumentGid(obj.id);for(var i in obj){if(i!='id')this.documentGid.style[i]=obj[i];}}
else
{for(var i in obj){this.documentGid.style[i]=obj[i];}}
return this;},html:function(obj){if(obj.id)this.setDocumentGid(obj.id);this.documentGid.innerHTML=obj.content;return this;},href:function(url){document.location.href=url;},replace:function(url){document.location.replace(url);},ajaxRequest:function(obj){var tmpReq=this.getRequest();if(tmpReq==null)
{alert("this broswer not suported ajax");return;}
var completeFunction=obj.oncomplete;var thisVal=this;try
{tmpReq.onload=function(){switch(tmpReq.readyState)
{case 0:case 1:case 2:case 3:break;case 4:if(tmpReq.status==200)
{return completeFunction(tmpReq);}
else
{}
break;}}}
catch(e)
{tmpReq.onreadystatechange=function(){switch(tmpReq.readyState)
{case 0:case 1:case 2:case 3:break;case 4:if(tmpReq.status==200)
{return completeFunction(tmpReq);}
else
{}
break;}}}
obj.method=(obj.method==null||!obj.method)?'get':obj.method;obj.async=(obj.async==false||obj.async==true)?obj.async:true;obj.param=obj.param?obj.param:"";if(obj.url)
{try
{tmpReq.open(obj.method,obj.url,obj.async);tmpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");tmpReq.send(obj.param);}
catch(crossDomain)
{return;}}},ajaxUpdate:function(obj){var thisValue=this;obj.oncomplete=function(request){thisValue.html({content:request.responseText});}
this.ajaxRequest(obj);}}
Flash=function(obj){this.objects="";this.embed="";this.instance=null;this.tag=obj;if(typeof obj=="object")
{this.tag.id=this.tag.name?this.tag.name:this.tag.id;this.tag.name=this.tag.id?this.tag.id:this.tag.name;this.tag.allowScriptAccess=this.tag.allowScriptAccess?this.tag.allowScriptAccess:"always";this.tag.allowFullScreen=this.tag.allowFullScreen?this.tag.allowFullScreen:"false";this.tag.quality=this.tag.quality?this.tag.quality:"high";this.tag.width=this.tag.width?this.tag.width:0;this.tag.height=this.tag.height?this.tag.height:0;this.tag.movie=this.tag.src?this.tag.src:this.tag.movie;this.tag.src=this.tag.movie?this.tag.movie:this.tag.src;this.tag.target=this.tag.target?this.tag.target:null;this.objects="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'  type='application/x-shockwave-flash' width='"+this.tag.width+"' height='"+this.tag.height+"' id='"+this.tag.id+"'>\n";this.embed="<embed type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' ";for(var key in this.tag)
{if(this.tag[key]&&key!='target')
{if(key!='src'&&key!='width'&&key!='height'&&key!='id'&&key!='name')
this.objects+="<param name='"+key+"' value = '"+this.tag[key]+"'>\n";if(key!='movie'&&key!='id')
this.embed+=key+" = '"+this.tag[key]+"' ";}}
this.embed+=" /></object>";this.instance=(BT=='IE')?window[this.tag.id]:document[this.tag.id];if(this.tag.target!=null)
{alert(this.objects+this.embed);var newElem=document.createElement(this.objects+this.embed);G.$('#'+this.tag.target).insertBefore(newElem);}
else
{document.write(this.objects+this.embed);}}
else
{return;}}
Flash.prototype={resize:function(obj)
{this.instance.style.width=(obj.width)?obj.width:this.tag.width;this.instance.style.height=(obj.height)?obj.height:this.tag.height;}}
var GCookie={get:function(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;var j=0;while(i<clen){j=i+alen;if(document.cookie.substring(i,j)==arg)
return this.getCookieVal(j);i=document.cookie.indexOf(" ",i)+1;if(i==0)
break;}
return null;},set:function(obj){this.setCookieVal(obj);},getCookieVal:function(offset){var endstr=document.cookie.indexOf(";",offset);if(endstr==-1){endstr=document.cookie.length;}
return unescape(document.cookie.substring(offset,endstr));},setCookieVal:function(obj){if(obj.expire){if(obj.expire.day||obj.expire.hour||obj.expire.minute)
{var date=new Date();if(obj.expire.day)date.setTime(date.getTime()+(obj.expire.day*24*60*60*1000));if(obj.expire.hour)date.setTime(date.getTime()+(obj.expire.hour*60*60*1000));if(obj.expire.minute)date.setTime(date.getTime()+(obj.expire.minute*60*1000));var expires="; expires="+date.toGMTString();}
else
{expires="";}}
else
{expires="";}
document.cookie=obj.name+'='+obj.value+expires+'; domain = .gomtv.com; path=/;';}};Gox=function(obj){this.onlyIE=(obj.onlyIE=='n')?false:true;this.type=obj.type?obj.type:null;this.ajaxUrl=obj.ajaxUrl?obj.ajaxUrl:null;this.parameter="&";this.callBack=obj.callBack?obj.callBack:function(){return;};this.errorCallBack=obj.errorCallBack?obj.errorCallBack:false;obj.isweb=(MW=='app')?0:1;obj.isnav=obj.isnav?obj.isnav:1;obj.navurl=obj.navurl?obj.navurl:"";obj.source=obj.source?obj.source:"";this.dsi=obj.dsi?obj.dsi:GCookie.get('dsi');this.parameter+="dsi="+this.dsi+"&";this.goxUrl=[];this.errorMsg=[];obj.os=DEFN.OS;obj.browser=DEFN.Browser;for(var key in obj)
{if(key!='type'&&key!='ajaxUrl'&&key!='callBack'&&key!='dsi')
{if(obj.key instanceof Array)
{for(var i in obj[key])
{obj[key]+=obj[key][i]+",";}}
this.addItem(key,obj[key]);}}
this.parameter=this.parameter.replace(/&/g,"|||||");if(this.onlyIE){if(BT=='IE'){this.sendParam();}}
else
{this.sendParam();}}
Gox.prototype={addItem:function(key,value){this.parameter+=key+'='+value+'&';},sendParam:function(){this.async=false;thisValue=this;G.ajaxRequest({url:this.ajaxUrl,param:"param="+this.parameter+'&property='+this.type,method:'post',async:this.async,oncomplete:function(req){try
{var tmpRtn=JSON.parse(req.responseText);thisValue.callBack(tmpRtn);}
catch(e1)
{return;}}});}}
Play=function(obj){this.hiddenlyr=obj.hiddenlyr?obj.hiddenlyr:"hiddenlyr";this.parameter="";this.baseUrl=obj.baseUrl?obj.baseUrl:"http://tv.gomtv.com/cgi-bin/launcher/";this.type=obj.type?obj.type:null;this.series=obj.series?obj.series:false;if(this.series)
{this.launcher=this.baseUrl+"series_set.cgi";switch(this.type){case'channel':this.type=10000;break;case'movie':this.type=100;break;case'drama':this.type=110;break;case'clip':this.type=200;break;case'news':this.type=300;break;case'live':this.type=500;break;}}
else
{if(this.type!='null')
this.launcher=this.baseUrl+"launcher_"+this.type+".cgi";else
alert('play type not setted');}
this.callBack=obj.callBack?obj.callBack:function(){return;};obj.isweb=(MW=='app')?0:1;obj.isnav=obj.isnav?obj.isnav:0;obj.navurl=obj.navurl?obj.navurl:"";obj.source=obj.source?obj.source:"";for(var key in obj)
{if(key!='type'&&key!='callBack')
{if(obj.key instanceof Array)
{for(var i in obj[key])
{obj[key]+=obj[key][i]+",";}}
this.addItem(key,obj[key]);}}
if(this.series){this.addItem('type',this.type);}
this.parameter=this.parameter.substring(0,this.parameter.length-1);if(ISOSMAC)
{if(DEF.ISSA)
{}
else
{alert("»ç¿ëÁßÀÎ ºê¶ó¿ìÀú¿¡¼­´Â ÇØ´ç ¼­ºñ½º¸¦ Áö¿øÇÏÁö ¾Ê½À´Ï´Ù.\nÁö¿ø ºê¶ó¿ìÀú: Safari");return false;}}
if(!ISIE)
{HTMLElement.prototype.insertAdjacentElement=function(where,parsedNode){switch(where){case'beforeBegin':this.parentNode.insertBefore(parsedNode,this)
break;case'afterBegin':this.insertBefore(parsedNode,this.firstChild);break;case'beforeEnd':this.appendChild(parsedNode);break;case'afterEnd':if(this.nextSibling)this.parentNode.insertBefore(parsedNode,this.nextSibling);else this.parentNode.appendChild(parsedNode);break;}}
HTMLElement.prototype.insertAdjacentHTML=function(where,htmlStr){var r=this.ownerDocument.createRange();r.setStartBefore(this);var parsedHTML=r.createContextualFragment(htmlStr);this.insertAdjacentElement(where,parsedHTML)}
HTMLElement.prototype.insertAdjacentText=function(where,txtStr){var parsedText=document.createTextNode(txtStr)
this.insertAdjacentElement(where,parsedText)}}
var str="<iframe id='runframe' name='runframe' width='0' height='0' frameborder='0'></iframe>";document.body.insertAdjacentHTML('beforeEnd',str);document.getElementById('runframe').src=this.launcher+"?"+this.parameter;}
Play.prototype={addItem:function(key,value){this.parameter+=key+'='+value+'&';}}
BookMark=function(obj){this.ajaxUrl=obj.ajaxUrl?obj.ajaxUrl:null;this.param="";for(var key in obj)
{if(key!='ajaxUrl'&&key!='oncomplete')
this.param+=key+"="+obj[key]+"&";}}
BookMark.prototype={set:function(obj){this.ajaxUrl=obj.ajaxUrl?obj.ajaxUrl:this.ajaxUrl;for(var key in obj)
{if(key!='ajaxUrl'&&key!='oncomplete')
this.param+=key+"="+obj[key]+"&";}
this.param=this.param.substring(0,this.param.length-1);if(this.ajaxUrl!=null)
{G.ajaxRequest({url:this.ajaxUrl,param:this.param,method:"post",oncomplete:obj.oncomplete});}
else
{alert("url not setted");}
this.param="";},del:function(obj){this.ajaxUrl=obj.ajaxUrl?obj.ajaxUrl:this.ajaxUrl;G.ajaxRequest({url:this.ajaxUrl,param:"mode=delete&intseq="+obj.intseq,method:"post",oncomplete:obj.oncomplete});},get:function(obj){return;}}
var intGomtvxVersion='1.0.0.3';var strPluginVersion='?version='+intGomtvxVersion+'&comfile=20100423';noneGomtvPlayer=function()
{if(document.getElementById('pluginInstall'))
{jQuery.blockUI({'message':jQuery('#pluginInstall')});}
else
{if(confirm("°õTV ÇÃ·¯±×ÀÎÀ» ¼³Ä¡ÇÏ½Ã¸é °õÇÃ·¹ÀÌ¾î·Î ¿µ»óÀ» ½ÃÃ»ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.\n \"È®ÀÎ\"À» ´©¸£½Ã¸é °õTV ÇÃ·¯±×ÀÎÀÌ ´Ù¿î·Îµå µË´Ï´Ù."))
{document.location.href='http://app.gomtv.com/gomtv/GOMTVXNIESETUP.EXE'+strPluginVersion;}}}
noneGomtvPlugin=function()
{if(document.getElementById('playerUpdate'))
{jQuery.blockUI({'message':jQuery('#playerUpdate')});}
else
{if(confirm("°õTVÀÇ ¿øÈ°ÇÑ ½ÃÃ»À» À§ÇØ ¾÷µ¥ÀÌÆ®°¡ ÇÊ¿äÇÕ´Ï´Ù.\n ¾÷µ¥ÀÌÆ®ÇÏ½Ã°Ú½À´Ï±î?"))
{document.location.href='http://app.gomtv.com/gomtv/GOMTVXNIESETUP.EXE'+strPluginVersion;}}}
noneMacGom=function()
{if(document.getElementById('MacGomInstall'))
{jQuery.blockUI({'message':jQuery('#MacGomInstall')});}
else
{if(confirm("ÇöÀç °õTV ¿µ»ó Àç»ýÀ» À§ÇÑ ¼ÒÇÁÆ®¿þ¾î°¡ ¼³Ä¡µÇ¾î ÀÖÁö\n¾Ê½À´Ï´Ù. ¼³Ä¡¸¦ ¿øÇÏ½Ã¸é ½ÂÀÎ(OK) ¹öÆ°À» ´­·¯ÁÖ¼¼¿ä."))
{var rtnurl=escape(document.URL);document.location.href='http://www.gomtv.com/macgom_agreement.gom?rtnurl='+rtnurl;}}}
gsocketInstall=function(){if(G.$('#gsocket')){return;}
else
{var str="<OBJECT ID='gsocket' WIDTH=0 HEIGHT=0 CLASSID='CLSID:7DC79AE8-4C0D-4327-A459-F6F32358462C' codebase='http://app.gomtv.com/gomtv/gomtvx.cab#version=1,0,0,1'></OBJECT>";document.body.insertAdjacentHTML('beforeEnd',str);}}
noneWebPlayerInstall=function(type)
{var newElem=document.createElement("<OBJECT ID='WebCtl' type='application/x-oleobject' CLASSID='CLSID:36E5F486-B4EF-4D21-85E0-C58EBAA81A30' codebase='http://app.gomtv.com/ce/gomtvax/bin/GOMTVAXCSETUP.EXE.CAB#version=1,0,5,27' width = '0' height = '0'><param name='type' value='1' /></OBJECT>");document.body.insertBefore(newElem);AxInstallCheck();}
var axPlayVersion='1.0.7.29';GomtvAX=function(obj){this.width=obj.width?obj.width:'600';this.height=obj.height?obj.height:'380';this.isInstall=false;this.installCheck();this.repImg=obj.repImg?obj.repImg:"http://img.gomtv.com/images/chimg/smm/gomax_no_ie.jpg";this.classId=(BT=='IE'&&this.isInstall)?(obj.id?obj.id:"WebCtl"):null;this.target=obj.target?obj.target:G.B;this.installImg=obj.installImg?obj.installImg:'http://img.gomtv.com/images/openChannel_new/axplayer_install_n2.jpg';this.useNoneImg=(obj.useNoneImg==false)?obj.useNoneImg:true;this.isfreeInstall=(obj.freeInstall)?true:false;this.isBlockInstall=(obj.isBlockInstall)?true:false;}
GomtvAX.prototype={installCheck:function(){if(BT=='IE')
{try
{var nObj=new ActiveXObject("GomTVWeb.WebCtl.1.0.8.30");this.isInstall=nObj?true:false;}
catch(e)
{this.isInstall=false;}
try
{this.getAxVersion=null;}
catch(e)
{this.getAxVersion=null;}}
else
{this.isInstall=false;}},resize:function(obj){this.width=obj.width;this.height=obj.height;},write:function(param){if(BT=='IE')
{try
{if(this.isInstall)
{if(param)
{var newElem=document.createElement("<OBJECT ID='"+this.classId+"' type='application/x-oleobject' CLASSID='CLSID:36E5F486-B4EF-4D21-85E0-C58EBAA81A30' width = '"+this.width+"' height = '"+this.height+"'><param name='type' value='1' />"+param+"</OBJECT>");}
else
{var newElem=document.createElement("<OBJECT ID='"+this.classId+"' type='application/x-oleobject' CLASSID='CLSID:36E5F486-B4EF-4D21-85E0-C58EBAA81A30' width = '"+this.width+"' height = '"+this.height+"'><param name='type' value='1' /></OBJECT>");}
G.$('#'+this.target).insertBefore(newElem);}
else
{return;}}
catch(e1)
{}}
else
{if(this.useNoneImg==false)return;}},init:function(){this.clearUrl();},clearUrl:function(){try
{if(G.$('#'+this.classId)&&this.isInstall){G.$('#'+this.classId).ClearURL();}}
catch(e1)
{}},onStop:function(){alert("stop");},addUrl:function(url){if(G.$('#'+this.classId)&&this.isInstall){G.$('#'+this.classId).AddURL(url);}},addGoxUrl:function(url){try
{if(G.$('#'+this.classId)&&this.isInstall){G.$('#'+this.classId).AddGoxURL(url);}}
catch(e1)
{}},play:function(){try
{if(G.$('#'+this.classId)&&this.isInstall){if(1)
{try{jQuery('#gomax_player_outer').removeClass('wp_off');G.$('#'+this.classId).DirectPlay();}
catch(e){G.$('#'+this.classId).DirectPlay();}}
else
{if(this.isfreeInstall)
{G.$('#'+this.classId).DirectPlay();}
else
{if(this.isBlockInstall)return;try{LOG.setClickLog({'eventid':7061});}
catch(e){}
if(document.getElementById('AxUpdate'))
{jQuery.blockUI({'message':jQuery('#AxUpdate')});}
else
{if(confirm("°õTVÀÇ ¿øÈ°ÇÑ ½ÃÃ»À» À§ÇØ ¾÷µ¥ÀÌÆ®°¡ ÇÊ¿ä ÇÕ´Ï´Ù.\n ¾÷µ¥ÀÌÆ® ÇÏ½Ã°Ú½À´Ï±î?"))
{location.href='http://www.gomtv.com/ieWebplayer_agreement.gom?rtntype=1&rtnurl='+escape(document.URL);return false;}
else
{try{LOG.setClickLog({'eventid':7062});}
catch(e){}}}}}}
else
{if(this.isBlockInstall)return;if(this.isfreeInstall)
{noneWebPlayerInstall();}
else
{try{LOG.setClickLog({'eventid':7061});}
catch(e){}
if(document.getElementById('AxInstall'))
{jQuery.blockUI({'message':jQuery('#AxInstall')});}
else
{if(confirm("°õTV À¥ÇÃ·¹ÀÌ¾î¸¦ ÅëÇØ ½ÃÃ»ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.\n¼³Ä¡ÇÏ½Ã°Ú½À´Ï±î?"))
{location.href='http://www.gomtv.com/ieWebplayer_agreement.gom?rtntype=1&rtnurl='+escape(document.URL);return false;}
else
{try{LOG.setClickLog({'eventid':7062});}
catch(e){}}}}}}
catch(e1)
{if(this.isBlockInstall)return;if(this.isfreeInstall)
{noneWebPlayerInstall();}
else
{if(confirm("°õTV À¥ÇÃ·¹ÀÌ¾î¸¦ ÅëÇØ ½ÃÃ»ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.\n¼³Ä¡ÇÏ½Ã°Ú½À´Ï±î?"))
{location.href='http://www.gomtv.com/ieWebplayer_agreement.gom?rtntype=1&rtnurl='+escape(document.URL);return false;}}}},addAxFace:function(url){try
{if(G.$('#'+this.classId)&&this.isInstall)
{G.$('#'+this.classId).SetAxFace(url);}}
catch(e1)
{}},addFlashAxFace:function(obj){G.$('#'+this.classId).SetFlashFace(obj.swfSrc,obj.xmlSrc);},addFlash:function(obj){var xmls="<SWF x='"+obj.x+"' y='"+obj.y+"' align='"+obj.align+"'><URL>"+obj.swfSrc+"</URL><CMD>"+obj.cmd+"</CMD><PARAM> <![CDATA["+obj.callBack+"]]></PARAM></SWF>";G.$('#'+this.classId).AddFaceFlash(xmls);}}
AxInstallCheck=function()
{if(BT=='IE')
{try
{var nObj=new ActiveXObject("GomTVWeb.WebCtl.1.0.8.30");if(nObj)
{if(1)
{clearTimeout(chktime);document.location.reload();}
else
chktime=setTimeout(AxInstallCheck,100);}
else
{chktime=setTimeout(AxInstallCheck,100);}}
catch(e)
{chktime=setTimeout(AxInstallCheck,100);}}}
QuickList=function(url)
{this.getUrl=url?url:"/common/getQuickListData.gom";this.scrapUrl="";this.qListCnt=GCookie.get("qListCnt")?GCookie.get("qListCnt"):0;this.qListObj=GCookie.get("qListValue")?eval("("+GCookie.get("qListValue")+")"):{type:[],ids0:[],ids1:[],ids2:[],ids3:[],level:[],source:[]};this.qListParam=["type","ids0","ids1","ids2","ids3","level","source"];this.dispStatus=false;this.dispListObj={strtitle:[],imgid:[],type:[],ids0:[],ids1:[],ids2:[],ids3:[],level:[],charge:[],intcateid:[],source:[]}
this.startPos=0;this.viewPerPage=3;this.multiPlay=false;this.playIndex=0;this.playObj={};G.$("qListArea").style({"display":"block"});G.$("qListCntArea").html({"content":this.qListCnt+"°³"});G.$("qListCntArea1024").html({"content":this.qListCnt+"°³"});this.setPos();this.bookMarkUrl="http://ch.gomtv.com/2009/common/ajax/setBookMark.gom";this.scrap=new BookMark({ajaxUrl:this.bookMarkUrl});this.bookMarkIndex=0;this.alertDispStatus=true;}
QuickList.prototype={setBookMarkUrl:function(url)
{this.bookMarkUrl=url?url:this.bookMarkUrl;this.scrap=new BookMark({ajaxUrl:this.bookMarkUrl});},setBookMark:function()
{this.bookMarkNext();},bookMarkNext:function()
{if(this.dispListObj.type.length==0)
{alert("¿µ»óÀ» ¸ÕÀú µî·ÏÇØÁÖ¼¼¿ä");return;}
if(this.bookMarkIndex<this.dispListObj.type.length)
{var tmpObj={};if(this.dispListObj.type[this.bookMarkIndex]=='channel')
{tmpObj={'type':this.dispListObj.type[this.bookMarkIndex],'intpid':this.dispListObj.ids1[this.bookMarkIndex],'intbid':this.dispListObj.ids2[this.bookMarkIndex],'intcateid':this.dispListObj.intcateid[this.bookMarkIndex],'intservicetype':10000}}
else if(this.dispListObj.type[this.bookMarkIndex]=='movie')
{tmpObj={'type':this.dispListObj.type[this.bookMarkIndex],'dispid':this.dispListObj.ids0[this.bookMarkIndex],'intservicetype':200000}}
else if(this.dispListObj.type[this.bookMarkIndex]=='drama')
{tmpObj={'type':this.dispListObj.type[this.bookMarkIndex],'dispid':this.dispListObj.ids0[this.bookMarkIndex],'intservicetype':210000}}
tmpThis=this;tmpObj.oncomplete=function(req){tmpThis.bookMarkNext();}
this.scrap.set(tmpObj);this.bookMarkIndex++;}
else
{alert("Áñ°ÜÃ£±â¿¡ µî·ÏµÇ¾ú½À´Ï´Ù.");this.bookMarkIndex=0;}},setQList:function(obj)
{isDup=false;for(var i=0;i<this.qListCnt;i++)
{if(this.qListObj.ids0[i]==obj.ids0&&this.qListObj.ids1[i]==obj.ids1&&this.qListObj.ids2[i]==obj.ids2)
{isDup=true;continue;}}
if(!isDup)
{if(this.qListCnt<30)
{this.qListObj.type.push(obj.type);this.qListObj.ids0.push(obj.ids0);this.qListObj.ids1.push(obj.ids1);this.qListObj.ids2.push(obj.ids2);this.qListObj.ids3.push(obj.ids3);this.qListObj.level.push(obj.level);this.qListObj.source.push(obj.source);this.qListCnt++;this.cookieSet();G.$("qListCntArea").html({"content":this.qListCnt+"°³"});G.$("qListCntArea1024").html({"content":this.qListCnt+"°³"});}
else
{alert("30°³ ÀÌ»ó µî·ÏÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");}}
else
{alert("ÀÌ¹Ì µî·ÏµÈ ¿µ»óÀÔ´Ï´Ù.");}},cookieSet:function()
{if(this.qListCnt>0&&this.qListCnt)
{var objString="{";for(key in this.qListParam)
{try
{objString+="\""+this.qListParam[key]+"\":[\""+this.qListObj[this.qListParam[key]].join("\",\"")+"\"],";}
catch(e1)
{}}
objString=objString.substr(0,objString.length-1);objString+="}";GCookie.set({name:"qListValue",value:objString,expire:{day:1}});GCookie.set({name:"qListCnt",value:this.qListCnt,expire:{day:1}});}
else
{GCookie.set({name:"qListValue",value:objString,expire:{day:-1}});GCookie.set({name:"qListCnt",value:this.qListCnt,expire:{day:-1}});}
this.afterSetting();},afterSetting:function()
{this.startPos=0;if(this.qListCnt>3)
{if((this.qListCnt%3)==1)
{this.startPos=this.qListCnt-1;}
else if((this.qListCnt%3)==2)
{this.startPos=this.qListCnt-2;}
else
{this.startPos=this.qListCnt-3;}}
this.getListInfo();},closeList:function()
{this.dispStatus=false;G.$("u_quick_all").style({"display":"none"});},openList:function()
{if(GCookie.get("qListValue")&&this.qListCnt>0)
{if(this.dispStatus)
{G.$("u_quick_all").style({"display":"none"});}
else
{G.$("u_quick_all").style({"display":"block"});if(this.dispListObj.type.length>=this.viewPerPage)
{this.dispList();}
else
{this.getListInfo();}}
this.dispStatus=this.dispStatus?false:true;}},getListInfo:function()
{if(GCookie.get("qListValue"))
{var tmpThis=this;G.ajaxRequest({url:this.getUrl,param:"offset=0&limit="+this.qListCnt+"&param="+GCookie.get("qListValue"),method:"post",oncomplete:function(request){var rtnObj=JSON.parse(request.responseText);tmpThis.dispListObj=rtnObj;this.dispStatus=true;tmpThis.dispList();}});}
else
{this.closeList();}},dispList:function()
{var listHtml="";if(this.qListCnt>0)
{for(var i=this.startPos;i<this.startPos+this.viewPerPage;i++)
{if(this.dispListObj.type[i])
{if(this.dispListObj.type[i]=='channel')
{if(ISAX)
{pLink="topPlayAx({'type':'"+this.dispListObj.type[i]+"','chid':'"+this.dispListObj.ids0[i]+"','pid':'"+this.dispListObj.ids1[i]+"','bid':'"+this.dispListObj.ids2[i]+"','level':'"+this.dispListObj.level[i]+"'})";aLink="<a href='http://ch.gomtv.com/2009/frame/view.gom?intchid="+this.dispListObj.ids0[i]+"&intpid="+this.dispListObj.ids1[i]+"&intbid="+this.dispListObj.ids2[i]+"&type=3' onfocus='this.blur();' target='gomFrame' title='"+this.dispListObj.strtitle[i]+"'>";}
else
{pLink="location.href='http://ch.gomtv.com/2009/gate.gom?intchid="+this.dispListObj.ids0[i]+"&intpid="+this.dispListObj.ids1[i]+"&intbid="+this.dispListObj.ids2[i]+"&type=3&auto=1'";aLink="<a href='javascript:;' onclick=\"location.href='http://ch.gomtv.com/2009/gate.gom?intchid="+this.dispListObj.ids0[i]+"&intpid="+this.dispListObj.ids1[i]+"&intbid="+this.dispListObj.ids2[i]+"&type=3'\"  title='"+this.dispListObj.strtitle[i]+"'>";}
dLink="qList.delList("+i+")";}
else if(this.dispListObj.type[i]=='movie'||this.dispListObj.type[i]=='drama')
{if(ISAX)
{pLink="topPlayAx({'type':'"+this.dispListObj.type[i]+"','dispid':'"+this.dispListObj.ids0[i]+"','vodid':'"+this.dispListObj.ids1[i]+"','serv':'"+this.dispListObj.ids2[i]+"','part':'"+this.dispListObj.ids3[i]+"','level':'"+this.dispListObj.level[i]+"'})";aLink="http://"+this.dispListObj.type[i]+".gomtv.com/template/view.gom?dispid="+this.dispListObj.ids0[i];aLink="<a href='http://"+this.dispListObj.type[i]+".gomtv.com/template/view.gom?dispid="+this.dispListObj.ids0[i]+"&auto=1' onfocus='this.blur();' target='gomFrame'  title='"+this.dispListObj.strtitle[i]+"'>";}
else
{pLink="location.href='http://"+this.dispListObj.type[i]+".gomtv.com/gate.gom?dispid="+this.dispListObj.ids0[i]+"'";aLink="<a href='javascript:;' onclick=\"location.href='http://"+this.dispListObj.type[i]+".gomtv.com/gate.gom?dispid="+this.dispListObj.ids0[i]+"&auto=1'\"  title='"+this.dispListObj.strtitle[i]+"'>";}
dLink="qList.delList("+i+")";}
if(this.dispListObj.imgid[i]==0)
{var imgLink="http://img.gomtv.com/images/default/web_116x87_19.gif";}
else
{imgLink="http://chi.gomtv.com/cgi-bin/imgview.cgi?nid="+this.dispListObj.imgid[i]+"&type=1";}
if(this.dispListObj.charge[i]==1)
{imgCharge="<div class='charge' style='padding-top:36'><img src='http://img.gomtv.com/images/quicklist/btn_quick_charge.gif' alt='À¯·á'/></div>";}
else
{imgCharge="";}
listHtml+="<dl id='vod_01'>"+imgCharge+"<dt ><a href='javascript:;' onfocus='this.blur();' onclick="+pLink+"><img class='btn_play10' src='http://img.gomtv.com/images/common/blank.gif' height = 51  width = 71 alt='"+this.dispListObj.strtitle[i]+"' /></a><img class='sum' src='"+imgLink+"' height=51 alt='"+this.dispListObj.strtitle[i]+"'/></dt><dd style='height:29px;overflow:hidden'>"+aLink+this.dispListObj.strtitle[i]+"</a></dd><img src='http://img.gomtv.com/images/quicklist/s_btn_close.gif' alt='¸®½ºÆ®¿¡¼­ »èÁ¦' onclick='"+dLink+"' style='cursor:pointer;position:relative;left:32px;top:-11px' width='12px'/></dl>";}
else
{listHtml+="<dl id='vod_01'><dt style='background:url(http://img.gomtv.com/images/quicklist/noimg.gif) no-repeat 2px 2px;'></dt><dd><a href='#' onfocus='this.blur();'>¿µ»óÀ» ´ã¾Æ ÁÖ¼¼¿ä!</a></dd></dl>";}}
G.$("u_quick_all").style({"display":"block"});G.$("qListDlArea").html({"content":listHtml});}
else
{this.closeList();}},getNext:function()
{if(this.startPos>=0&&this.startPos<this.qListCnt-this.viewPerPage)
{this.startPos+=3;this.dispList();}},getPrev:function()
{if(this.startPos>0)
{this.startPos-=3;this.startPos=(this.startPos<0)?0:this.startPos;this.dispList();}},delList:function(no)
{var tmpFunc=this.afterSetting;this.afterSetting=function()
{if(this.qListCnt%3==0)
{if(this.startPos!=0)
this.startPos=this.startPos-3;}
this.getListInfo();}
this.qListObj.type.splice(no,1);this.qListObj.ids0.splice(no,1);this.qListObj.ids1.splice(no,1);this.qListObj.ids2.splice(no,1);this.qListObj.ids3.splice(no,1);this.qListObj.level.splice(no,1);this.qListObj.source.splice(no,1);this.qListCnt--;this.cookieSet();G.$("qListCntArea").html({"content":this.qListCnt+"°³"});G.$("qListCntArea1024").html({"content":this.qListCnt+"°³"});this.afterSetting=tmpFunc;},playAll:function()
{if(ISAX)
{this.playIndex=0;this.multiPlay=true;this.playObj=this.dispListObj;var tmpLen=this.playObj.type.length;if(tmpLen>0&&this.alertDispStatus)
{var alertDisp=false;var alertTitle="";for(var i=0;i<tmpLen;i++)
{if(this.playObj.charge[i]==1)
{alertDisp=true;alertTitle+="<li class='quick_alert_lipay'><nobr>"+this.playObj.strtitle[i]+"</nobr></li>";}
if(this.playObj.imgid[i]==0)
{alertDisp=true;alertTitle+="<li class='quick_alert_li19'><nobr><img src='http://img.gomtv.com/images/quicklist/ql_layer_19.gif'/>"+this.playObj.strtitle[i]+"</nobr></li>";}}
if(alertDisp==true)
{var qPos=(document.body.clientWidth)-((document.body.clientWidth/2)-(960/2))-320;G.$("quick_alert_fr").style({'display':'block','left':qPos,'top':document.body.scrollTop+210});G.$("quick_alert_title_list").html({content:alertTitle});this.alertDispStatus=false;return;}}
this.playNext();}
else
{if(this.dispListObj.type[0]=='channel')
{location.href="http://ch.gomtv.com/2009/gate.gom?intchid="+this.dispListObj.ids0[0]+"&intpid="+this.dispListObj.ids1[0]+"&intbid="+this.dispListObj.ids2[0]+"&type=3&auto=10";return;}
else
{location.href="http://"+this.dispListObj.type[0]+".gomtv.com/gate.gom?dispid="+this.dispListObj.ids0[0]+"&auto=10";return;}}},playNext:function()
{if(this.playIndex<this.playObj.type.length)
{if(this.playObj.type[this.playIndex]=='channel')
{topPlayAx({'type':this.playObj.type[this.playIndex],'level':this.playObj.level[this.playIndex],'isMultiPlay':true,'chid':this.playObj.ids0[this.playIndex],'pid':this.playObj.ids1[this.playIndex],'bid':this.playObj.ids2[this.playIndex],'bjvid':this.playObj.ids3[this.playIndex],'level':this.playObj.level[this.playIndex],'source':this.playObj.source[this.playIndex]});}
else if(this.playObj.type[this.playIndex]=='movie'||this.playObj.type[this.playIndex]=='drama')
{topPlayAx({'type':this.playObj.type[this.playIndex],'level':this.playObj.level[this.playIndex],'isMultiPlay':true,'dispid':this.playObj.ids0[this.playIndex],'vodid':this.playObj.ids1[this.playIndex],'serv':this.playObj.ids2[this.playIndex],'part':this.playObj.ids3[this.playIndex],'level':this.playObj.level[this.playIndex],'source':this.playObj.source[this.playIndex]});}
this.playIndex++;}
else
{this.playIndex=0;}},setPos:function()
{var qPos=(document.body.clientWidth)-((document.body.clientWidth/2)-(960/2));var qWidth=G.$("#qListArea").offsetWidth;if(screen.width>1024)
{G.$('quick_icon02').style({'display':'block'});G.$('quick_1024tab').style({'display':'none'});G.$("u_quick_arrow").style({'display':'block'});G.$("l_quick_arrow").style({'display':'none'});G.$("qListArea").style({'left':qPos-qWidth,'top':document.body.scrollTop+100});}
else
{G.$('quick_icon02').style({'display':'none'});G.$('quick_1024tab').style({'display':'block'});G.$("u_quick_arrow").style({'display':'none'});G.$("l_quick_arrow").style({'display':'block'});G.$("qListArea").style({'left':qPos-qWidth,'top':document.body.scrollTop+100});G.$("u_quick_all").style({'left':-100,'top':0});}},playReset:function()
{this.multiPlay=false;this.playIndex=0;}}
Skin=function(obj)
{this.chid=obj.chid;}
Skin.prototype={open:function()
{G.$('skinLeft').style({"display":"block"});G.$('skinRight').style({"display":"block"});},close:function()
{G.$('skinLeft').style({"display":"none"});G.$('skinRight').style({"display":"none"});}}
var JSON=JSON||{};(function(){function f(n){return n<10?'0'+n:n;}
if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return this.valueOf()?this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+
partial.join(',\n'+gap)+'\n'+
mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+
mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
return str('',{'':value});};}
if(typeof JSON.parse!=='function'){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+
('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');};}}());