function addFav(URL,name){
	window.external.addFavorite(URL,name)}
	
function setHomePage(theid,URL){
	//var strHref=window.location.href;
	//shp.style.behavior='url(#default#homepage)';
	//shp.setHomePage('http://');
	//shp.style.behavior='';}
	//以上当函数无theid参数时指定被点击处的id(shp)时使用
	eval(theid+".style.behavior='url(#default#homepage)'");
	eval(theid+".setHomePage(URL)");
	eval(theid+".style.behavior=''");
}

function thisdate(){
var today=new Date();
var strDate=(" "+today.getYear()+"年"+(today.getMonth()+1)+"月"+today.getDate()+"日");
var strMonth=(' 星期'+'日一二三四五六'.charAt (new Date().getDay()+''));
document.write("<span style='font-size:12px;font-weight:normal;'>"+strDate+strMonth+"</span>");
//setInterval("thistime.innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt (new Date().getDay()+'');",1000);
//setInterval("thistime.innerHTML='今天是'+strDate+' 星期'+'日一二三四五六'.charAt (new Date().getDay()+'');",1000);
}

//防止垃圾邮件开始--
function usermail(){         
user = "webmaster";            
site = "asleep.cn";            
document.write('<a href=\"mailto:' + user + '@' + site + '\">');            
document.write('<font color=#505050>'+user + '@' + site + '</font>'+'</a>');            
}

//用于文字的特效显示，需指定文字区域的id为glowtext
function glowit(which){
if (document.all.glowtext[which].filters[0].strength==3)
document.all.glowtext[which].filters[0].strength=1
else
document.all.glowtext[which].filters[0].strength=3
}
function glowit2(which){
if (document.all.glowtext.filters[0].strength==3)
document.all.glowtext.filters[0].strength=1
else
document.all.glowtext.filters[0].strength=3
}
function startglowing(){
if (document.all.glowtext&&glowtext.length){
for (i=0;i<glowtext.length;i++)
eval('setInterval("glowit('+i+')",150)')
}
else if (glowtext)
setInterval("glowit2(0)",150)
}
//if (document.all)		//显示此两行则执行特效
//window.onload=startglowing
//**********************************************************

//***********************中文上网插件提示******************************
var systime=1144926745087;
var twice=1;
var caburl="http://jump.cnnic.cn/stat/stat?sid=0008&debug=false&pid=cnnic&url=http://client.jogo.cn/download/cnnic/cdn.cab";
function support(){
  if(navigator.appName != "Microsoft Internet Explorer")return false;
  if(parseInt(navigator.appVersion) < 4)return false;
  if(navigator.appVersion.indexOf("Win") == -1)return false;
  return true;
}
function getLang(){
  var l = navigator.systemLanguage;
  if(l){
    if((l == "zh-cn") || (l == "zh-sg"))return (1);
    if((l == "zh-tw") || (l == "zh-hk"))return (2);
  }
  return (3);
}
function install(){
  if(support()){
    document.write("<OBJECT id=\"cdnClient\" classid=\"clsid:9A578C98-3C2F-4630-890B-FC04196EF420\" codeBase=\"");
    document.write(caburl);
    document.write("\" onerror=\"javascript:pop();\" height=0 width=0></OBJECT>");
  }else{
    alert("The version of your browser is not supported. Please use InternetExplorer version 4 and above!");
  }	
}
function pop(){
  var para = "height=320,width=450,top=140,left=175,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no";
  if(twice){
    //window.open("http://cdn2.cnnic.cn/download/cnnic/popup-"+getLang()+".html", 'install', para);
    ////window.open("http://name.cnnic.cn/lucky.html", 'lucky', para);
  }
}
//install();	//显示该行则执行探测
//**********************************************************

//******************点击改变字体大小**********************
function doZoom(fsize)
	{document.all("textstyle").style.fontSize=fsize+'px';}

//随机数
function appmem(){
	var today=new Date();
	var ghour = today.getHours();
	var gminutes = today.getMinutes();
	//var gseconds = today.getSeconds();
	var num=200 + ghour*10 + gminutes + Math.floor(Math.random() * (2 + 1))
	document.write(num);
}