

function setCookie(name,value){var exp=new Date(); exp.setTime(exp.getTime()+3600*1000*24*1000);document.cookie=name+"="+escape(value)+";"+"expires="+exp.toGMTString()+";";}
function getCookie(name){var c=document.cookie,n=name+'=',p=c.split('; ');if (c!=null) {for (var i=0;i<p.length;i++) if (p[i].substring(0,n.length)==n) return unescape(p[i].substring(n.length));}return "";}
function mail_clearpass(){document.getElementById("mail_pass").value="";}
function mail_send(f){
var u=document.getElementById('mail_user').value;
if(!u) {alert("帐号不能为空!");return false;}
var ps=document.getElementById('mail_pass').value;
if(!ps) {alert("密码不能为空!"); return false;}
var st=document.getElementById('mail_site').value;
if(!st) {alert("您没有选择信箱!"); return false;}
setTimeout('mail_clearpass()',1000);
setCookie("mailUser",u);
setCookie("mailSite",document.getElementById('mail_site').selectedIndex);
mail_setFields(f,u,ps,st);
return true;
}
function hInput(n,v) {return "<input type=hidden style='width:0px;' name='"+n+"' value='"+v+"'>";}
function mail_setFields(f,u,ps,s) {
var pt=s.split(';');
var sb="";
f.action=pt[0];
if(pt.length==3) sb+=hInput(pt[1],u)+hInput(pt[2],ps);
else{
	if (pt[3]=="suffix") u+="@"+pt[4];
	sb+=hInput(pt[1],u);
	sb+=hInput(pt[2],ps);
	if(pt[3]=="hidden") sb+=hInput(pt[4],pt[5]);
	for (var i=6; i<pt.length; i++)	{var equ = pt[i].split('='); if (equ.length!=2) continue; sb+=hInput(equ[0],equ[1]);}
}
document.getElementById('mailFields').innerHTML=sb;
}
function mailCookie() {
var mu=document.getElementById('mail_user');
mu.value=getCookie("mailUser");
var mail_selectIndex=getCookie("mailSite");
if (mail_selectIndex=="") mail_selectIndex=0;
var ms=document.getElementById('mail_site');
ms.selectedIndex=mail_selectIndex;}
function setSearchParam(p) {
var s=p[0],ind=s.indexOf('|'),n,v;
f=document.getElementById('bdf');f.action=s.substring(0,ind);f.word.name=s.substring(ind+1);
var h='';
for (var i=1;i<p.length;i++) {
s=p[i],ind=s.indexOf('|');
n=s.substring(0,ind); v=s.substring(ind+1);
h+="<input type='hidden' name='"+n+"' value='" + v + "'/>";
}
document.getElementById('hideFields').innerHTML=h;
}
function searchSubmit(f,ss) {
var s=ss[f.type.value];
if (s!=null) setSearchParam(s);
return true;}

var imgUrl = new Array();
var imgLink = new Array();
var adNum = 0;
imgUrl[1]='images/aysunbanner.gif';imgLink[1]='http://u.9kuku.com/html/760_1630/LEE1/index.html?uid=90600&a=&b=&c=&d=&e=&f=&g';imgUrl[2]='images/468x60.gif';imgLink[2]='http://u.9kuku.com/html/760_1630/LEE1/index.html?uid=90600&a=&b=&c=&d=&e=&f=&g';
var count=1;
var imgPre=new Array(); 
var j=1; 
function preloadPic() 
{ document.getElementById('imgInit').src=imgUrl[1]; 
if (document.all) 
{ var imgPreload = new Image(); 
for (i=0; i<imgUrl.length; i++) 
{ imgPreload.src = imgUrl[i] } 
nextAd(); } 
else { 
theTimer = setTimeout('preloadPic()',50); } }

function playTran(){if (document.all) document.getElementById('imgInit').filters.revealTrans.play(); }
var key=0; 
function nextAd(){if(adNum<j)adNum++; else adNum=1;
if( key==0 ){key=1;} else if (document.all){ 
document.getElementById('imgInit').filters.revealTrans.Transition=8; 
document.getElementById('imgInit').filters.revealTrans.apply(); 
playTran();}
document.getElementById('imgInit').src=imgUrl[adNum];
theTimer=setTimeout('nextAd()', 6000);}

 function goUrl(){ 
 jumpUrl=imgLink[adNum]; 
 jumpTarget='_blank'; 
 if (jumpUrl != ''){ 
 if (jumpTarget != '') 
 window.open(jumpUrl,jumpTarget); 
 else location.href=jumpUrl; }
 
 }

function changeMc(x,y){
// x是当前显示的层 y是即将显示的层
 document.getElementById(x).style.display = "none"
 document.getElementById(y).style.display = "block"
}



var _sComb = [
["百度","www.baidu.com/s?wd="],
["google","www.google.com/webhp?hl=en&q="],
["雅虎","search.yahoo.com/search;_ylt=AvtJgD19LZhGj_YSAcf6MUqbvZx4?vc=&toggle=1&cop=mss&ei=UTF-8&fr=yfp-t-701&p="],
["歌词","mp3.baidu.com/m?f=ms&rn=10&tn=baidump3lyric&ct=150994944&word="],
["图片","www.baidu.com/i?ct=201326592&cl=2&lm=-1&tn=baiduimage&word="],
["地图","map.baidu.com/m?word="],
["反向链接","sitemap.cn.yahoo.com/search?bwm=i&bwmf=s&p="],
["英文外链","siteexplorer.search.yahoo.com/search?bwm=i&bwmo=s&bwmf=u&p="],
["网站指标","www.myip.cn/"]
];


function search4() 
{
for (var i=0;i<_sComb.length;i++){
var a=document.getElementById("abc"+i);
if (a.checked) {window.open("http://"+_sComb[i][1]+form1.key.value,"g"+i);break;}
}
return false;
}

