function clect()
{
	window.open('http://shuqian.qq.com/post?from=3&title='+encodeURIComponent(document.title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','favit','width=930,height=470,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes');void(0)
}

var bda=[[['www.baidu.com/index.php?tn=520com_pg'],['www.baidu.com/s'],['']],[['mp3.baidu.com'],['mp3.baidu.com/m'],['134217728']],[['image.baidu.com'],['image.baidu.com/i'],['201326592']],[['video.baidu.com'],['video.baidu.com/v'],'301989888'],[['map.baidu.com'],['map.baidu.com/q'],['17']],[['post.baidu.com'],['post.baidu.com/f'],['']]]
var sx=1;
function em(e){	return document.getElementById(e)}
function sh(i) {
for(j=1; j<=6; j++)
{
    if (j==i)
    {
        em('lt'+j).className='c'
        em('imgbaidu').src='/images/dazhong/baidu-'+i+'.gif';
        em('bdurl').href='http://'+bda[i-1][0];
        document.searchform.action='http://'+bda[i-1][1];
    }
    else
    {
        em('lt'+j).className=''
    }
}
sx=i;
em("myhotwords").innerHTML=hotwords[i-1];
	if(sx==5)
	{
	em('search_gg').style.display="block"	;
	em('search').style.display="none"	;
	em('search_sogou').style.display="none"	;
	em('kwh').style.display="none"	;
	em('kwhsogou').style.display="none"	;
	em('kwhg').style.display="block"	;
	document.searchformgg.q.focus();
	}
	else if(sx==6)
	{
	em('search_gg').style.display="none"	;
	em('search').style.display="none"	;
	em('search_sogou').style.display="block"	;
	em('kwh').style.display="none"	;
	em('kwhsogou').style.display="block"	;
	em('kwhg').style.display="none"	;
	document.searchformsogou.query.focus();
	}	
	else
	{
    em('search_gg').style.display="none"	;
	em('search').style.display="block"	;
	em('search_sogou').style.display="none"	;
	em('kwh').style.display="block"	;
	em('kwhsogou').style.display="none"	;
	em('kwhg').style.display="none"	;
	document.searchform.wd.focus();
	}		
}
function mysubmit()
{
if (sx==3)
{
document.searchform.ct.value=201326592
document.searchform.lm.value=-1
document.searchform.cl.value=2
document.searchform.tn.value="baiduimage"
document.searchform.pv.value=""
document.searchform.rs2.value=""
document.searchform.myselectvalue.value=""
document.searchform.ie.value=""
document.searchform.z.value=0
document.searchform.rn.value=""
document.searchform.from.value=""
}
if (sx==4)
{
document.searchform.ct.value=301989888
document.searchform.lm.value=-1
document.searchform.cl.value=2
document.searchform.tn.value=""
document.searchform.pv.value=""
document.searchform.rs2.value=""
document.searchform.myselectvalue.value=""
document.searchform.ie.value=""
document.searchform.z.value=0
document.searchform.rn.value="20"
document.searchform.from.value=""
}
if (sx==1)
{
document.searchform.cl.value=3
document.searchform.tn.value="520com_pg"
document.searchform.ct.value=0
document.searchform.ie.value="gb2312"
document.searchform.myselectvalue.value=""
document.searchform.rn.value=""
document.searchform.rs2.value=""
document.searchform.z.value=""
document.searchform.from.value=""
document.searchform.lm.value=""
}
if (sx==2)
{
document.searchform.ct.value=134217728
document.searchform.lm.value=-1
document.searchform.rn.value=""
document.searchform.cl.value=""
document.searchform.tn.value="baidump3"
document.searchform.f.value="ms"
document.searchform.myselectvalue.value=""
document.searchform.ie.value="gb2312"
document.searchform.z.value=""
document.searchform.from.value=""
}
document.searchform.word.value=document.searchform.wd.value;

return true;
}

function copy_to_clip()
{
	var obj = window.clipboardData;
	obj.setData('Text','偷偷说下,这是我看见最棒的网址站噢,网址是:w.52hxw.com');
	alert('你已经成功复制本链接地址，好东西当然要发给QQ/MSN好友分享了');
}
function JSAddFavorite(){
	if ( window.sidebar && "object" == typeof( window.sidebar ) && "function" == typeof( window.sidebar.addPanel ) ){
  	//  firefox
		window.sidebar.addPanel( document.title, document.location.href, '' );
	}else if ( document.all && "object" == typeof( window.external ) ){
    //  ie
//    window.external.addFavorite( document.location.href, document.title );
    window.external.addFavorite( document.location.href, '★火星网址站 w.52hxw.com★' );
  }
}

function writeDateInfo()
{
var day="";
var month="";
var ampm="";
var ampmhour="";
var myweekday="";
var year="";
mydate=new Date();
myweekday=mydate.getDay();
mymonth=mydate.getMonth()+1;
myday= mydate.getDate();
myyear= mydate.getYear();
year=(myyear > 200) ? myyear : 1900 + myyear;
if(myweekday == 0)
weekday=" 星期日";
else if(myweekday == 1)
weekday=" 星期一";
else if(myweekday == 2)
weekday=" 星期二";
else if(myweekday == 3)
weekday=" 星期三";
else if(myweekday == 4)
weekday=" 星期四";
else if(myweekday == 5)
weekday=" 星期五";
else if(myweekday == 6)
weekday=" 星期六";
document.write(year+"年"+mymonth+"月"+myday+"日"+weekday);
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function ssk(a){
  em('skinc').href="/style/"+a+".css";
if(em('button_login')!=null)
em('button_login').src="/images/dazhong/button_login_"+a+".gif";
  //s_cookie('skin',a,5184000,'/','.520.com');
  s_cookie('skin',a,5184000,'/');
}

function s_cookie(name, value)
{var expdate = new Date();var argv = s_cookie.arguments;var argc = s_cookie.arguments.length
var expires = (argc > 2) ? argv[2] : null;var path = (argc > 3) ? argv[3] : null
var domain = (argc > 4) ? argv[4] : null;var secure = (argc > 5) ? argv[5] : false
if(expires!=null) expdate.setTime(expdate.getTime() + ( expires * 1000 ))
document.cookie = name + "=" + escape (value) +((expires == null) ? "" : ("; expires="+ expdate.toGMTString()))
+((path == null) ? "" : ("; path=" + path)) +((domain == null) ? "" : ("; domain=" + domain))
+((secure == true) ? "; secure" : "")}

function g_cookie(name)
{var arg = name + "=";var alen = arg.length;var c= document.cookie;var clen =c.length;var i = 0
while (i < clen){var j = i + alen
if (c.substring(i, j) == arg)
return _GetCookieVal (j)
i = c.indexOf(" ", i) + 1
if (i == 0) break}
return null}

function _GetCookieVal(offset)
{var c= document.cookie;var endstr = c.indexOf (";", offset)
if (endstr == -1) endstr = c.length
return unescape(c.substring(offset, endstr))}

function tracking(e){
 e = e ? e : window.event;
 var s = e.srcElement ? e.srcElement : e.target;
 var a = s.tagName;
 var u = s.href;
 var t = s.innerText ? s.innerText : s.textContent;
 if(a == "A"||a == "IMG"){
  try{
   new Image().src = "http://tj.abc.520.com/stat_click.php?a="+a+"&u="+escape(u)+"&t="+t;
  }catch(ex){}
 }
 return true;
}

function  cclear()
{
document.getElementById("wd").style.background="none";
document.getElementById("q").style.background="none";
document.getElementById("query").style.background="none";
}
function  cclearg()
{
document.getElementById("q").style.background="none";
document.getElementById("wd").style.background="none";
document.getElementById("query").style.background="none";
}

