﻿var ajaxTimeOut=60000;function go(){;}function loadPage(page,query,game){page=page+".aspx";if(query!=undefined&&query!=null){page+="?"+query;}var content=$("div.content-right",$(parent.document));if(content.length>0){var html="<iframe src=\""+game+"/"+page+"\" frameborder=\"0\" scrolling=\"no\" width=\"569\" name=\"right\" id=\"ifContent\"></iframe>";setTimeout(function(){content.html(html);},200);}else{window.location=page;}}function goLogin(){if(parent!=null&&parent!=undefined)parent.location="GoLogin.aspx";else window.location="GoLogin.aspx";}function showLoading(){$(".divContent").hide();$(".divLoading").show();}function hideLoading(){$(".divLoading").hide();$(".divContent").show();}function isEmpty(value){var regex=/^\s*$/;return regex.test(value);}function isNumber(value){var regex=/^\s*\d+\s*$/;return regex.test(value);}function chkMail(value){var regex=/^\s*\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*\s*$/;return regex.test(value);}function chkTel(value){var regex=/^\s*(\(\d{3}\)|\d{3}-|\d{3})?(\d{8})([-\*]\d{1,5})?\s*$/;return regex.test(value);}function chkIp(value){var regex=/^\s*((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)\s*$/;return regex.test(value);}function chkIdNo(value){var regex=/^\s*\d{15}(\d{2}[0-9xX])?\s*$/;return regex.test(value);}function chkSpreaderGameNo(value){var regex=/^\s*[a-zA-Z]{1,5}\d{5,10}\s*$/;return regex.test(value);}function copyToClipBoard(value){if(window.clipboardData!=undefined){window.clipboardData.setData("text",value);}}function addFavorite(url,title){switch(getOs()){case 1:window.external.addFavorite(url,title);break;case 2:window.sidebar.addPanel(title,url,"");break;case 0:alert("您的浏览器太牛了，我都不知道怎么加入收藏夹了。。在页面上右键，点击加入收藏夹吧。。");break;}}function getOs(){if(navigator.userAgent.indexOf("MSIE")>0)return 1;if(isFirefox=navigator.userAgent.indexOf("Firefox")>0)return 2;if(isSafari=navigator.userAgent.indexOf("Safari")>0)return 3;if(isCamino=navigator.userAgent.indexOf("Camino")>0)return 4;if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0)return 5;return 0;}function loadYear(yearId){var date=new Date();var start=2007;var year=date.getFullYear();var selYear=$("#"+yearId).get(0);for(var i=start;i<=year;i++){selYear.options.add(new Option(i,i));}selYear.options[year-start].selected=true;}function loadMonth(monthId){var date=new Date();var month=$("#"+monthId).get(0);month.options.length=0;for(i=1;i<=12;i++){month.options.add(new Option(i,i));}}function initYM(yearId,monthId,year,month){var date=new Date();var year=date.getFullYear();loadYear(yearId);if(year!=undefined||year!=null){$("#"+yearId).val(year);}loadMonth(monthId);if(month!=undefined||month!=null){$("#"+monthId).val(month);}}
