/*选项折页*/
function showtab(i){
	switch(i){
		case 11:
		document.getElementById('tab11').className="show";
		document.getElementById('tab12').className="hide";
		document.getElementById('tab13').className="hide";
		document.getElementById('tab14').className="hide";
		document.getElementById('tab15').className="hide";
		break;
		case 12:
		document.getElementById('tab11').className="hide";
		document.getElementById('tab12').className="show";
		document.getElementById('tab13').className="hide";
		document.getElementById('tab14').className="hide";
		document.getElementById('tab15').className="hide";
		break;
		case 13:
		document.getElementById('tab11').className="hide";
		document.getElementById('tab12').className="hide";
		document.getElementById('tab13').className="show";
		document.getElementById('tab14').className="hide";
		document.getElementById('tab15').className="hide";
		break;
		case 14:
		document.getElementById('tab11').className="hide";
		document.getElementById('tab12').className="hide";
		document.getElementById('tab13').className="hide";
		document.getElementById('tab14').className="show";
		document.getElementById('tab15').className="hide";
		break;
		case 15:
		document.getElementById('tab11').className="hide";
		document.getElementById('tab12').className="hide";
		document.getElementById('tab13').className="hide";
		document.getElementById('tab14').className="hide";
		document.getElementById('tab15').className="show";
		break;
	}
}
function showtab2(i){
	switch(i){
		case 3:
		document.getElementById('tab3').className="show";
		document.getElementById('tab4').className="hide";
		document.getElementById('tab5').className="hide";
		break;
		case 4:
		document.getElementById('tab3').className="hide";
		document.getElementById('tab4').className="show";
		document.getElementById('tab5').className="hide";
		break;
		case 5:
		document.getElementById('tab3').className="hide";
		document.getElementById('tab4').className="hide";
		document.getElementById('tab5').className="show";
		break;
	}
}
/*历史访问记录*/
function $(o){
 var o=document.getElementById(o)?document.getElementById(o):o;
 return o;
}

document.getElementsByClassName = function(className,oBox) {
 this.d= oBox || document;
 var children = this.d.getElementsByTagName('*') || document.all;
 var elements = new Array();
 for (var i = 0; i < children.length; i++) {
 var child = children[i];
 var classNames = child.className.split(' ');
 for (var j = 0; j < classNames.length; j++) {
 if (classNames[j] == className) {
 elements.push(child);
 break;
 }
 }
 }
 return elements;
}

$Cls = function (s,o){
return document.getElementsByClassName(s,o);
};

function ExCls(o,a,b){
 o.className=(o.className.indexOf(a)!=-1)?b:a;
}

function addCls(o,s){
 if (o.className.length>0) {
	 o.className+=" "+s;
 } else {
	 o.className=s;
 }
}

function delCls(o,s){
 o.className=o.className.replace(s,"");
  o.className=o.className.replaceAll("  ","");
}


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.indexOf(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("Mywz234Hits");
  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("Mywz234Hits",sNewSite,expdate,"/",null,false);
}

function GetMyHit(n){
 this.maxlength=n || 18;
 var sOldSite=GetCookie("Mywz234Hits");
 sOldSite=sOldSite.split(";");
 var nMaxNum=sOldSite.length>this.maxlength?this.maxlength+1:sOldSite.length;
 var sHtml="<ul class=\"ul\">\n";
 for (i=0;i<nMaxNum-1;i++) {
  var sTempInfo=sOldSite[i].split("|");
  sHtml+="<li class=\"li\"><b>"+(i+1)+".</b><a href=\""+sTempInfo[1]+"\" target=\"_blank\">"+sTempInfo[0]+"</a></li>\n";
 }
 if (nMaxNum<=1) {
   sHtml="<ul class=\"ul\">\n";
   sHtml+="<li class=\"jl\">暂无浏览记录！</li>\n"
 }

 sHtml+="<li><a href=\"javascript:;\" title=\"清除“最近浏览网站”所有记录。\" onclick=\"clearMyHit();\">[清除]</a>&nbsp;";
  var MyHitStatus=GetCookie("MyHitStatus");
  if (MyHitStatus=="open"||MyHitStatus=="")
    sHtml+="<a href=\"javascript:;\" title=\"关闭“最近浏览网站”的功能\" onclick=\"chgMyHit('close');\">[关闭]</a></li>";
  else
    sHtml+="<a href=\"javascript:;\" title=\"开启“最近浏览网站”的功能\" onclick=\"chgMyHit('open');\">[开启]</a></li>";
 $("Mywz234His").innerHTML=sHtml;
}
 sHtml+="</ul>\n";
function clearMyHit(){
  var expdate=new Date();
  expdate.setTime(expdate.getTime()+(24*60*60*1000*30));
  SetCookie("Mywz234Hits","",expdate,"/",null,false);
  GetMyHit();
}

function setwz234Hit(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,"/",null,false);
  GetMyHit();
}
/*邮箱登陆*/
function $(o){
 var o=document.getElementById(o)?document.getElementById(o):o;
 return o;
}

document.getElementsByClassName = function(className,oBox) {
 this.d= oBox || document;
 var children = this.d.getElementsByTagName('*') || document.all;
 var elements = new Array();
 for (var i = 0; i < children.length; i++) {
 var child = children[i];
 var classNames = child.className.split(' ');
 for (var j = 0; j < classNames.length; j++) {
 if (classNames[j] == className) {
 elements.push(child);
 break;
 }
 }
 }
 return elements;
}

$Cls = function (s,o){
return document.getElementsByClassName(s,o);
};

function ExCls(o,a,b){
 o.className=(o.className.indexOf(a)!=-1)?b:a;
}

function addCls(o,s){
 if (o.className.length>0) {
	 o.className+=" "+s;
 } else {
	 o.className=s;
 }
}

function delCls(o,s){
 o.className=o.className.replace(s,"");
  o.className=o.className.replaceAll("  ","");
}


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 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,"/","265.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("https://edit.bjs.yahoo.com/config/login","login","passwd",".done,http://edit.bjs.yahoo.com/config/mail?.intl=cn; .intl,cn; .src,ym",".my265");
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");
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 CP(input){
 input.Password.value="";
}

function _Void() { return; }
/*搜索引擎*/
function search4()
{
if(form1.ss01.checked)
window.open("http://www.baidu.com/s?tn=transcc_pg&word="+form1.key.value,"ss01");
if(form1.ss02.checked)
window.open("http://www.google.cn/search?hl=zh-CN&q="+form1.key.value,"ss02");
if(form1.ss03.checked)
window.open("http://cn.search.yahoo.com/search?p="+form1.key.value,"ss03");
if(form1.ss04.checked)
window.open("http://www.sogou.com/web?sogouhome=&pid=lmy945&shuru=shou&query="+form1.key.value,"ss04");
if(form1.ss05.checked)
window.open("http://www.baidu.com/i?tn=transcc_pg&ct=201326592&cl=2&lm=-1&word="+form1.key.value,"ss05");
if(form1.ss06.checked)
window.open("http://post.baidu.com/f?kw="+form1.key.value,"ss06");
if(form1.ss07.checked)
window.open("http://zhidao.baidu.com/q?ct=17&pn=0&tn=ikaslist&rn=10&word="+form1.key.value,"ss07");
if(form1.ss08.checked)
window.open("http://news.baidu.com/ns?tn=transcc_pg&cl=2&rn=20&word="+form1.key.value,"ss08");
if(form1.ss09.checked)
window.open("http://www.baidu.com/s?tn=transcc_pg&word="+form1.key.value+"%20site%3Awww.transcc.com","ss09");
if(form1.ss10.checked)
window.open("http://mp3search.baidu.com/wstsearch?tn=transcc_pg&ct=134217728&lm=-1&rn=&word="+form1.key.value,"ss10");
if(form1.ss11.checked)
window.open("http://mp3search.baidu.com/wstsearch?tn=transcc_pg&ct=150994944&lm=-1&rn=&word="+form1.key.value,"ss11");
if(form1.ss12.checked)
window.open("http://www.baidu.com/baidu?tn=transcc_pg&ie=gb2312&bs=&sr=&z=&ct=1048576&cl=3&f=8&word="+form1.key.value,"ss12");
if(form1.ss13.checked)
window.open("http://map.baidu.com/m?tn=transcc_pg&word="+form1.key.value,"ss13");
if(form1.ss14.checked)
window.open("http://www.baidu.com/baidu?tn=transcc_pg&ft=all&q1="+form1.key.value,"ss14");
if(form1.ss15.checked)
window.open("http://cang.baidu.com/do/s?tn=transcc_pg&ct=21&word="+form1.key.value,"ss15");
if(form1.ss16.checked)
window.open("http://baike.baidu.com/w?ct=17&lm=0&tn=baiduWikiSearch&pn=0&rn=10&word="+form1.key.value+"&submit=search","ss16");
return false;}
