var XYX=function(){};XYX.listen={offTop:100,interval:100,topInterval:null,onScrollTop:function(b,a){this.topInterval=window.setInterval(function(){var c=XYX.pop.GetBrowserDocument().scrollTop;if(c>XYX.listen.offTop){a();window.clearInterval(XYX.listen.topInterval)}},this.interval)}};XYX.util={getRadio:function(c){var b=document.getElementsByName(c);for(var a=0;a<b.length;a++){if(b[a].checked){return b[a]}}return null},getCheckboxValue:function(a){var d=document.getElementsByName(a);var c="";for(var b=0;b<d.length;b++){if(d[b].checked){c+=d[b].value+" "}}return c.trim()},gotoUrl:function(a){self.location.href=a},fadeout:function(a){var d=100;var c;function b(){if(isIE){a.style.filter="Alpha(opacity="+d+")"}else{c=d/100;a.style.opacity=c}d-=10;if(d>=0){setTimeout(b,80)}}b()}};XYX.pop={confirm_modal:function(e,a){var d;var c=function(){d.hide()};var b=arguments.length;if(b==2){var d=(new pop_dialog).show_choice(e,a,"确定",c)}else{if(b==3){var d=(new pop_dialog).show_choice(e,a,"确定",arguments[2],"取消",c)}else{if(b==4){var d=(new pop_dialog).show_choice(e,a,"确定",arguments[2],"取消",arguments[3])}}}d.make_modal()},alert:function(d,a){var b=arguments.length;var e;if(b==2){e=function(){c.hide()}}else{e=arguments[2]}var c=(new pop_dialog).show_choice(d,a,"确定",e);this.modal(c)},modal:function(a){a.make_modal();$("generic_dialog_overlay").style.height=this.GetBrowserDocument().scrollHeight+"px"},confirm:function(c,d,a){var b=new contextual_dialog();b.set_context(c);b.show_choice(d,"","确定",function(){a.call(this);generic_dialog.get_dialog(this).hide()},"取消",function(){generic_dialog.get_dialog(this).hide()})},GetBrowserDocument:function(){var d=document.documentElement.clientHeight;var a=document.documentElement.offsetHeight;var b=document.body.clientHeight;var c=document.body.offsetHeight;if(d==0){return document.body}if(d==a){return document.documentElement}if(b==c&&d!=0){return document.documentElement}else{return document.body}}};XYX.pk={del:function(a,b){XYX.pop.confirm(a,"确定要删除该挑战吗？",function(){var c="/userAjax.php";var d="method=del&pk_id="+b;new Ajax.Request(c,{method:"post",parameters:d,onComplete:function(e){Element.remove("xyx_letter_"+b)}})})},modiTo:function(c,d){var a="/userAjax.php";var b="method=modiTo&pk_id="+d;new Ajax.Request(a,{method:"post",parameters:b,onComplete:function(e){Element.remove("xyx_letter2_"+d)}})},modiFrom:function(c,d){var a="/userAjax.php";var b="method=modiFrom&pk_id="+d;new Ajax.Request(a,{method:"post",parameters:b,onComplete:function(e){Element.remove("xyx_letter3_"+d)}})},delMede:function(c,d){var a="/userAjax.php";var b="method=delMede&mede_id="+d;new Ajax.Request(a,{method:"post",parameters:b,onComplete:function(e){Element.remove("xyx_letter4_"+d)}})}};var isIE=/msie/i.test(navigator.userAgent);function changeTab(d,c,a){if(a==null){var a=3}for(var b=1;b<a;b++){if((b==d)&&($(c+"_list_"+d))){$(c+"_list_"+b).style.display="block";$(c+"_tab_"+b).className="select";setTimeout(function(){iframeResize()},200)}else{$(c+"_list_"+b).style.display="none";$(c+"_tab_"+b).className="";setTimeout(function(){iframeResize()},300)}}}function ms_rank_action(d){var f=document.getElementById(d).getElementsByTagName("li");for(var e=0,a=f.length;e<a;e++){var c=a;var g;var h=f[e];var b=parseInt(h.className.substr(4));if(h.className!="rank_pos"&&b>3){if(b==4){g=e}h.onmouseover=function(){for(var i=g;i<c;i++){var o=f[i].childNodes;for(var s=0,p=o.length;s<p;s++){if(o[s].nodeType==1&&o[s].className=="rank_li_block_div"&&o[s].style.display=="none"){o[s].style.display=""}if(o[s].nodeType==1&&o[s].className=="rank_li_box_div"&&o[s].style.display==""){o[s].style.display="none"}}}var q=this.childNodes;for(var k=0,l=q.length;k<l;k++){if(q[k].nodeType==1&&q[k].className=="rank_li_block_div"&&q[k].style.display==""){q[k].style.display="none"}else{if(q[k].nodeType==1&&q[k].className=="rank_li_box_div"&&q[k].style.display=="none"){q[k].style.display=""}}}}}}}function iecompattest(){return(document.compatMode&&document.cmpatMode!="BackCompat")?document.documentElement:document.body}function div_disabled_all(b){var a=document.createElement("div");a.className="div_disabled_all";a.id=b;a.style.height=iecompattest().scrollHeight+200+"px";document.body.appendChild(a)}function div_enable_all(a){Element.remove(a)}var popup=null;function show_popup(b){if(popup!=null){popup.hide()}var a="";if(arguments[1]!="undefined"&&arguments[1]!=null){a+=arguments[1]}popup=new pop_dialog("xyx_popup_"+a);if(arguments.length>1){div_disabled_all("xyx_div_overlay");popup.show_ajax_dialog("/userAjax.php?uid="+b+"&method="+arguments[1])}else{popup.show_ajax_dialog("/userAjax.php?uid="+b)}}function close_popup(){if($("xyx_div_overlay")){div_enable_all("xyx_div_overlay")}if(popup!=null){popup.hide();popup=null}}function show_pk_pop(a){div_disabled_all("xyx_div_overlay");if(popup!=null){popup.hide()}popup=new pop_dialog("xyx_pk_popup");popup.show_ajax_dialog("/userAjax.php?method=dialog&game_id="+a)}function close_pk_pop(){if($("xyx_div_overlay")){div_enable_all("xyx_div_overlay")}if(popup!=null){popup.hide();popup=null}}function yalinShowPage(b,e,d,a,c){yalinPage(b,e,d,page_dw(a,c,e))}function yalinPage(c,g,f,b){var d=c%f;var h=c-d;var e,a="chn";if(d==0){e=h/f}else{e=h/f+1}if(e>1&&e<7){if(g>0){b.call(this,'<a title="上一页" href="#nogo" class="'+a+'">&lt; 上一页</a>',g-1)}if(g>4){b.call(this,'<a title="跳到第'+(g-4)+'页" href="#nogo" class="'+a+'">'+(g-4)+"</a>",g-5)}if(g>3){b.call(this,'<a title="跳到第'+(g-3)+'页" href="#nogo" class="'+a+'">'+(g-3)+"</a>",g-4)}if(g>2){b.call(this,'<a title="跳到第'+(g-2)+'页" href="#nogo" class="'+a+'">'+(g-2)+"</a>",g-3)}if(g>1){b.call(this,'<a title="跳到第'+(g-1)+'页" href="#nogo" class="'+a+'">'+(g-1)+"</a>",g-2)}if(g>0){b.call(this,'<a title="跳到第'+(g-0)+'页" href="#nogo" class="'+a+'">'+(g-0)+"</a>",g-1)}b.call(this,'<a href="#nogo">'+(g+1)+"</a>",g);if(g<e-1){b.call(this,'<a title="跳到第'+(g+2)+'页" href="#nogo" class="'+a+'">'+(g+2)+"</a>",g+1)}if(g<e-2){b.call(this,'<a title="跳到第'+(g+3)+'页" href="#nogo" class="'+a+'">'+(g+3)+"</a>",g+2)}if(g<e-3){b.call(this,'<a title="跳到第'+(g+4)+'页" href="#nogo" class="'+a+'">'+(g+4)+"</a>",g+3)}if(g<e-4){b.call(this,'<a title="跳到第'+(g+5)+'页" href="#nogo" class="'+a+'">'+(g+5)+"</a>",g+4)}if(g<e-5){b.call(this,'<a title="跳到第'+(g+6)+'页" href="#nogo" class="'+a+'">'+(g+6)+"</a>",g+5)}if(g<e-1){b.call(this,'<a title="下一页" href="#nogo" class="'+a+'">下一页&gt;</a>',g+1)}}if(e>6){if((g>-1)&&(g<e-3)){if(g>2){b.call(this,'<a title="第一页" href="#nogo" class="'+a+'">&laquo; 第一页</a>',0);b.call(this,'<span class="break">...</span>',-1)}if(g>0){b.call(this,'<a title="上一页" href="#nogo" class="'+a+'">&lt; 上一页</a>',g-1)}if(g>1){b.call(this,'<a title="跳到第'+(g-1)+'页" href="#nogo" class="'+a+'">'+(g-1)+"</a>",g-2)}if(g>0){b.call(this,'<a title="跳到第'+g+'页" href="#nogo" class="'+a+'">'+(g)+"</a>",g-1)}b.call(this,'<a href="#nogo">'+(g+1)+"</a>",g);b.call(this,'<a title="跳到第'+(g+2)+'页" href="#nogo" class="'+a+'">'+(g+2)+"</a>",g+1);b.call(this,'<a title="跳到第'+(g+3)+'页" href="#nogo" class="'+a+'">'+(g+3)+"</a>",g+2);if(g<2){b.call(this,'<a title="跳到第'+(g+4)+'页" href="#nogo" class="'+a+'">'+(g+4)+"</a>",g+3)}if(g<1){b.call(this,'<a title="跳到第'+(g+5)+'页" href="#nogo" class="'+a+'">'+(g+5)+"</a>",g+4)}b.call(this,'<a title="下一页" href="#nogo" class="'+a+'">下一页 &gt;</a>',g+1);b.call(this,'<span class="break">...</span>',-1);b.call(this,'<a title="最后页" href="#nogo" class="'+a+'">最后页 &raquo;</a>',e-1)}if((g<e)&&(g>e-4)){b.call(this,'<a title="第一页" href="#nogo" class="'+a+'">&laquo; 第一页</a>',0);b.call(this,'<span class="break">...</span>',-1);b.call(this,'<a title="上一页" href="#nogo" class="'+a+'">&lt; 上一页</a>',g-1);if(g>e-2){b.call(this,'<a title="跳到第'+(g-3)+'}页" href="#nogo" class="'+a+'">'+(g-3)+"</a>",g-4)}if(g>e-3){b.call(this,'<a title="跳到第'+(g-2)+'}页" href="#nogo" class="'+a+'">'+(g-2)+"</a>",g-3)}b.call(this,'<a title="跳到第'+(g-1)+'页" href="#nogo" class="'+a+'">'+(g-1)+"</a>",g-2);b.call(this,'<a title="跳到第'+(g)+'页" href="#nogo" class="'+a+'">'+(g)+"</a>",g-1);b.call(this,'<a href="#nogo">'+(g+1)+"</a>",g);if(g<e-1){b.call(this,'<a title="跳到第'+(g+2)+'页" href="#nogo" class="'+a+'">'+(g+2)+"</a>",g+1)}if(g<e-2){b.call(this,'<a title="跳到第'+(g+3)+'页" href="#nogo" class="'+a+'">'+(g+3)+"</a>",g+2)}if(g<e-1){b.call(this,'<a title="下一页" href="#nogo" class="'+a+'">下一页 &gt;</a>',g+1)}if(g<e-3){b.call(this,'<span class="break">...</span>',-1);b.call(this,'<a title="最后页" href="#nogo" class="'+a+'">最后页 &raquo;</a>',e-1)}}}}function page_dw(a,b,c){return function(f,e){var d=document.createElement("li");d.innerHTML=f;if(e==c){d.className="current"}else{if(e!=-1){Event.observe(d,"click",b.call(this,e),false)}}a.appendChild(d)}}function search_game(c,f){var e=parseInt(c.substr(5));var d=$("xyx_tab_cat").getElementsByTagName("li");for(var a=0;a<d.length;a++){d[a].className="";if(a==e){d[a].className="select"}}curpage=0;xyx_cate=c;var b=new xyx_search_game();b.search(f)}function xyx_search_game(){this.curpage=curpage;this.xyx_cate=xyx_cate}xyx_search_game.prototype.search=function(b){var a="/indexAjax.php";if(b){a=b}$("xyx_loading_div").style.display="";new Ajax.Request(a,{method:"get",parameters:"method=index_ajax&xyx_cate="+this.xyx_cate+"&curpage="+this.curpage,onSuccess:function(c){set_inner_html($("xyx_gamelist_div"),c.responseText)}})};var xyx_page_change=function(a){return function(){curpage=a;var b=new xyx_search_game();b.search()}};function xyx_show_page(e,f,d){var c=$("page_bar");var a=$("page_bar_bottom");var b=document.createElement("ol");var g=document.createElement("ol");b.className="pagerpro";g.className="pagerpro";yalinShowPage(e,f,d,b,xyx_page_change);yalinShowPage(e,f,d,g,xyx_page_change);c.appendChild(b);a.appendChild(g)}function zyl_display_ajax_content(target,str){target.innerHTML=str;_r=target.getElementsByTagName("script");for(j=0;j<_r.length;j++){eval(_r[j].innerHTML)}}function copyToClipBoard(a){var b="我发现开心网的"+a+"很好玩，呵呵^_^：\n";b+=$("xyx_share_input").value;$("xyx_share_input").select();if(isIE){window.clipboardData.setData("Text",b);alert("已经复制成功，请粘贴此链接发送给你的好友吧^_^")}else{alert("请用CTRL+C来复制此链接发送给你的好友吧^_^")}}function fullScreenGame(l,a,m,o){var i=$("wbgame");var k=i.parentNode;var g=i.cloneNode(true);div_disabled_all("xyx_div_overlay");var f=m+20;var e=iecompattest().clientHeight;$("xyx_div_overlay").style.height=e+"px";iecompattest().style.overflow="hidden";var c=document.createElement("div");c.className="generic_dialog";var n=new Image();n.src="img/xyx_fullscreen_close.png";n.style.position="absolute";n.style.zIndex="2000";n.style.top="50px";n.style.right="50px";n.style.cursor="pointer";n.onclick=function(){if($("xyx_div_overlay")){div_enable_all("xyx_div_overlay")}document.body.removeChild(c);iecompattest().style.overflow="auto";k.appendChild(g);document.body.removeChild(this)};document.body.appendChild(c);document.body.appendChild(n);c.innerHTML='<div class="generic_dialog_popup"><table class="pop_dialog_table" id="xyx_fullscreen_table"><tr><td class="pop_topleft"></td><td class="pop_border"></td><td class="pop_topright"></td></tr><tr><td class="pop_border"></td><td class="pop_content"><div id="wbgame_fullscreen" style="background-color:'+o+'"></div></td><td class="pop_border"></td></tr><tr><td class="pop_bottomleft"></td><td class="pop_border"></td><td class="pop_bottomright"></td></tr></table></div>';var d=_u;var b=m;if(f>e){b=e-20}var h=new SWFObject(d,l,a,b,"9","#ffffff");h.addParam("wmode","transparent");h.addParam("scale","noborder");h.addParam("menu",false);h.addParam("allowScriptAccess","sameDomain");h.write("wbgame_fullscreen");if(f<e){c.style.top=iecompattest().scrollTop+Math.floor((e-f)/2)+"px"}else{iecompattest().scrollTop=0;c.style.top="0px"}k.removeChild(i)}XYX.answer={comment:function(game_id){var a="";a+="game="+game_id;var repted_uid=document.getElementById("repted_uid");a+="&repted_uid="+repted_uid.value;a+="&content="+encodeURIComponent(document.getElementById("game_comment").value);new XN.NET.xmlhttp("/reply.php?method=comment",a,function(o){var d=o.responseText;eval("var r="+d+";");if(r.result!=true){XYX.pop.alert("错误",r.msg)}else{document.getElementById("game_comment").value="";var id=r.id;var reply_uid=r.reply_uid;var reply_name=r.reply_name;var reply_url=r.reply_url;var honor_level=r.honor_level;var addtime=r.addtime;var content=r.content;var div=document.createElement("div");div.id="comment_"+id;div.className="comment clearfix";var text="";text+='<div class="actor-img">';text+='<a href="#nogo" style="background-image: url('+reply_url+');" onclick="show_popup('+reply_uid+');"></a></div>';text+='<div class="cmt-body"><div class="info"><span class="author">';text+='<a title="点击人名查看" href="#nogo" onclick="show_popup('+reply_uid+');">'+reply_name+"</a></span>";text+='<span class="level">'+honor_level+'</span><span class="time">'+addtime+"</span>";text+='<div class="actions"><a href="#nogo" onclick="XYX.answer.dele(this,'+id+');" class="r" style="padding-right:19px;">删除</a></div></div>';text+='<div class="text-content">'+content+"</div></div>";div.innerHTML=text;var pd=document.getElementById("user_comments");pd.insertBefore(div,pd.firstChild);XYX.answer.YFT(div)}})},dele:function(b,a){XYX.pop.confirm(b,"确定要删除该回复吗？",function(){var c="/reply.php";var d="method=del&reply_id="+a;new Ajax.Request(c,{method:"post",parameters:d,onComplete:function(e){var f=document.getElementById("comment_"+a);XYX.answer.YFT(f);setTimeout(function(){Element.remove("comment_"+a)},500)}})})},goTop:function(b,a){XYX.pop.confirm(b,"确定要顶这条留言吗？",function(){var c="/reply.php";var d="method=goTop&reply_id="+a;new Ajax.Request(c,{method:"post",parameters:d,onComplete:function(e){var f=document.getElementById("comment_"+a);f.parentNode.insertBefore(f,f.parentNode.firstChild);XYX.answer.YFT(f)}})})},reply:function(a,b){document.getElementById("repted_uid").value=a;document.getElementById("game_comment").focus();document.getElementById("game_comment").value="回复"+b+"："},YFT:function(c){var a=155;function d(){c.style.background="rgb(255,255,"+(a+=4)+")";if(a<255){setTimeout(d,40)}}d()},chkAnswerEnter:function(a){var a=a?a:event;if(a&&a.keyCode==13&&a.ctrlKey){$("xyx_answer_btn").click()}}};function xyx_copylink(b,c,d){var a="我发现开心网的"+b+"很好玩，呵呵^_^：\n";a+=c.value;XN.Browser.copy(a);c.select();$(d).style.display="block";setTimeout(function(){$(d).hide("fade")},2500)}var ranklist_loaded=false;var franklist_loaded=false;var score_ranklist_loaded=false;var score_franklist_loaded=false;XYX.key={open:function(game_id){var url="/upload/plugins.php";var pars="method=unlock&game="+game_id;new Ajax.Request(url,{method:"post",parameters:pars,onComplete:function(o){var d=o.responseText;eval("var r="+d+";");if(r.result!=true){XYX.pop.alert("钥匙不够","对不起，钥匙不够，你可以通过邀请好友来获得钥匙。")}else{XYX.util.gotoUrl("/upload/detail.php?game="+game_id)}}})},mede:function(c){var a="/indexAjax.php";var b="method=mede&v="+c;new Ajax.Request(a,{method:"get",parameters:b,onComplete:function(d){set_inner_html($("xyx_feedlist_div"),d.responseText)}})},ad:function(a){var b="/indexAjax.php";var c="method=ad&v=1"+a;new Ajax.Request(b,{method:"get",parameters:c,onComplete:function(d){set_inner_html($("xn_xyx_game_ad"),d.responseText)}})},game:function(a){var b="/indexAjax.php";var c="method=key&v=1"+a;new Ajax.Request(b,{method:"get",parameters:c,onComplete:function(d){set_inner_html($("xyx_classicgame"),d.responseText)}})},fwar:function(c){var a="/indexAjax.php";var b="method=fwar&v="+c;new Ajax.Request(a,{method:"get",parameters:b,onComplete:function(d){set_inner_html($("xyx_friends_gaming"),d.responseText)}})},requestRanklist:function(){if(ranklist_loaded==true){return}var a="/indexAjax.php";var b="method=rank_ajax";new Ajax.Request(a,{method:"get",parameters:b,onSuccess:function(c){$("rank_list_1").innerHTML=c.responseText;ms_rank_action("rank_list_1");ranklist_loaded=true;setTimeout(function(){iframeResize()},100)}})},requestFranklist:function(c){if(franklist_loaded==true){return}var a="/indexAjax.php";var b="method=frank_ajax&uid="+c;new Ajax.Request(a,{method:"get",parameters:b,onSuccess:function(d){$("rank_list_2").innerHTML=d.responseText;ms_rank_action("rank_list_2");franklist_loaded=true;setTimeout(function(){iframeResize()},100)}})},checkPk:function(c){var a="/userAjax.php";var b="method=checkPK&uid="+c;new Ajax.Request(a,{method:"get",parameters:b,onComplete:function(f){var e=f.responseText;if(e==1){show_popup(c,"getpkinfo")}}})},recommend:function(a){var b="/upload/plugins.php";var c="method=recommend&v=1"+a;new Ajax.Request(b,{method:"get",parameters:c,onComplete:function(d){set_inner_html($("xyx_rec_games_div"),d.responseText)}})},prevnext:function(a){var b="/upload/plugins.php";var c="method=prev_next&medal_id="+a;new Ajax.Request(b,{method:"get",parameters:c,onComplete:function(d){set_inner_html($("game_prev_next_div"),d.responseText)}})},requestScoreRanklist:function(a){if(score_ranklist_loaded==true){return}var b="/upload/plugins.php";var c="method=rank_ajax&game="+a;new Ajax.Request(b,{method:"get",parameters:c,onSuccess:function(d){$("rank_list_1").innerHTML=d.responseText;ms_rank_action("rank_list_1");score_ranklist_loaded=true}})},requestScoreFranklist:function(a,d){if(score_franklist_loaded==true){return}var b="/upload/plugins.php";var c="method=frank_ajax&game="+a+"&uid="+d;new Ajax.Request(b,{method:"get",parameters:c,onSuccess:function(e){$("rank_list_2").innerHTML=e.responseText;ms_rank_action("rank_list_2");score_franklist_loaded=true;setTimeout(function(){iframeResize()},200)}})},comments:function(a){var b="/upload/plugins.php";var c="method=comments&game="+a;new Ajax.Request(b,{method:"get",parameters:c,onComplete:function(d){set_inner_html($("user_comments"),d.responseText)}})},change:function(d){var c=document.getElementById("checkCount_input").value;if(c>d){close_popup();XYX.pop.alert("兑换钥匙","对不起，你的开心果不够。");return}else{var a="/user.php";var b="method=changeKey&pistachio="+c;new Ajax.Request(a,{method:"post",parameters:b,onComplete:function(f){var e=f.responseText;if(e==1){close_popup();XYX.pop.alert("兑换钥匙","兑换成功，游戏愉快！")}else{if(e==0){close_popup();XYX.pop.alert("兑换钥匙","系统错误，兑换失败！")}else{if(e==2){close_popup();XYX.pop.alert("兑换钥匙","对不起，你的开心果不够。")}}}}})}},confirmGift:function(){div_enable_all("xyx_div_overlay");popup.hide();var a="/userAjax.php";var b="method=confirm";new Ajax.Request(a,{method:"get",parameters:b,onComplete:function(c){}})},drawGift:function(){popup.hide();var a="/userAjax.php";var b="method=drawGift";new Ajax.Request(a,{method:"get",parameters:b,onComplete:function(c){popup.show_choice("温馨提示","领取成功！","确定",function(){div_enable_all("xyx_div_overlay");popup.hide()})}})},checkHead:function(){var a="/userAjax.php";var b="method=checkHead";new Ajax.Request(a,{method:"get",parameters:b,onComplete:function(e){var c=e.responseText;if(c==1){XN.Dom.disable(0.5);XN.DO.confirm('<div class="actual_photo_pop"><h3>好消息：星级用户享有以下尊贵特权</h3><ul><li>1.星级用户每天登陆赠送10牛粪</li><li>2.部分热门游戏只有星级用户才能玩</li></ul><p>立刻成为星级用户？</p></div>',"温馨提示",function(d){if(d){toChangePhotoNew()}})}}})},checkHeadGame:function(a){if(a==3){var b="/userAjax.php";var c="method=checkHeadGame";new Ajax.Request(b,{method:"get",parameters:c,onComplete:function(g){var f=g.responseText;if(f==1){XN.Dom.disable(0.5);var e=XN.DO.alert('<div class="actual_photo_pop"><h3>本游戏只有星级用户才可以玩</h3><p><input type="button" value="立即上传，开始玩游戏" class="input-submit" onclick="toChangePhoto();" />&nbsp;&nbsp;<input type="button" value="返回" class="input-submit" onclick="toXyxHome();" /></p></div>',"温馨提示");e.footer.hide()}}})}}};function popGiftFirst(){div_disabled_all("xyx_div_overlay");popup=new pop_dialog();popup.show_choice("温馨提示",'<div class="xyx_pop_gift_body"><div class="xyx_pop_gift_header"><h3>恭喜你，获得一个大礼包！</h3><p>请 <span class="corange">明天</span> 准时过来领取。</p></div><div class="xyx_pop_gift_tip">礼包中有限量的钥匙，牛粪等着您来领取哦......<div class="text_right corange">等着你明天来拿哦！</div></div></div>',"知道了",function(){XYX.key.confirmGift()})}function popGiftNext(){div_disabled_all("xyx_div_overlay");popup=new pop_dialog();popup.show_choice("温馨提示",'<div class="xyx_pop_gift"><h3>欢迎你回来领取大礼包</h3><div class="xyx_pop_gift_pic"></div></div>',"领取",function(){XYX.key.drawGift()})}function toChangePhoto(){parent.window.location="http://head.upload.kaixin.com/Upload.do?from=xyx"}function toChangePhotoNew(){parent.window.open("http://head.upload.kaixin.com/Upload.do?from=xyx")}function toXyxHome(){window.location="http://xyx.kaixin.com"}window.onload=function(){iframeResize()};var Marquee=function(){this.ID=document.getElementById(arguments[0]);this.Direction=arguments[1];this.Step=arguments[2];this.BakStep=arguments[2];this.Width=arguments[3];this.HalfWidth=Math.round(arguments[3]/2);this.Height=arguments[4];this.Timer=arguments[5];this.DelayTime=arguments[6];this.WaitTime=arguments[7];if(arguments[8]||arguments[8]==0){this.ScrollStep=arguments[8]}else{this.ScrollStep=this.Direction>1?this.Width:this.Height}this.Correct=0;this.CTL=0;this.StartID=0;this.Stop=0;this.MouseOver=0;this.ID.style.overflow="hidden";this.ID.style.overflowX="hidden";this.ID.style.overflowY="hidden";this.ID.noWrap=true;this.ID.style.width=this.Width+"px";this.ID.style.height=this.Height+"px";this.ClientScroll=this.Direction>1?parseInt(this.ID.scrollWidth):parseInt(this.ID.scrollHeight);this.ID.innerHTML+=this.ID.innerHTML;this.IsNotOpera=(navigator.userAgent.toLowerCase().indexOf("opera")==-1);if(arguments.length>=8){this.Start(this,this.Timer,this.DelayTime,this.WaitTime)}};Marquee.prototype.Start=function(c,d,a,b){c.StartID=function(){c.Scroll()};c.Continue=function(){if(c.MouseOver==1){setTimeout(c.Continue,a)}else{clearInterval(c.TimerID);c.CTL=0;c.Stop=0;c.TimerID=setInterval(c.StartID,d)}};c.Pause=function(){c.Stop=1;clearInterval(c.TimerID);setTimeout(c.Continue,a)};c.Begin=function(){c.ID.onmousemove=function(e){if(c.ScrollStep==0&&c.Direction>1){var f=null;if(window.event){f=window.event;if(c.IsNotOpera){c.EventLeft=f.srcElement.id==c.ID.id?parseInt(f.offsetX)-parseInt(c.ID.scrollLeft):parseInt(f.srcElement.offsetLeft)-parseInt(c.ID.scrollLeft)+parseInt(f.offsetX)}else{c.ScrollStep=null;return}}else{f=e;c.EventLeft=parseInt(f.layerX)-parseInt(c.ID.scrollLeft)}c.Direction=c.EventLeft>c.HalfWidth?3:2;c.AbsCenter=Math.abs(c.HalfWidth-c.EventLeft);c.Step=Math.round(c.AbsCenter*(c.BakStep*2)/c.HalfWidth)}};c.ID.onmouseover=function(){if(c.ScrollStep==0){return}c.MouseOver=1;clearInterval(c.TimerID)};c.ID.onmouseout=function(){if(c.ScrollStep==0){if(c.Step==0){c.Step=1}return}c.MouseOver=0;if(c.Stop==0){clearInterval(c.TimerID);c.TimerID=setInterval(c.StartID,d)}};c.TimerID=setInterval(c.StartID,d)};setTimeout(c.Begin,b)};Marquee.prototype.Scroll=function(){if(this.Correct==0&&this.CTL>this.ClientScroll){this.ClientScroll=(this.Direction>1)?Math.round(parseInt(this.ID.scrollWidth)/2):Math.round(parseInt(this.ID.scrollHeight)/2);this.Correct=1}switch(this.Direction){case 0:this.CTL+=this.Step;if(this.CTL>=this.ScrollStep&&this.DelayTime>0){this.ID.scrollTop+=(this.ScrollStep+this.Step-this.CTL);this.Pause();return}else{if(this.ID.scrollTop>=this.ClientScroll){this.ID.scrollTop-=this.ClientScroll}this.ID.scrollTop+=this.Step}break;case 1:this.CTL+=this.Step;if(this.CTL>=this.ScrollStep&&this.DelayTime>0){this.ID.scrollTop-=(this.ScrollStep+this.Step-this.CTL);this.Pause();return}else{if(this.ID.scrollTop<=0){this.ID.scrollTop+=this.ClientScroll}this.ID.scrollTop-=this.Step}break;case 2:this.CTL+=this.Step;if(this.CTL>=this.ScrollStep&&this.DelayTime>0){this.ID.scrollLeft+=(this.ScrollStep+this.Step-this.CTL);this.Pause();return}else{if(this.ID.scrollLeft>=this.ClientScroll){this.ID.scrollLeft-=this.ClientScroll}this.ID.scrollLeft+=this.Step}break;case 3:this.CTL+=this.Step;if(this.CTL>=this.ScrollStep&&this.DelayTime>0){this.ID.scrollLeft-=(this.ScrollStep+this.Step-this.CTL);this.Pause();return}else{if(this.ID.scrollLeft<=0){this.ID.scrollLeft+=this.ClientScroll}this.ID.scrollLeft-=this.Step}break;this.ID.scrollTop+="px";this.ID.scrollLeft+="px"}};function iframeResize(){var d=parent.document.getElementsByName("iframe_canvas")[0];var a=document.getElementById("container").scrollHeight+20;document.getElementById("container").style.overflow="hidden";var c="828px",b="846px";parent.document.getElementById("content").style.width=c;parent.document.getElementById("content").style.overflow="hidden";parent.document.getElementById("content").style.scroll="no";parent.document.getElementById("content").style.height=a+50+"px";if(d.scrollHeight>a){a=d.scrollHeight}d.style.height=a+"px";d.style.width=b;d.style.scroll="no";d.style.overflow="hidden";setTimeout(function(){d.style.height=a+"px";d.style.width=b;d.style.scroll="no";d.style.overflow="hidden"},100)}window.onload=function(){iframeResize()};