
function $(s){return (document.getElementById)?document.getElementById(s):eval('document.all.'+s);}function $$(s){return parent.$(s);}function _Alert(s){alert(s);}function Right(s,len){s=s.substring(s.length-len);return s;}function ParseInt(n){n=parseInt(n);return isNaN(n)?0:n;}function isNumber(n){return (n!=null&&n.constructor==Number)?true:false;}function getIDs(n){if(n<1) return 0;s='';for(i=0;i<=n;i++){o=$('ID'+i);if(o!=null){if(o.checked){s+=','+o.value;}}}return s.substr(1);}function getCookie(cookieName){try{var cookieValue='';var posName=document.cookie.indexOf(escape(cookieName)+'=');if (posName==-1) return '';var posValue=posName+(escape(cookieName)+'=').length;var endPos=document.cookie.indexOf(';',posValue);return unescape(document.cookie.substring(posValue,(endPos==-1)?99999:endPos));}catch(e){}	}function setCookie(nm,vu,tm){try{var expires=new Date();if(typeof(tm)=='undefined') tm=60*240;expires.setTime(expires.getTime()+tm*60000);document.cookie=escape(nm)+'='+escape(vu)+'; expires='+expires.toGMTString()+'; path=/; domain=.gamech.com.cn';}catch(e){}}function go2(s){$('divBody').innerHTML='<img width="1" height="100"><img src="./images/loading.gif"> 正在下载数据... ';$('frm4').src='./?'+s+'.htm';}function layerWin(name,title,w,h){var o=$(name);if(o==null){o=document.createElement('div');o.setAttribute('id',name);		o.style.zIndex=zIndex++;o.style.position='absolute';o.style.width=w.toString()+'px';o.style.top=((w>300)?1:30)+'1px';o.style.left=((h>300)?1:30)+'1px';document.body.appendChild(o);o.innerHTML='<div id="'+name+'Title" style="padding:7px 0 0 2px;border:0;color:#fff;cursor:move;width:'+w+'px;height:25px;font-size:12px;font-weight:bold;filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#696867, EndColorStr=#bbccaa);"><h5>&nbsp; █ '+title+' </h5></div><div style="float:right;margin-top:-20px;padding-right:5px;cursor:pointer;"><img src="./images/close.gif" onclick="$(\''+name+'\').style.display=\'none\';"></div><div id="'+name+'Body"><iframe name="'+name+'Win" id="'+name+'Win" style="border:1px solid #989;width:'+w+'px;height:'+h+'px;" src="./images/ico1/blank.png" frameborder="0" scrolling="no"></iframe></div>';iDrag.Init(name,name+'Title');}else{o.style.display='block';o.style.zIndex=zIndex++;}}

var iDrag=
{

v:{Key:{},zIndex:{}},

Init:function(id,title)
{
var o=$(title);
if(o==null || $(id)==null)
{
return false;
}
o.style.cursor='move';
o.onmousedown=function(){iDrag.v.Key=id;iDrag.Begin();};

o=document.createElement('div');
o.id='zQi_Dashed';
o.style.display='none';
o.style.border='1px dashed red';
o.style.position='absolute';

document.body.appendChild(o);
},

Begin:function()
{
var s=this.v.Key;
if($(s)==null)
{
iDebug('对象 '+this.v.Key+' 不在拖曳列表中!');
return;
}
document.onmousemove=iDrag.Move;
document.onmouseup=function(){iDrag.v.Key=s;iDrag.End();};

o1=$(this.v.Key);
if(!isNumber(this.v.zIndex))
{
this.v.zIndex=ParseInt(o1.style.zIndex);
}
o1.style.zIndex=this.v.zIndex++;
o2=$('zQi_Dashed').style;
o2.top=o1.offsetTop+'px';
o2.left=o1.offsetLeft+'px';
o2.zIndex=this.v.zIndex;
o2.display='block';
o2.width=o1.offsetWidth+'px';
o2.height=o1.offsetHeight+'px';
return false;
},

Move:function(e)
{
o=$('zQi_Dashed').style;
var oEvent=typeof(window.event)=='undefined'?e:window.event;

o.left=oEvent.clientX+'px';
o.top=oEvent.clientY+'px';
return false;
},

End:function()
{
o1=$(this.v.Key).style;
o2=$('zQi_Dashed').style;
o1.left=o2.left;
o1.top=o2.top;
o2.display='none';
document.onmousemove=null;
document.onmouseup=null;
return false;
}


}

iDrag.Init();function MsgBox(s){var o=$('msg32p');if(o==null){o=document.createElement('div');document.body.appendChild(o);o.innerHTML='<div id="msg32b" style="background:#f0f0ee;z-index:843750;position:absolute;height:100%;width:100%;top:1px;left:1px;filter:Alpha(opacity=90);padding:180px 0 0 120px;overflow:hidden;"><span id="msg32p" style="font-size:20px;font-weight:bold;font-family: \'微软雅黑\';"></span><img src="./images/ok.gif" onclick="MsgBoxHidn()" style="cursor:pointer;"></div>';o=$('msg32p');}else{$('msg32b').style.display='block';}o.innerHTML=s;setTimeout(MsgBoxSlider,5000);}function MsgBoxHidn(){$('msg32b').style.display='none';}function MsgBoxSlider(){$('msg32b').style.display='none';}/*** <Page>*/function PageJumpList(PageMax,PageThis){try{var i=1;var PageEnd=PageMax;var menuLen=18;if(!PageThis){PageThis=1;}if(PageSize<1){PageSize=1;}/**PageMax = ParseInt((PageMax+PageSize-1)/PageSize);**/s='<a class="no">&nbsp;&nbsp;第 '+PageThis+'/'+PageMax+' 页&nbsp;&nbsp;</a>';if(PageThis>1){s+='<a href="javascript:PageJump(' +(PageThis-1)+')" target="_self">&lt;</a>';}else{s+='<a class="no">&lt;</a>';}if(PageMax>menuLen){if(PageThis>menuLen/2){PageEnd=PageThis*1+ParseInt(menuLen/2);} else{PageEnd=menuLen;}if(PageEnd>PageMax){PageEnd=PageMax;}i=PageEnd*1-menuLen;}if(i<1) i=1;for(i;i<=PageEnd;i++){s+=(i==PageThis)?'<a class="no">'+i+'</a>':'<a href="javascript:PageJump(' +i+')" target="_self">'+i+'</a>';}if(PageThis<PageMax){s+='<a href="javascript:PageJump(' +(PageThis+1)+')" target="_self">&gt;</a>';}else{s+='<a class="no">&gt;</a>';}}catch(e){MsgBox(e.message);}return s;}function PageJump(i){if(Pages2.indexOf('avascript:')>0){eval(Pages2.replace('{page}',i).replace(/javascript:/gi,''));}else{location.href=Pages2.replace('{page}',i);}}/*** </Page>*/function ShowUser(){try{var o=$('logStatus');o.style.display='block';var tmp=getUser();if(!tmp) return;s=tmp[3]+'&nbsp;<img src="http://bbs.gamech.com.cn/images/icon/image'+Right('00'+tmp[6],3)+'.gif"> '+tmp[7]+'&nbsp;<img src="http://www.gamech.com.cn/pub/images/money.gif">&nbsp;'+tmp[8]+' &nbsp; <a href="http://www.gamech.com.cn/?Passport/My.htm" target="_blank">我的资料</a> &nbsp; <span class="a" onclick="Logout()">退出</span>';o.innerHTML=s;}catch(e){}}function getUser(){var s=getCookie('ForumUserInfo');if(s.length<10) return false;return s.split('.,');}function Logout(){setCookie('ForumUserInfo','');setTimeout("location.href='http://wow.gamech.com.cn/ask/logout.php';",2000);location.href='./?index.htm';}function SetWinHeight(win,h){var frm=document.getElementById(win); var doc=document.frames?document.frames[win].document:frm.contentDocument;if(frm==null || doc==null) return;h+=doc.body.scrollHeight;if(h<1460) h=1460;frm.style.height=h+'px';doc.body.style.backgroundColor='#1F1F1F';}var zIndex=98700;