var freq=1;var sayth2=null;var girl="/bbsgirl/girl.gif";var Line=0;var DialogXML="/bbsgirl/dialog.xml";var hide=5;freq=getCookie("frequency");hide=getCookie("hide");if(getCookie("dialog")==2){DialogXML="/bbsgirl/dialog2.xml"}else if(getCookie("dialog")==3){DialogXML="/bbsgirl/dialog3.xml"}else{DialogXML="/bbsgirl/dialog.xml"}if(getCookie("girl")==2){girl="/bbsgirl/girl2.gif"}else if(getCookie("girl")==1){girl="/bbsgirl/girl.gif"}else if(getCookie("girl")==3){girl="/bbsgirl/girl3.gif"}else if(getCookie("girl")==0){girl=""}var jqDialog=new function(){this.strX='X';this.closeTimer=null;this.width=0;this.height=0;this.divBoxName='jqDialog_box';this.divBox=null;this.divContentName='jqDialog_content';this.divContent=null;this.divOptionsName='jqDialog_options';this.divOptions=null;this.btCloseName='jqDialog_close';this.btClose=null;this.inputName='jqDialog_input';this.input=null;this.content=function(content,close_seconds){this.createDialog(content);this.divOptions.hide()};this.notify=function(content,close_seconds){this.content(content);this.btClose.focus();if(close_seconds)this.closeTimer=setTimeout(function(){jqDialog.close()},close_seconds*1000)};this.createDialog=function(content){clearTimeout(this.closeTimer);this.divOptions.show();this.divContent.html(content);this.divBox.fadeIn('fast');this.maintainPosition()};this.close=function(){this.divBox.fadeOut('fast');this.clearPosition()};this.clearPosition=function(){test2=document.getElementById("jqDialog_box");test2.style.display="none"};this.maintainPosition=function(){jQuery(window).scroll(function(){})};this.init=function(){this.divBox=jQuery("<div>").attr({id:this.divBoxName});this.divContent=jQuery("<div>").attr({id:this.divContentName});this.divOptions=jQuery("<div>").attr({id:this.divOptionsName});this.btYes=jQuery("<button>").attr({id:this.btYesName}).append(document.createTextNode(this.strYes));this.btNo=jQuery("<button>").attr({id:this.btNoName}).append(document.createTextNode(this.strNo));this.btOk=jQuery("<button>").attr({id:this.btOkName}).append(document.createTextNode(this.strOk));this.btCancel=jQuery("<button>").attr({id:this.btCancelName}).append(document.createTextNode(this.strCancel));this.input=jQuery("<input>").attr({id:this.inputName});this.btClose=jQuery("<button>").attr({id:this.btCloseName}).append(document.createTextNode(this.strX)).click(function(){jqDialog.close()});this.divBox.append(this.btClose).append(this.divContent).append(this.divOptions.append(this.btYes).append(this.btNo).append(this.btOk).append(this.btCancel));this.divBox.hide();jQuery('body').append(this.divBox)}};jQuery(window).load(function(){jqDialog.init()});﻿var xmlDoc;var xmlhttp=null;if(window.ActiveXObject){try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}}else if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest()}function getxml(x){if(xmlhttp!=null){xmlhttp.open("GET",x,false);xmlhttp.send(null)}else{alert("Your browser does not support XMLHTTP.11");return false}return(xmlhttp)}function loadXMLDoc(x){if(window.ActiveXObject){xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async=false;xmlDoc.load(x);return(xmlDoc)}else if(window.XMLHttpRequest){xmlDoc=getxml(x).responseXML;return(xmlDoc)}else{alert("11Your browser does not support XMLHTTP.");return false}}jQuery(function(){function runEffect(){var selectedEffect=jQuery('#effectTypes').val();var options={};if(selectedEffect=='scale'){options={percent:0}}else if(selectedEffect=='size'){options={to:{width:200,height:60}}}jQuery("#effect").toggle(selectedEffect,options,500)};jQuery("#button").fixClick(function(){jqDialog.notify(control,5)},function(){runEffect();jqDialog.notify("",0.0000000000000001);return false})});function saysth(){xmlDoc=loadXMLDoc(DialogXML);MyXML=xmlDoc.getElementsByTagName("dialog");Temp=Math.random()*MyXML.length;Line=Math.floor(Temp);Xsayth=MyXML[Line].getElementsByTagName("content")[0].childNodes[0];sayth2=Xsayth.nodeValue;XCommand=xmlDoc.getElementsByTagName("dialogA");Command=XCommand[0].getElementsByTagName("control")[0].childNodes[0];control=Command.nodeValue;jqDialog.notify(sayth2,hide)}function lucky(){Xlucky=xmlDoc.getElementsByTagName("dialogB")[0].getElementsByTagName("luckycontent")[0].childNodes[0];lucky2=Xlucky.nodeValue;jqDialog.notify(lucky2,hide)}function luckyans(){Temp=Math.random()*12;Line=Math.floor(Temp);Xluckyans=xmlDoc.getElementsByTagName("dialogB")[0].getElementsByTagName("lucky")[Line].childNodes[0];luckyans2=Xluckyans.nodeValue;jqDialog.notify(luckyans2,hide)}function Xdown(){XXdown=XCommand[1].getElementsByTagName("control")[0].childNodes[0];Xdown2=XXdown.nodeValue;jqDialog.notify(Xdown2,hide)}function Xup(){XXup=XCommand[0].getElementsByTagName("control")[0].childNodes[0];Xup2=XXup.nodeValue;jqDialog.notify(Xup2,hide)}function ans1(){Xans1=MyXML[Line].getElementsByTagName("answer")[0].childNodes[0];txtans1=Xans1.nodeValue;jqDialog.notify(txtans1,hide)}function ans2(){Xans2=MyXML[Line].getElementsByTagName("answer")[1].childNodes[0];txtans2=Xans2.nodeValue;jqDialog.notify(txtans2,hide)}function ans3(){Xans3=MyXML[Line].getElementsByTagName("answer")[2].childNodes[0];txtans3=Xans3.nodeValue;jqDialog.notify(txtans3,hide)}function ans4(){Xans4=MyXML[Line].getElementsByTagName("answer")[3].childNodes[0];txtans4=Xans4.nodeValue;jqDialog.notify(txtans4,hide)}function ans5(){Xans5=MyXML[Line].getElementsByTagName("answer")[4].childNodes[0];txtans5=Xans5.nodeValue;jqDialog.notify(txtans5,hide)}function ans6(){Xans6=MyXML[Line].getElementsByTagName("answer")[5].childNodes[0];txtans6=Xans6.nodeValue;jqDialog.notify(txtans6,hide)}function setCookie(name,value){var Days=30;var exp=new Date();exp.setTime(exp.getTime()+Days*24*60*60*1000);document.cookie=name+"="+escape(value)+";expires="+exp.toGMTString()}function getCookie(name){var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));if(arr!=null)return unescape(arr[2]);return null}function delCookie(name){var exp=new Date();exp.setTime(exp.getTime()-1);var cval=getCookie(name);if(cval!=null)document.cookie=name+"="+cval+";expires="+exp.toGMTString()}function mora(){Xmora=xmlDoc.getElementsByTagName("dialogC")[0].getElementsByTagName("mora")[0].childNodes[0];mora2=Xmora.nodeValue;jqDialog.notify(mora2,hide)}function morans1(){Temp=Math.random()*3;Xmora=Math.floor(Temp);Xmorans1=xmlDoc.getElementsByTagName("scissor")[0].getElementsByTagName("scians")[Xmora].childNodes[0];XXmorans1=Xmorans1.nodeValue;jqDialog.notify(XXmorans1,hide)}function morans2(){Temp=Math.random()*3;Xmora=Math.floor(Temp);Xmorans2=xmlDoc.getElementsByTagName("rock")[0].getElementsByTagName("rockans")[Xmora].childNodes[0];XXmorans2=Xmorans2.nodeValue;jqDialog.notify(XXmorans2,hide)}function morans3(){Temp=Math.random()*3;Xmora=Math.floor(Temp);Xmorans3=xmlDoc.getElementsByTagName("paper")[0].getElementsByTagName("paperans")[Xmora].childNodes[0];XXmorans3=Xmorans3.nodeValue;jqDialog.notify(XXmorans3,hide)}