function getDoc(a){return document.getElementById(a)}function getDoc_style(a){return document.getElementById(a).style}function showDiv(a){getDoc_style(a).display=""}function hiddenDiv(a){getDoc_style(a).display="none"}function getObj(){return document.documentElement.scrollTop||document.body.offsetHeight==document.body.clientHeight?document.documentElement:document.body}
function divIni(){viewWidth=getObj().clientWidth;viewHeight=getObj().clientHeight;posX=viewWidth/LocDivX-adWidth/LocDivX;posY=viewHeight/LocDivY-adHeight/LocDivY}function divStart(){divIni();window.onresize=divIni;divRefresh()}function divRefresh(){scrollX=getObj().scrollLeft;scrollY=getObj().scrollTop;fad_style.left=scrollX+posX+"px";fad_style.top=scrollY+posY+"px";setTimeout("divRefresh()",20)}
function ckradio(a,b){for(var c=-1,d=0;d<a.length;d++)if(a[d].checked){c=d;break}0>c&&(alert(b),a[0].focus());return c}function checktext(a,b,c,d){return""==a.value||"0"==a.value?(alert(b),a.focus(),!1):a.value.length<c||a.value.length>d?(alert(b+"\u5b57\u6578\u5fc5\u9808\u70ba "+c+"~"+d+" \u5b57"),a.focus(),!1):!0}function checktype(a,b){oo=document.getElementById("machine");oo.style.display=a;egg.lightbox.refresh();getDoc(b).innerHTML=""}
function createajax(){if(window.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(b){return null}}else return window.XMLHttpRequest?new XMLHttpRequest:null}
function getLayout(a,b,c,d,e,g){if("no"==b){if(1==a)var f="http://acg.gamer.com.tw/search.php";else 2==a||3==a?f="http://acg.gamer.com.tw/acgDetail.php?s="+parseInt(e):4==a&&(f="http://search.gamer.com.tw/");document.cookie="ckFrom="+f+"; domain=gamer.com.tw;";location.href="https://user.gamer.com.tw/login.php"}else 4==a&&(a=1),1==a?(urls="createNew.php",e&&(urls=urls+"?t="+encodeURIComponent(e))):3==a&&(urls="picNew1.php",e&&g&&(urls=urls+"?s="+e+"&t="+encodeURIComponent(g))),""!=urls&&((ajaxHttp=
createajax())?(ajaxHttp.onreadystatechange=function(){requestdata1(a,c,d)},ajaxHttp.open("GET",urls,!0),ajaxHttp.send(null)):alert("Your browser does not support AJAX!"))}
function requestdata1(a,b,c){4==ajaxHttp.readyState&&(200==ajaxHttp.status?1==a?egg.lightbox(ajaxHttp.responseText):(divbg=getDoc_style(c),divbg.height=document.body.scrollHeight+100+"px",divbg.width=document.body.scrollWidth+"px",showDiv(c),oo=getDoc(b),oo.innerHTML=ajaxHttp.responseText,showDiv(b)):alert("\u7cfb\u7d71\u5fd9\u788c(1)"))}
function postdata(a,b,c){(ajaxHttp=createajax())?(ajaxHttp.onreadystatechange=function(){requestdata2(c)},ajaxHttp.open("POST",a,!0),ajaxHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),ajaxHttp.send(b)):alert("Your browser does not support AJAX!")}
function requestdata2(a){4==ajaxHttp.readyState&&(200==ajaxHttp.status?(sss_source=ajaxHttp.responseText,sss_ary=sss_source.split("___"),0==parseInt(sss_ary[0])?(alert(sss_ary[2]),top.location.href="http://acg.gamer.com.tw/acgDetail.php?s="+sss_ary[1]):"s"===sss_ary[0]?(oo=getDoc("div_bf"),oo.innerHTML=sss_ary[1],showDiv("div_bf")):(oo=getDoc(a),8==parseInt(sss_ary[0])?oo.innerHTML='\u60a8\u5fc5\u9808\u6301\u6709<a href="http://user.gamer.com.tw/verify.php" target="_blank"><font color="red">\u624b\u6a5f\u8a8d\u8b49</font></a>\u4ee5\u4e0a\u6b0a\u9650\uff0c<br />\u624d\u53ef\u4ee5\u4f7f\u7528\u6b64\u670d\u52d9\u3002</a>':
oo.innerHTML=sss_ary[1],showDiv(a))):alert("\u7cfb\u7d71\u5fd9\u788c(2)"))}
function ckdata08_0805(a){if(!checktext(a.title,"\u8acb\u586b\u5beb\u540d\u7a31\u3002",1,60))return!1;a.dsource.value=a.dsource.value.trim();if(""==a.dsource.value)return alert("\u8acb\u586b\u5beb\u8cc7\u8a0a\u4f86\u6e90\u3002"),!1;if(255<a.dsource.value.utf8Length())return alert("\u8cc7\u8a0a\u4f86\u6e90\u5b57\u6578\u904e\u591a\uff0c\u8acb\u7c21\u55ae\u6558\u8ff0\u5373\u53ef\u3002"),!1;if(0>(t=ckradio(a.type,"\u8acb\u9ede\u9078\u5e73\u53f0\u985e\u578b\u3002")))return!1;m=0;if(a.elements.type[0].checked){if(0>
(mindex=ckradio(a.machine,"\u8acb\u9078\u64c7\u4e3b\u6a5f\u5e73\u53f0\u3002")))return!1;m=a.machine[mindex].value}cc="";a.elements.type[0].checked&&(cc="\u904a\u6232");a.elements.type[2].checked&&(cc="\u6f2b\u756b");a.elements.type[1].checked&&(cc="\u52d5\u756b");a.elements.type[3].checked&&(cc="\u8f15\u5c0f\u8aaa");a.elements.type[4].checked&&(cc="\u4e00\u822c\u540d\u8a5e");return confirm("\u76ee\u524d\u60a8\u5c07\u5efa\u7acb["+cc+"] "+a.title.value+"\n\u8acb\u554f\u662f\u5426\u78ba\u5b9a\uff1f")?
(postdata("createNew1.php","title="+encodeURIComponent(a.title.value)+"&type="+a.type[t].value+"&machine="+m+"&dsource="+encodeURIComponent(a.dsource.value),"resmsg"),!0):!1}
function choose(a){document.getElementById("t11").style.display="none";document.getElementById("t21").style.display="none";document.getElementById("t22").style.display="none";document.getElementById("t23").style.display="none";switch(a){case 1:document.getElementById("t11").style.display="";break;case 2:document.getElementById("t21").style.display="",document.getElementById("t22").style.display="",document.getElementById("t23").style.display=""}egg.lightbox.refresh()}
function choose2(a){document.getElementById("t3").style.display="none";switch(a){case 2:document.getElementById("t3").style.display=""}egg.lightbox.refresh()}
function ckdata08_0805_2(a){if(a.elements.t[0].checked){if(""==a.upf1.value||0==a.upf1.value)return alert("\u8acb\u9078\u64c7\u8981\u4e0a\u50b3\u7684\u5716\u7247\u6a94\u6848\u3002"),!1;for(var b=1;6>=b;b++)if(30<a.elements["desc"+b].value.length)return alert("\u8acb\u6982\u7565\u8aaa\u660e\u6b64\u5716\u7247\u5167\u5bb9\u4e14\u6587\u5b57\u9650\u523630\u5b57\u5167\u3002"),!1;ft=a.elements.t[0].value}else if(a.elements.t[1].checked){ss=a.ul.value;if(""==ss||0==ss)return alert("\u8acb\u586b\u5beb\u5f71\u7247\u9023\u7d50\u3002"),
!1;if(!(ss.match(/^http[s]:\/\/[^\.]+.youtube.com/)||ss.match(/^http[s]:\/\/youtube.com/)||ss.match(/^http[s]:\/\/youtu\.be\//)))return alert("\u5f71\u7247\u76ee\u524d\u50c5\u63d0\u4f9b\u9023\u7d50YOUTUBE\u5f71\u97f3\u7db2\u7ad9\u3002"),!1;if(30<a.pdc.value.length)return alert("\u8acb\u6982\u7565\u8aaa\u660e\u6b64\u5f71\u7247\u5167\u5bb9\u4e14\u6587\u5b57\u9650\u523630\u5b57\u5167\u3002"),!1;if(0>ckradio(a.me,"\u8acb\u4e0a\u50b3\u7e2e\u5716\uff0c\u6216\u4f7f\u7528\u9810\u8a2d\u7e2e\u5716\u3002"))return!1;
fme=a.elements.me[0].value;if(a.elements.me[1].checked){if(""==a.f2.value||0==a.f2.value)return alert("\u8acb\u9078\u64c7\u8981\u4e0a\u50b3\u7684\u5f71\u7247\u7e2e\u5716\u6a94\u6848\u3002"),!1;fme=a.elements.me[1].value}ft=a.elements.t[1].value}else return alert("\u8acb\u9078\u64c7\u4e0a\u50b3\u985e\u578b\u3002"),!1;confirm("\u78ba\u5b9a\u8981\u4e0a\u50b3?")&&a.submit();return!1}
function cropper(a,b){$.thumbUploader({uploadAction:"/ajax/thumbCropper1.php",cropperAction:"/ajax/thumbCropper2.php",size:240,param:"s="+a+"&pos=acg_detail_cover",success:function(a){alert(a)}})}function doLogin(a){setCookieNew("ckFrom","http://acg.gamer.com.tw/"+a,"gamer.com.tw","/");location.href="https://user.gamer.com.tw/login.php"}
function getUploadPicLayout(a,b){$.ajax({url:"/ajax/picNew1.php",success:function(a){$.lightbox.open(a,{css:{"text-align":"left","font-size":"10pt",width:"415px"},className:"open_win"})},param:"s="+a+"&t="+b,method:"GET"})}function toggleMore(){"none"==$("#tblMore").css("display")?$("#tblMore,#tblMoreLabel").show():$("#tblMore,#tblMoreLabel").hide();egg.lightbox.refresh()}
function guildAgree(a){var b;b='<div style="padding:0;" align="left"><b>\u5275\u7acb\u689d\u4ef6\uff1a</b><ol style="list-style-type:decimal;padding-left:40px;"><li>\u9700\u6301\u6709\u624b\u6a5f\u8a8d\u8b49\u3002</li><li>\u9700\u82b1\u8cbb\u5df4\u5e631000\u5143\u3002</li>';b+="<li>\u4e00\u4eba\u6700\u591a\u540c\u6642\u64d4\u4efb 3 \u500b\u6703\u9577\u8077\u3002</li>";b+="<li>\u8fd1\u671f\u56e0\u9055\u898f\u88ab\u8655\u5206\u8005\uff0c\u6703\u88ab\u9650\u671f\u7981\u6b62\u958b\u8a2d\uff0c\u4e00\u9031\u4ee5\u5167\uff1a\u4e00\u500b\u6708\u3001\u5169\u9031\uff1a\u4e09\u500b\u6708\u3001\u4e09\u9031\u4ee5\u4e0a\uff1a\u534a\u5e74\u3002</li>";
b+='</ol><br><b>\u6ce8\u610f\u4e8b\u9805\uff1a</b><ol style="list-style-type:decimal;padding-left:40px;">';b+="<li>\u516c\u6703(\u793e\u5718)\u4e2d\u6240\u767c\u4f48\u4e4b\u5167\u5bb9\u9700\u9075\u5faa\u5df4\u54c8\u59c6\u7279\u7ad9\u898f\u898f\u7bc4\u3002</li>";b+="<li>\u516c\u6703(\u793e\u5718)\u5c6c\u81ea\u6cbb\u5718\u9ad4\uff0c\u6703\u9577\u6709\u6b0a\u6c7a\u5b9a\u4efb\u4f55\u4e8b\u9805\u3002</li>";b+="<li>\u516c\u6703(\u793e\u5718)\u4e2d\u82e5\u542b\u6709\u84c4\u610f\u6311\u8d77\u5c0d\u7acb\u3001\u8ab9\u8b17\u3001\u4eba\u8eab\u653b\u64ca\u4e4b\u5167\u5bb9\uff0c\u7ad9\u65b9\u6709\u6b0a\u529b\u4e2d\u6b62\u5176\u71df\u904b\u3002</li>";
b+="<li>\u7981\u6b62\u5efa\u7acb\u653f\u6cbb\u985e\u578b\u4e4b\u516c\u6703(\u793e\u5718)\u3002</li>";b+="<li>\u82e5\u9047\u7279\u6b8a\u60c5\u6cc1\uff0c\u7ad9\u65b9\u6709\u6b0a\u529b\u96a8\u6642\u4e2d\u6b62\u4efb\u4f55\u516c\u6703(\u793e\u5718)\u4e4b\u71df\u904b\u3002</li>";b+="<li>\u82e5\u9047\u4e0d\u53ef\u9810\u671f\u7684\u932f\u8aa4\uff0c\u53ef\u80fd\u6703\u7121\u6cd5\u4fdd\u969c\u516c\u6703(\u793e\u5718)\u4e2d\u5167\u5bb9\uff0c\u8acb\u81ea\u884c\u5099\u4efd\u91cd\u8981\u8cc7\u6599\u3002</li>";
b+="</ol></div>";egg.mutbox(b,"\u8aaa\u660e",{"\u6211\u540c\u610f":function(){egg.lightbox.close();guildNew(a)},"\u96e2\u958b":function(){egg.lightbox.close()}},{closeButton:!1})}function guildNew(a){$.ajax({url:"/ajax/guildNew1.php",param:"acg_sn="+a,method:"GET",success:function(a){$.lightbox.open(a)}})};