var IE=document.all?true:false;if(!IE)document.captureEvents(Event.MOUSEMOVE);var nn4=(navigator.appName.indexOf("Netscape")>-1&&navigator.appVersion.indexOf("4")> -1)?true:false;var nn6=(document.getElementById&& !document.all)?true:false;function $import(path){var i,base="",src="function.js",scripts=document.getElementsByTagName("script");for(i=0;i<scripts.length;i++){if(scripts[i].src.match(src)){base=scripts[i].src.replace(src,"");break;}}document.write("<"+"script src=\""+base+path+"\"></"+"script>");};function browser(id){var layer=(nn4)?document.layers[id]:(IE)?document.all[id]:document.getElementById(id);return layer;};function jsfdata(keyid){};function layerSelect(master,sub){var div_master=document.getElementById(master);var div_sub=div_master.getElementsByTagName("DIV");for(var i=0,subnum=div_sub.length;i<subnum;i++){var layer=browser(div_sub[i].id);if(layer){if(sub==div_sub[i].id){layer.style.position="relative";layer.style.top=0;layer.style.left=0;}else{layer.style.position="absolute";layer.style.top= -1000;layer.style.left= -1000;}}}};function getStyle(el,style){if(!document.getElementById)return;var value=el.style[toCamelCase(style)];if(!value)if(document.defaultView)value=document.defaultView.getComputedStyle(el,"").getPropertyValue(style);else if(el.currentStyle)value=el.currentStyle[toCamelCase(style)];return value;};function toCamelCase(s){for(var exp=toCamelCase.exp;exp.test(s);s=s.replace(exp,RegExp.$1.toUpperCase()));return s;};toCamelCase.exp=/-([a-z])/;function randString(n){var str='';var rand;if(typeof(n)!='number'){var n=(parseInt(Math.random()*100)%7)+6}for(var i=0;i<n;i++){numI=(parseInt(Math.random()*1000)%94)+33;while(checkPunc(numI)){numI=(parseInt(Math.random()*1000)%94)+33;}str=str+String.fromCharCode(numI);}return str;};function checkPunc(num){if((num>=33)&&(num<=47)){return true;}if((num>=58)&&(num<=64)){return true;}if((num>=91)&&(num<=96)){return true;}if((num>=123)&&(num<=126)){return true;}return false;};function loadPage(url,layerID){if(url.indexOf('?')== -1){url=url+"?rnd="+Math.random();}else{url=url+"&rnd="+Math.random();}var obj=browser(layerID);obj.innerHTML="Loading...";var http_request=false;if(window.XMLHttpRequest){http_request=new XMLHttpRequest();if(http_request.overrideMimeType){http_request.overrideMimeType('text/xml');}}else if(window.ActiveXObject){try{http_request=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http_request=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}if(!http_request){alert('Error : Cannot create an XMLHTTP instance.');return false;}http_request.onreadystatechange=function(){doReponse(http_request,layerID);};http_request.open('GET',url,true);http_request.send(null);};function doReponse(http_request,layerID){if(http_request.readyState==4){if(http_request.status==200){var contents=http_request.responseText;var layer=browser(layerID);if(layer){if(!contents.length){layer.style.position='absolute';layer.style.top= -1000;}else{layer.style.position='relative';layer.style.top=0;if(nn4){layer.document.open();layer.document.write(contents);layer.document.close();}else{layer.innerHTML=contents;}}}}else{alert('There was a problem with the request.');}}};function utf16to8(str){var out,i,len,c;out="";len=str.length;for(i=0;i<len;i++){c=str.charCodeAt(i);if((c>=0x0001)&&(c<=0x007F)){out+=str.charAt(i);}else if(c>0x07FF){out+=String.fromCharCode(0xE0|((c>>12)&0x0F));out+=String.fromCharCode(0x80|((c>>6)&0x3F));out+=String.fromCharCode(0x80|((c>>0)&0x3F));}else{out+=String.fromCharCode(0xC0|((c>>6)&0x1F));out+=String.fromCharCode(0x80|((c>>0)&0x3F));}}return out;};function utf8to16(str){var out,i,len,c;var char2,char3;out="";len=str.length;i=0;while(i<len){c=str.charCodeAt(i++);switch(c>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:out+=str.charAt(i-1);break;case 12:case 13:char2=str.charCodeAt(i++);out+=String.fromCharCode(((c&0x1F)<<6)|(char2&0x3F));break;case 14:char2=str.charCodeAt(i++);char3=str.charCodeAt(i++);out+=String.fromCharCode(((c&0x0F)<<12)|((char2&0x3F)<<6)|((char3&0x3F)<<0));break;}}return out;};function Set_Cookie(name,value,expires,path,domain,secure){var today=new Date();today.setTime(today.getTime());if(expires){expires=expires*1000;}var expires_date=new Date(today.getTime()+(expires));document.cookie=name+"="+escape(value)+((expires)?";expires="+expires_date.toGMTString():"")+((path)?";path="+path:"")+((domain)?";domain="+domain:"")+((secure)?";secure":"");};function Get_Cookie(name){var start=document.cookie.indexOf(name+"=");var len=start+name.length+1;if(!start&&name!=document.cookie.substring(0,name.length)){return '';}if(start== -1)return '';var end=document.cookie.indexOf(";",len);if(end== -1)end=document.cookie.length;return unescape(document.cookie.substring(len,end));};function num2page(num,tail){if(num<=0){num=1;};if(typeof(tail)=='undefined'){var tail='.html';};return Math.floor(num/10000)+"/"+Math.floor(num/100)+"/"+num+(tail?tail:'/');};String.prototype.Trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"");};String.prototype.LTrim=function(){return this.replace(/(^\s*)/g,"");};String.prototype.RTrim=function(){return this.replace(/(\s*$)/g,"");};function imgReplace(obj,url){var o=document.getElementById(obj);o.src=url;};function imagePreLoader(arr){if(typeof(arr)=='object'){if(arr.length>0){var imgobj=new Image();for(i=0;i<arr.length;i++){imgobj.src=arr[i];}}}};function parseUri(sourceUri){var uriPartNames=["source","protocol","authority","domain","port","path","directoryPath","fileName","query","anchor"];var uriParts=new RegExp("^(?:([^:/?#.]+):)?(?://)?(([^:/?#]*)(?::(\\d*))?)?((/(?:[^?#](?![^?#/]*\\.[^?#/.]+(?:[\\?#]|$)))*/?)?([^?#/]*))?(?:\\?([^#]*))?(?:#(.*))?").exec(sourceUri);var uri={};for(var i=0;i<10;i++){uri[uriPartNames[i]]=(uriParts[i]?uriParts[i]:"");}if(uri.directoryPath.length>0){uri.directoryPath=uri.directoryPath.replace(/\/?$/,"/");}return uri;};function imgReSize(w,h,_targetW,_targetH){try{w=parseInt(w);h=parseInt(h);_targetW=parseInt(_targetW);_target_H=parseInt(_targetH);var size={'w':w,'h':h};if(_targetW&&_targetH){var _targetRatio=_targetW/_targetH;var _srcRatio=w/h;if(_srcRatio>=_targetRatio){size['w']=_targetW;size['h']=(size['h']=Math.round(size['w']/_srcRatio))<=_targetH?size['h']:Math.floor(size['w']/_srcRatio);}else{size['h']=_targetH;size['w']=(size['w']=Math.round(size['h']*_srcRatio))<=_targetW?size['w']:Math.floor(size['h']*_srcRatio);}}return size;}catch(e){return false;}};function AddBookmarkLink(url,title){if(typeof(url)=='undefined'){var url=document.location.host;}if(typeof(title)=='undefined'){var title=document.title;}if(window.sidebar){window.sidebar.addPanel(title,url,"");}else if(window.external){window.external.AddFavorite(url,title);}else if(window.opera&&window.print){return true;}};function SetAsHomepage(url,title){if(typeof(url)=='undefined'){var url=document.location.host;}if(typeof(title)=='undefined'){var title=document.title;}if(window.external){document.body.style.behavior='url(#default#homepage)';document.body.setHomePage(url);}else{return AddBookmarkLink(url,title);}};function redirect(url,_popup,_base){if(typeof(_base)=='undefined'){var _base='http://exgame2.exmode.com/appl/redirect.html?u=';}if(typeof(_popup)!='bool'){var _popup=true;}if(_popup==true){popup(_base+escape(url));}else{return _base+escape(url);}};function popup(url,winid,width,height,parm){if(typeof(winid)!='string'){var winid='_blank';}if(typeof(width)=='undefined')var width=window.screen?parseInt(screen.availWidth*0.6):640;if(typeof(height)=='undefined')var height=window.screen?parseInt(screen.availHeight*0.6):480;if(typeof(parm)=='undefined'){var parm='toolbar=1,location=0,scrollbars=1,status=0,resizable=1,fullscreen=0';}parm+=(width?'width='+width+',':'')+(height?'height='+height+',':'');if(window.screen&&width>0&&height>0){var left=parseInt((screen.availWidth-width)>>1);var top=parseInt((screen.availHeight-height)>>1);parm+='left='+left+',top='+top;}var WO=window.open(url,winid,parm);if(WO&&window.focus){WO.focus();}return WO;}function div_visibility(divid,status){var div=browser(divid);if(div){if(status==true){div.style.display="block";div.style.visibility="visible";}else{div.style.display="none";div.style.visibility="hidden";}}}var uInfoSearch=false;function pop_search(id){uInfoSearch=!uInfoSearch;div_visibility(id,uInfoSearch);if(typeof(_ANNOUNCEMENT)!="object"&&IE) {if(document.getElementById("userInfoBar")){var wBar=document.getElementById("userInfoBar").offsetWidth;}if(document.getElementById("uInfoImg")){var wBox1=document.getElementById("uInfoImg").offsetWidth;}if(document.getElementById("uInfoName")){var wBox2=document.getElementById("uInfoName").offsetWidth;}if(document.getElementById("uInfoSearch")){var wBox3=document.getElementById("uInfoSearch").offsetWidth;}var div=browser('uInfoSearch');div.style.marginLeft=parseInt(wBar)-parseInt(wBox1)-parseInt(wBox2)-parseInt(wBox3)-7+"px";}}