function security(){var B;B=window.document;B.oncontextmenu=disableFinal;var A;for(A=0;A<B.images.length;A++){B.images[A].setAttribute("GALLERYIMG","no")}}function disableFinal(){var A="Function Disabled!";return false}function checkIdentityNumber(M){if(M.substring(0,2)=="99"){return true}var B=Math.floor(parseInt(M)/100);var A=parseInt(M.substring(0,1));var O=parseInt(M.substring(1,2));var N=parseInt(M.substring(2,3));var L=parseInt(M.substring(3,4));var K=parseInt(M.substring(4,5));var I=parseInt(M.substring(5,6));var H=parseInt(M.substring(6,7));var G=parseInt(M.substring(7,8));var E=parseInt(M.substring(8,9));var J=E+H+K+N+A;var D=G+I+L+O;var F=J*3+D;var C=(10-(F%10))%10;J=C+G+I+L+O;D=E+H+K+N+A;F=J*3+D;check2=(10-(F%10))%10;B=B*100+C*10+check2;if(B==M){return true}else{return false}}var req;var noClock=false;var mask;function refresh(A){if(!noClock){req=false;if(window.XMLHttpRequest){try{req=new XMLHttpRequest()}catch(B){req=false}}else{if(window.ActiveXObject){try{req=new ActiveXObject("Msxml2.XMLHTTP")}catch(B){try{req=new ActiveXObject("Microsoft.XMLHTTP")}catch(B){req=false}}}}if(req){if(A==false){mask=false}req.onreadystatechange=state_Change;req.open("POST","getclock.jsp",true);req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");req.send("")}else{alert("Your browser does not support XMLHTTP.")}}}function resetClock(){createTimeoutFlash(document);req=false;if(window.XMLHttpRequest){try{req=new XMLHttpRequest()}catch(A){req=false}}else{if(window.ActiveXObject){try{req=new ActiveXObject("Msxml2.XMLHTTP")}catch(A){try{req=new ActiveXObject("Microsoft.XMLHTTP")}catch(A){req=false}}}}if(req){req.open("POST","getclock.jsp?r=1",true);req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");req.send("")}else{alert("Your browser does not support XMLHTTP.")}}function state_Change(){if(req.readyState==4){if(req.status==200){if(req.responseText.indexOf("<TIME>")>0){var C=req.responseText.indexOf("<TIME>");var B=req.responseText.indexOf("</TIME>");var D=req.responseText.substring(C+6,B);C=req.responseText.indexOf("<rank>");B=req.responseText.indexOf("</rank>");var F=req.responseText.substring(C+6,B);C=req.responseText.indexOf("<score>");B=req.responseText.indexOf("</score>");var E=req.responseText.substring(C+7,B);C=req.responseText.indexOf("<lasttime>");B=req.responseText.indexOf("</lasttime>");var A=req.responseText.substring(C+10,B);if(D.match("noclock")){if(mask==undefined||mask==true){updateTimeoutMaskVisibility("visible")}noClock=true}else{updateScoreBar("",F,E,A)}}}}}function generalCheck(){try{checkFlash(8,0,0)}catch(A){}try{checkCookie()}catch(A){}}function specialCheck(){try{checkFlash(9,0,115)}catch(A){}try{checkCookie()}catch(A){}}function createTimeoutMask(D,A,C){var B;B=C.createElement("div");B.setAttribute("id",D);B.style.position="absolute";B.style.width="100%";B.style.height=C.body.scrollHeight+"px";B.style.left="0px";B.style.top="0px";B.style.zIndex=A;B.innerHTML="text replaced by flash";C.body.appendChild(B)}function createTimeoutFlash(B){createTimeoutMask("__st",50,B);f5("mask2.swf","mask","0x000000","__st","exactfit",1);var A=document.getElementById("__st");A.style.visibility="hidden"}function updateTimeoutMaskVisibility(A,C){var B=document.getElementById("__st");B.style.visibility=A;showSTMessageDiv(C)}function showSTMessageDiv(E){var C=document.getElementById("__stmsg");C.style.zIndex=100;C.style.position="absolute";var B=getWindowHeights();var D;if(B[1]){D=B[1]+B[0]/2}else{D=B[0]/2}C.style.left="50%";C.style.top=D+"px";C.style.display="";if(E){var F=document.getElementById("_boxMessage");F.innerHTML=E}}function getWindowHeights(){var A;var B;if(typeof (window.innerWidth)=="number"){A=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){A=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){A=document.body.clientHeight}}}if(typeof (window.pageYOffset)=="number"){B=window.pageYOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){B=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){B=document.documentElement.scrollTop}}}return[A,B]};