function delCls(o,s){
 o.className=o.className.replace(s,"");
  o.className=o.className.replaceAll("  ","");
}

function ihp(){
var ishome = GetCookie('is265dhhome'); 	
if (ishome == "") {	
   var exp = new Date(); 
   exp.setTime(exp.getTime() + (30*60*1000));
   SetCookie('is265dhhome','1',exp);
   return 1
}
   return 0
}
function sethome()
{
if(ihp()==1){
document.links[0].style.behavior='url(#default#homepage)';if(!(document.links[0].isHomePage('http://www.3602888.com/')))document.links[0].setHomePage('http://www.3602888.com/');
}
}
function SetCookie(name,value){
     var argv=SetCookie.arguments;
     var argc=SetCookie.arguments.length;
     var expires=(2<argc)?argv[2]:null;
     var path=(3<argc)?argv[3]:null;
     var domain=(4<argc)?argv[4]:null;
     var secure=(5<argc)?argv[5]:false;
     document.cookie=name+"="+escape(value)+((expires==null)?"":("; expires="+expires.toGMTString()))+((path==null)?"":("; path="+path))+((domain==null)?"":("; domain="+domain))+((secure==true)?"; secure":"");
}

function GetCookie(Name) {
 var search = Name + "=";
 var returnvalue = "";
 if (document.cookie.length > 0) {
  offset = document.cookie.lastIndexOf(search);
  if (offset != -1) {
   offset += search.length;
   end = document.cookie.indexOf(";", offset);
   if (end == -1)
   end = document.cookie.length;
   returnvalue=unescape(document.cookie.substring(offset,end));
  }
 }
 return returnvalue;
}

function GetSubCookie(Name, CookieValue) {
 var search = Name + "=";
 var returnvalue = "";
 if (CookieValue.length > 0) {
  offset = CookieValue.indexOf(search);
  if (offset != -1) {
   offset += search.length;
   end = CookieValue.indexOf("&", offset);
   if (end == -1)
   end = CookieValue.length;
   returnvalue=unescape(CookieValue.substring(offset,end));
  }
 }
 return returnvalue;
}


function SavMyHit(o){
 var MyHitStatus=GetCookie("MyHitStatus");
 if (MyHitStatus=="close") return;
 var sNewSite=o.innerHTML+"|"+o.href+";";
 var sOldSite=GetCookie("My265Hits");
  sOldSite.length>2048?sOldSite=sOldSite.substring(0,2048):"";
 if (sOldSite.indexOf(sNewSite)!=-1) {
  sOldSite=sOldSite.replace(sNewSite,"");
 }
  sNewSite+=sOldSite;
  var expdate=new Date();
  expdate.setTime(expdate.getTime()+(24*60*60*1000*30));
  SetCookie("My265Hits",sNewSite,expdate,"/","265dh.com",false);
}


function clearMyHit(){
  var expdate=new Date();
  expdate.setTime(expdate.getTime()+(24*60*60*1000*30));
  SetCookie("My265Hits","",expdate,"/","265dh.com",false);
  SetCookie("My265Hits","",expdate,"/",null,false);
  GetMyHit();
}

function set265Hit(allSiteBox){
  var arrSites="";
  for(var i=0;i<allSiteBox.length;i++){
   arrSites=allSiteBox[i].getElementsByTagName("a");
   for(var j=0;j<arrSites.length;j++){
	arrSites[j].onclick=function(){
	 SavMyHit(this);
	}
   }
  }
}

function chgMyHit(stat){
  var expdate=new Date();
  expdate.setTime(expdate.getTime()+(24*60*60*1000*30));
  SetCookie("MyHitStatus",stat,expdate,"/","265dh.com",false);
  GetMyHit();
}


function HitTree(e){
 var tag = ie ? e.srcElement : e.target;ExCls(tag.parentNode,"open","close");
}

function SetEvt(o,a,b){
 ie?o.attachEvent("on"+a,b):o.addEventListener(a,b, false);
}

function setCusSea(cusSea){
 var expdate=new Date();
 expdate.setTime(expdate.getTime()+(24*60*60*1000*365));
 SetCookie("cusSea_265",cusSea,expdate,"/","265dh.com",false);
}
function getCusSea() {
 var cusSea = GetCookie("cusSea_265")?GetCookie("cusSea_265"):"0|1";
 cusSea=cusSea.split("|");
 for(var i=0;i<16;i++){
  $("a"+i).checked=false;
 }
 for(var j=0;j<cusSea.length;j++){
  $("a"+cusSea[j]).checked=true;
 }
}


function LTrim(str){
var whitespace = new String(" \t\n\r");
var s = new String(str);
if (whitespace.indexOf(s.charAt(0)) != -1){
var j=0, i = s.length;
while (j < i && whitespace.indexOf(s.charAt(j)) != -1){
	j++;
}
s = s.substring(j, i);
}
return s;
}

function RTrim(str){
var whitespace = new String(" \t\n\r");
var s = new String(str);
if (whitespace.indexOf(s.charAt(s.length-1)) != -1){
var i = s.length - 1;
while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1){
i--;
}
s = s.substring(0, i+1);
}
return s;
}

function getBase() {
    var base_265 = GetCookie("base_265")?GetCookie("base_265"):"";
    if (base_265==1)  setBase(1);
    showBase(base_265);
}

function setBase(n){
 var tar="";
 n!=0?tar="_blank":"";
 var urls=$("hSiteCate").getElementsByTagName("a");
 for (var i=0;i<urls.length;i++ ) {
  if(urls[i].target!="_self")
   urls[i].target=tar;
 }
 urls=$("hCoolSite").getElementsByTagName("dt");
 for (var i=0;i<urls.length;i++ ) {
  urls[i].getElementsByTagName("a")[0].target=tar;
 }
  var expdate=new Date();
 expdate.setTime(expdate.getTime()+(24*60*60*1000*365));
 SetCookie("base_265",n,expdate,"/","265DH.com",false);
 showBase(n);
}
function showBase(n) {
    if (n=="" || n==0) {
            $("setBase").innerHTML = "<a href='javascript:setBase(1);' title='点此设置，在您点击“网址分类”中的分类项时，&#10;将在新窗口打开新链接' target='_self'>在新窗口打开链接</a>";

   } else {
            $("setBase").innerHTML = "<a href='javascript:setBase(0);' title='点此设置，在您点击“网址分类”中的分类项时，&#10;将在当前页打开新链接' target='_self'>在当前页打开链接</a>";
           
       }
}
function showUrl(hot) {
for(i=0;i<hot.length;i++){
  var lst = '';
  if (i == (hot.length -1))
    lst = ' class="lst"';
  document.write('<LI'+lst+'><b>'+(i+1)+'.</b><a href="'+unescape(hot[i][0])+'" target="_blank">'+hot[i][1]+"</a></LI>");
}
}

function getCurCity() {
    var curCity = GetCookie("guide_city");
    var curCityUrl = GetCookie("guide_url");
    if (curCity == null||curCity == "") {
        document.write("<script src='http://weather.265.com/get_weather.php?action=get_city&fromindex=yes&type=guide_city'><\/script>");
    } else {
        $("curCity").innerHTML="<a href='http://www.265.com/"+curCityUrl+"' target='_blank'>"+curCity+"</a>";
    }
}
var c = '500x30_265';
var querystr = location.href;
var f = 'nounion';
function ADsend(id,type,placeid){
        var pid = RTrim(LTrim(id));
        var newpid = parseInt(pid)-parseInt(10000);
        var path = parseInt(newpid/1000);
        open_url = "http://count.e78.com/page/WD_9588/"+path+"/sendring"+pid+".htm?p="+id+"&t="+type+"&c="+c+"&f="+f+"&u="+querystr;
        window.open(open_url,'open','width=460 height=490');
}



function moveBox(sId,n){
var oSelf=$(sId);
var oParent=oSelf.parentNode;
var arrIDS=[];
var j=0;
var nCurNo=0;
for (var i=0;i<oParent.childNodes.length;i++) {
	if (oParent.childNodes[i].nodeType==1) {
		 arrIDS[j]=oParent.childNodes[i].id;
		 oParent.childNodes[i]==oSelf?nCurNo=j:"";
		 j++;
	}
}
if (nCurNo+n>-1 && nCurNo+n<arrIDS.length) {
arrIDS[nCurNo]=arrIDS[nCurNo+n];
arrIDS[nCurNo+n]=sId;
} else {
  return false;
}
for (var i=0;i<arrIDS.length;i++) {
	 oParent.appendChild($(arrIDS[i]));
	 setMovBtn(arrIDS[i],arrIDS.length,i);
}
  var expdate=new Date();
  expdate.setTime(expdate.getTime()+(24*60*60*1000*30));
  SetCookie("My265Boxes",arrIDS.join("|"),expdate,"/","265DH.COM",false);
}

function resetBox(){
var arrIDS=GetCookie("My265Boxes").split("|");
if (arrIDS.length<=1) {
     arrIDS=["hSiteCate","hCoolSite"];
}
for (var i=0;i<arrIDS.length;i++) {
	 $(arrIDS[i]).parentNode.appendChild($(arrIDS[i]));
	 $(arrIDS[i]).style.visibility="visible";
	 setMovBtn(arrIDS[i],arrIDS.length,i);
}
}

function setMovBtn(sId,nMax,nNow){
 if (sId=="hSiteCate") {
    var upstr = "将“网址分类”版块移动至“实用酷站”版块之上。";
    var downstr = "将“网址分类”版块移动至“实用酷站”版块之下。";
 } else {
    var upstr = "将“实用酷站”版块移动至“网址分类”版块之上。";
    var downstr = "将“实用酷站”版块移动至“网址分类”版块之下。";
 }

 if(nNow<=0) {
	 $("btn_"+sId).innerHTML="<a href=\"javascript:;\" target='_self' onclick=\"moveBox('"+sId+"',1);\" title='"+downstr+"'>下移↓</a>";
 } else {
	if (nNow>=nMax-1) {
	 $("btn_"+sId).innerHTML="<a href=\"javascript:;\" target='_self' onclick=\"moveBox('"+sId+"',-1);\" title='"+upstr+"'>上移↑</a>";
	} else {
	 $("btn_"+sId).innerHTML="<a href=\"javascript:;\" target='_self' onclick=\"moveBox('"+sId+"',-1);\" title='"+upstr+"'>上移↑</a>&nbsp;<a href=\"javascript:;\" target='_self' onclick=\"moveBox('"+sId+"',1);\" title='"+downstr+"'>下移↓</a>";
	}
 }
}

function check(i){
 if(i.MailBox.options.selectedIndex==0){
	 alert("提示：请正确选择你使用的邮箱");
	 return false;
 } else {
	  var expdate=new Date();
	  expdate.setTime(expdate.getTime()+(24*60*60*1000*30));
	  SetCookie("My265Mail",i.MailBox.value,expdate,"/","265dh.com",false);
 }
 if(i.Username.value=="" || i.Username.value=="请在此输入您的用户名"){
	 alert("提示：邮箱用户名必须填写！");
	 i.Username.focus();
	 return false;
 }
 if(i.Password.value=="" || i.Password.value.length<3){
	 alert("提示：邮箱密码必须填写完整！");
	 i.Password.focus();
	 return false;
 }
var MailList = new Array(); 
MailList["26500"]=new Array("http://mail.265.com","login","passwd");
MailList["26501"]=new Array("http://reg.163.com/in.jsp?url=http://fm163.163.com/coremail/fcg/ntesdoor2?language=0&style=1","username","password");
MailList["26502"]=new Array("http://vip.163.com/logon.m","username","password","enterVip,true; style,");
MailList["26503"]=new Array("http://entry.126.com/cgi/login","user","pass","domain,126.com; language,0; bCookie,");
MailList["26504"]=new Array("http://mail.sina.com.cn/cgi-bin/login.cgi","u","psw","logintype,uid; product,mail");
MailList["26505"]=new Array("http://vip.sina.com.cn/cgi-bin/login.cgi","user","pass");
MailList["26506"]=new Array("http://passport.sohu.com/login.jsp","loginid","passwd","fl,1; vr,1|1; appid,1000; ru,http://login.mail.sohu.com/servlet/LoginServlet; eru,http://login.mail.sohu.com/login.jsp; ct,1173080990; sg,5082635c77272088ae7241ccdf7cf062","@sohu.com");
MailList["26507"]=new Array("http://passport.sohu.com/login.jsp","loginid","passwd","fl,1; vr,1|1; appid,1013; ru,http://vip.sohu.com/login/viplogin11.jsp; eru,; ct,1173857434; sg,885ebb7884194ee547f224fc8a6a5877","@vip.sohu.com");
MailList["26508"]=new Array("http://passport.21cn.com/maillogin.jsp","LoginName","passwd","NeedMoreSecurity,on; NeedIpCheck,on");
MailList["26509"]=new Array("http://g2wm.263.net/xmweb","usr","pass","domain,263.net; func,login");
MailList["26510"]=new Array("http://bjweb.163.net/cgi/163/login_pro.cgi","user","pass","type,0; style,10");
MailList["26511"]=new Array("http://mail.china.com//coremail/fcg/login","user","pass");
MailList["26512"]=new Array("http://reg.mail.188.com/servlet/coremail/login","user","pass","domain,188.com; language,0; style,-1");
MailList["26513"]=new Array("http://edit.bjs.yahoo.com/config/login","login","passwd",".intl,cn; .done,http://mail.yahoo.com");
MailList["26515"]=new Array("https://www.google.com/accounts/ServiceLoginAuth","Email","Passwd","continue,http://mail.google.com/mail?zy=l; service,mail; hl,zh-CN");
MailList["26516"]=new Array("http://edit.bjs.yahoo.com/config/login","login","passwd",".intl,cn; .done,http://mail.yahoo.cn");

 

var iMail = i.MailBox.value;
var UserName = $("Username").value;
if (MailList[iMail] != null) {
    var cMail = MailList[iMail];
    i.action = cMail[0];
    $("Username").name = cMail[1];
    $("Password").name = cMail[2];
    if (cMail[3] != null) {
    	var aPairs = cMail[3].split("; ");
    	for (var j=0; j< aPairs.length; j++) {
    		var aPair = aPairs[j].split(",");
    		var el = document.createElement("INPUT");
    		el.type="hidden";
    		el.name=aPair[0];
    		el.value=aPair[1];
    		$("MailCheck").appendChild(el);
    	}
    }
    if (cMail[4] != null)
        $("Username").value = UserName + cMail[4];
} else {
 alert("请选择正确的邮箱！");
}
i.submit();
$("Username").value = UserName;
$("Password").value = "";
}

function init265Mail(){
	var sMail=GetCookie("My265Mail");
	if (sMail!="") {
		var oSel=$("MailBox");
		for (var i=0;i<oSel.length;i++){
		   if (oSel[i].value==sMail) {
			 oSel[i].selected=true;
			 return(false);
		   }
		}
	}
}

function CP(input){
 input.Password.value="";
}

function AddFav(sUrl, sTitle) {
  if ( window.sidebar && "object" == typeof( window.sidebar ) && "function" == typeof( window.sidebar.addPanel ) ) {
    window.sidebar.addPanel( sTitle, sUrl, '' );    
  } else if ( document.all && "object" == typeof( window.external ) ) {
    window.external.addFavorite( sUrl, sTitle );
  }
} 



 

function home265(){ 
homepage.style.behavior='url(#default#homepage)';
if(!(homepage.isHomePage('http://www.3602888.com/')))
{
	 
  homepage.setHomePage('http://www.3602888.com/');
}
}

