function inputValue(obj,Type){if(obj.value==obj.defaultValue){obj.value="";}else if(obj.value==""){obj.value=obj.defaultValue;}else{switch(Type){case"mail":if(!obj.value.maTch(/^[a-z0-9]+(\w|\.)*@[a-z0-9]+([a-z0-9]|-)*[a-z0-9]+\.(([a-z]+)|([a-z]+\.[a-z]+))$/)){alert("非法邮件地址，请重新输入");obj.focus();obj.select();};break;case"mobile":if(!obj.value.match(/^1\d{10}$/)){alert("手机号码不正确，请重新输入");obj.focus();obj.select();};break;case"en":if(!obj.value.match(/^\w+(\(|\))?/)){alert("请输入英文字母");obj.focus();obj.select();};break;default:return;}}}
function POPUP(ID,W,H,TIT,DAT){var bgBox=document.createElement("div");bgBox.style.cssText="position:absolute;width:100%;background:black;top:0;filter: Alpha(opacity=60);opacity:0.6;height:"+(document.body.scrollHeight+20)+"px";document.body.appendChild(bgBox);var upBox=document.createElement("div");upBox.style.cssText="position:absolute;overflow:hidden;filter:Alpha(opacity=0);opacity:0;width:"+W+"px;height:"+H+"px;left:"+(parseInt(bgBox.offsetWidth)/2-(W/2))+"px;top:"+((document.documentElement.clientHeight/2)-(H/2)+document.documentElement.scrollTop)+"px;";upBox.className=ID+"Tag";upBox.innerHTML="<div class='"+ID+"Tit'><span style='float:right;cursor:pointer;' onclick='CLOSE()'>×</span>"+TIT+"</div><div class='"+ID+"Content' id='"+ID+"'>"+DAT+"</div>";document.body.appendChild(upBox);var Box=upBox;var temp=0;(function(){temp+=10;Box.style.filter="Alpha(Opacity="+temp+")";Box.style.opacity=temp/100;if(temp<=100)window.setTimeout(arguments.callee,1);})();this.CLOSE=function(){document.body.removeChild(bgBox);document.body.removeChild(upBox);bgBox=null;upBox=null;}}
function AJAX(url,fun){var ajax=window.XMLHttpRequest?new XMLHttpRequest():window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;if(ajax){ajax.open("GET",url,true);ajax.onreadystatechange=function(){if(ajax.readyState==4){if(ajax.status==200){eval(fun)(ajax.responseText);ajax=null;}else{eval(fun)(false);}}}
ajax.send(null);eval(fun)();}}
function AJAXPOST(url,dat,fun){var ajax=window.XMLHttpRequest?new XMLHttpRequest():window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;if(ajax){ajax.open("POST",url,true);ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");ajax.onreadystatechange=function(){if(ajax.readyState==4){if(ajax.status==200){eval(fun)(ajax.responseText);ajax=null;}else{eval(fun)(false);}}}
ajax.send("jstext="+dat);eval(fun)();}}
if(navigator.cookieEnabled){var allCookie=document.cookie;if(allCookie.indexOf("weather=")==-1&&allCookie.indexOf("endend")==-1){AJAX('/getweather.php','Weather2cookie');}else{var weather=allCookie.match(/(weather=)(.*?)(end)\3/)[2];getWeather(unescape(weather));}}else{AJAX('/getweather.php','getWeather');} function getWeather(dat){if(dat&&dat.match(/^\d.*?~/m)){var LogoDatTag=document.createElement("div");LogoDatTag.style.cssText="position:absolute; left:60px; top:53px; font-size:10px; _font-size:11px; color:#2f477e; line-height:1.2;";LogoDatTag.innerHTML=dat;document.getElementById("Logo").appendChild(LogoDatTag);}} function Weather2cookie(dat){var reg=/^\d\d-/;if(dat&&reg.test(dat)){var expTime=new Date(new Date().setHours(new Date().getHours()+3));var edp="endend; expires="+expTime.toGMTString()+"; path=/";document.cookie="weather="+escape(dat)+edp;getWeather(dat);}}
if(navigator.appVersion.match("MSIE 6.0"))document.body.style.width=(window.screen.width-21)+"px";var nav=document.getElementById("nav").getElementsByTagName("p")[0].getElementsByTagName("a");for(i=0;i<nav.length;i++){if(nav[i].id=="thishot"){nav[i].style.width=nav[i].clientWidth+15+"px";nav[i].style.padding="0";nav[i].innerHTML="<span>"+nav[i].firstChild.data+"</span>";}}
function copytext(dat){if(window.clipboardData){if(window.clipboardData.setData("text",dat))alert('已经成功复制:\r\n'+dat);}else{var flashcopier='flashcopier';var divholder=document.createElement('div');divholder.id=flashcopier;document.body.appendChild(divholder);divholder.innerHTML='<embed src="/img/_clipboard.swf" FlashVars="clipboard='+encodeURIComponent(dat)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';alert('已经成功复制:\r\n'+dat);document.body.removeChild(divholder);divholder=null;}}
function AddFavorite(sURL,sTitle){try{window.external.addFavorite(sURL,sTitle);}catch(e){try{window.sidebar.addPanel(sTitle,sURL,"");}catch(e){alert("加入收藏失败，请使用Ctrl D进行添加");}}}
function nullfun(a){return;}