function SkyucMenu(){this.pid=null;this.obj=null;this.w=null;this.h=null;this.t=0;this.menu=null;this.init()}SkyucMenu.prototype={init:function(){this.menu=getSkyucBox();document.body.insertBefore(this.menu,document.body.firstChild)},close:function(){read.t=setTimeout("closep();",100)},setMenu:function(b,c){if(c){var a=this.menu}else{var a=getSkyucContainer()}if(typeof(b)=="string"){a.innerHTML=b}else{while(a.hasChildNodes()){a.removeChild(a.firstChild)}a.appendChild(b)}},move:function(b){if(Browser.isIE){document.body.onselectstart=function(){return false}}var b=Browser.isIE?window.event:b;var c=read.menu;var a=b.clientX;var d=b.clientY;read.w=b.clientX-parseInt(c.offsetLeft);read.h=b.clientY-parseInt(c.offsetTop);document.onmousemove=read.moving;document.onmouseup=read.moved},moving:function(b){var b=is_ie?window.event:b;var a=b.clientX;var c=b.clientY;read.menu.style.left=a-read.w+"px";read.menu.style.top=c-read.h+"px"},moved:function(){if(is_ie){document.body.onselectstart=function(){return true}}document.onmousemove="";document.onmouseup=""},open:function(b,c,d,a){clearTimeout(read.t);if(typeof d=="undefined"){d=1}if(typeof a=="undefined"){a=0}this.setMenu(getObj(b).innerHTML,1);this.menu.className=getObj(b).className;this.menupz(c,a);if(d!=2){getObj(c).onmouseout=function(){read.close();getObj(c).onmouseout=""};read.menu.onmouseout=read.close;read.menu.onmouseover=function(){clearTimeout(read.t)}}},menupz:function(f,a){read.menu.onmouseout="";read.menu.style.display="";read.menu.style.zIndex=3000;read.menu.style.left="-500px";read.menu.style.visibility="visible";if(typeof f=="string"){f=getObj(f)}if(f==null){read.menu.style.top=(ietruebody().clientHeight-read.menu.offsetHeight)/3+getTop()+"px";read.menu.style.left=(ietruebody().clientWidth-read.menu.offsetWidth)/2+"px"}else{var d=findPosY(f);var c=findPosX(f);var g=Math.floor(a/10);var b=a%10;if(g!=1&&(g==2||d<ietruebody().clientHeight/2)){d+=getTop()+f.offsetHeight-85}else{d+=getTop()-read.menu.offsetHeight-60}if(b!=1&&(b==2||c>(ietruebody().clientWidth)*3/5)){c-=read.menu.offsetWidth-f.offsetWidth+getLeft()}else{c+=getLeft()}read.menu.style.top=d+"px";read.menu.style.left=c+"px"}},InitMenu:function(){function a(d,c){if(getObj(d)){getObj(d).onmouseover=function(){read.open(c,d)}}}for(var b in openmenu){a(b,openmenu[b])}},IsShow:function(){return(read.menu.hasChildNodes()&&read.menu.style.display!="none")?true:false}};var read=new SkyucMenu();function closep(){read.menu.style.display="none";read.menu.className=""}function findPosX(a){var b=0;if(a.offsetParent){while(a.offsetParent){b+=a.offsetLeft;a=a.offsetParent}}else{if(a.x){b+=a.x}}return b-getLeft()}function findPosY(b){var a=0;if(b.offsetParent){while(b.offsetParent){a+=b.offsetTop;b=b.offsetParent}}else{if(b.y){a+=b.y}}return a-getTop()}function in_array(d,b){for(var c=0;c<b.length;c++){if(d==b[c]){return true}}return false}function loadjs(c,b,f){if(typeof f=="undefined"){f=""}if(f!=""&&IsElement(f)){return false}var d=document.getElementsByTagName("head")[0];var a=document.createElement("script");if(f){a.id=f}if(c){a.src=c}else{if(b){a.text=b}}d.appendChild(a);return true}function getObj(a){return document.getElementById(a)}function getTop(){return typeof window.pageYOffset!="undefined"?window.pageYOffset:ietruebody().scrollTop}function getLeft(){return(typeof window.pageXOffset!="undefined"?window.pageXOffset:ietruebody().scrollLeft)}function ietruebody(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}function IsElement(a){return document.getElementById(a)!=null?true:false}function getSkyucBox(b){if(getObj("skyuc_box")){return getObj("skyuc_box")}var a=elementBind("div","skyuc_box","","position:absolute");document.body.appendChild(a);return a}function getSkyucContainer(){if(getObj("skyuc_box")){var b=getObj("skyuc_box")}else{var b=getSkyucBox()}if(getObj("box_container")){return getObj("box_container")}b.innerHTML='<div class="popout"><table  border="0" cellspacing="0" cellpadding="0"><tbody><tr><td class="bgcorner1"></td><td class="pobg1"></td><td class="bgcorner2"></td></tr><tr><td class="pobg4"></td><td><div class="popoutContent" id="box_container"></div></td><td class="pobg2"></td></tr><tr><td class="bgcorner4"></td><td class="pobg3"></td><td class="bgcorner3"></td></tr></tbody></table></div>';var a=getObj("box_container");return a}function elementBind(b,f,c,d){var a=document.createElement(b);if(f){a.id=f}if(typeof(c)=="string"){a.className=c}if(typeof(d)=="string"){a.style.cssText=d}return a}function addChild(b,a,g,c,d){b=objCheck(b);var f=elementBind(a,g,c,d);b.appendChild(f);return f}function delElement(a){a=objCheck(a);a.parentNode.removeChild(a)}function opencode(a,b){if(read.IsShow()&&read.menu.firstChild.id=="verifyimage"){return}read.open(a,b,2,0);getimage();document.onclick=function(c){var d=Utils.srcElement(c);if(d==b){return}else{if(d.id=="verifyimage"){getimage()}else{closep();document.onclick=""}}}}function signInResponse(a){toggleLoader(false);var b=a.substr(0,1);var c=a.substr(2);if(b==1){document.getElementById("member-zone").innerHTML=c}else{alert(c)}}function gotoPage(b,c,a){Ajax.call("ajax.php?do=comment&act=gotopage","page="+b+"&id="+c+"&type="+a,gotoPageResponse,"GET","JSON")}function gotoPageResponse(a){document.getElementById("SKYUC_COMMENT").innerHTML=a.content}function getAttr(d){var a=document.getElementsByTagName("tbody");for(i=0;i<a.length;i++){if(a[i].id.substr(0,10)=="show_type"){a[i].style.display="none"}}var b="show_type_"+d;try{document.getElementById(b).style.display=""}catch(c){}}function showCatalog(a){var c=getCoordinate(a);var b=document.getElementById("SKYUC_CATALOG");if(b&&b.style.display!="block"){b.style.display="block";b.style.left=c.x+"px";b.style.top=(c.y+a.offsetHeight-1)+"px"}}function getCoordinate(a){var b={x:0,y:0};b.x=document.body.offsetLeft;b.y=document.body.offsetTop;do{b.x+=a.offsetLeft;b.y+=a.offsetTop;a=a.offsetParent}while(a.tagName.toUpperCase()!="BODY");return b}function hideCatalog(a){var b=document.getElementById("SKYUC_CATALOG");if(b&&b.style.display!="none"){b.style.display="none"}}function sendHashMail(){Ajax.call("user.php?act=send_hash_mail","",sendHashMailResponse,"GET","JSON")}function sendHashMailResponse(a){alert(a.message)}function OpenPlay(b,j,f,a,c){var h=(screen.width-f)/2;var d=(screen.height-a)/2;var g="player.php?mov_id="+b+"&look_id="+j+"&player="+c+"";window.open(g,"SKYUC","toolbar=no,Directories=no,location=no,Status=no,,menubar=no,resizable=0,scrollbars=no,width="+f+",height="+a+",left="+h+",top="+d)}function display_mode(b){document.getElementById("display").value=b;setTimeout(a,0);function a(){document.forms.listform.submit()}}function hash(b,d){var d=d?d:32;var f=0;var c=0;var a="";filllen=d-b.length%d;for(c=0;c<filllen;c++){b+="0"}while(f<b.length){a=stringxor(a,b.substr(f,d));f+=d}return a}function stringxor(f,c){var g="";var h="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var a=Math.max(f.length,c.length);for(var d=0;d<a;d++){var b=f.charCodeAt(d)^c.charCodeAt(d);g+=h.charAt(b%52)}return g}function hash(b,d){var d=d?d:32;var f=0;var c=0;var a="";filllen=d-b.length%d;for(c=0;c<filllen;c++){b+="0"}while(f<b.length){a=stringxor(a,b.substr(f,d));f+=d}return a}function stringxor(f,c){var g="";var h="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var a=Math.max(f.length,c.length);for(var d=0;d<a;d++){var b=f.charCodeAt(d)^c.charCodeAt(d);g+=h.charAt(b%52)}return g}var evalscripts=new Array();function evalscript(b){if(b.indexOf("<script")==-1){return b}var c=/<script[^\>]*?src=\"([^\>]*?)\"[^\>]*?(reload=\"1\")?(?:charset=\"([\w\-]+?)\")?><\/script>/ig;var a=new Array();while(a=c.exec(b)){appendscript(a[1],"",a[2],a[3])}return b}function appendscript(f,d,b,h){var g=hash(f+d);if(!b&&in_array(g,evalscripts)){return}if(b&&document.getElementById(g)){document.getElementById(g).parentNode.removeChild(document.getElementById(g))}evalscripts.push(g);var a=document.createElement("script");a.type="text/javascript";a.id=g;try{if(f){a.src=f}else{if(d){a.text=d}}document.getElementById("append_parent").appendChild(a)}catch(c){}}function in_array(c,b){if(typeof c=="string"||typeof c=="number"){for(var a in b){if(b[a]==c){return true}}}return false}var pmwinposition=new Array();var userAgent=navigator.userAgent.toLowerCase();var is_opera=userAgent.indexOf("opera")!=-1&&opera.version();var is_moz=(navigator.product=="Gecko")&&userAgent.substr(userAgent.indexOf("firefox")+8,3);var is_ie=(userAgent.indexOf("msie")!=-1&&!is_opera)&&userAgent.substr(userAgent.indexOf("msie")+5,3);function pmwin(d,j){var h=document.getElementsByTagName("OBJECT");if(d=="open"){for(i=0;i<h.length;i++){if(h[i].style.visibility!="hidden"){h[i].setAttribute("oldvisibility",h[i].style.visibility);h[i].style.visibility="hidden"}}var g=document.body.clientWidth;var b=document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight;var f=document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop;var c=800;var a=b*0.9;if(!document.getElementById("pmlayer")){div=document.createElement("div");div.id="pmlayer";div.style.width=c+"px";div.style.height=a+"px";div.style.left=((g-c)/2)+"px";div.style.position="absolute";div.style.zIndex="999";document.getElementById("append_parent").appendChild(div);document.getElementById("pmlayer").innerHTML='<div style="width: 800px; background: #666666; margin: 5px auto; text-align: left"><div style="width: 800px; height: '+a+'px; padding: 1px; background: #FFFFFF; border: 1px solid #7597B8; position: relative; left: -6px; top: -3px"><div onmousedown="pmwindrag(event, 1)" onmousemove="pmwindrag(event, 2)" onmouseup="pmwindrag(event, 3)" style="cursor: move; position: relative; left: 0px; top: 0px; width: 800px; height: 30px; margin-bottom: -30px;"></div><a href="###" onclick="pmwin(\'close\')"><img style="position: absolute; right: 20px; top: 15px" src="data/images/close.gif" title="\u5173\u95ed" /></a><iframe id="pmframe" name="pmframe" style="width:'+c+'px;height:100%" allowTransparency="true" frameborder="0"></iframe></div></div>'}document.getElementById("pmlayer").style.display="";document.getElementById("pmlayer").style.top=((b-a)/2+f)+"px";if(!j){pmframe.location="pm.php"}else{pmframe.location="pm.php?"+j}}else{if(d=="close"){for(i=0;i<h.length;i++){if(h[i].attributes.oldvisibility){h[i].style.visibility=h[i].attributes.oldvisibility.nodeValue;h[i].removeAttribute("oldvisibility")}}hiddenobj=new Array();document.getElementById("pmlayer").style.display="none"}}}var pmwindragstart=new Array();function pmwindrag(b,c){if(c==1){pmwindragstart=is_ie?[event.clientX,event.clientY]:[b.clientX,b.clientY];pmwindragstart[2]=parseInt(document.getElementById("pmlayer").style.left);pmwindragstart[3]=parseInt(document.getElementById("pmlayer").style.top);doane(b)}else{if(c==2&&pmwindragstart[0]){var a=is_ie?[event.clientX,event.clientY]:[b.clientX,b.clientY];document.getElementById("pmlayer").style.left=(pmwindragstart[2]+a[0]-pmwindragstart[0])+"px";document.getElementById("pmlayer").style.top=(pmwindragstart[3]+a[1]-pmwindragstart[1])+"px";doane(b)}else{if(c==3){pmwindragstart=[];doane(b)}}}}function doane(a){e=a?a:window.event;if(is_ie){e.returnValue=false;e.cancelBubble=true}else{if(e){e.stopPropagation();e.preventDefault()}}};

