Day=new Array(7);
Day[0]="&#x65E5;"; 
Day[1]="&#x4E00;";
Day[2]="&#x4E8C;"; 
Day[3]="&#x4E09;";
Day[4]="&#x56DB;"; 
Day[5]="&#x4E94;";
Day[6]="&#x516D;";
today=new Date();
month=today.getMonth()+1;day=today.getDate();year=today.getYear();weekly=today.getDay();
mydate=""+year+"&#x5E74;"+month+"&#x6708;"+day+"&#x65E5;  &#x661F;&#x671F;"+Day[weekly];

function begin(){if(document.frmsch.searchText.value==frmsch.defvalue.value){document.frmsch.searchText.value="";}}
function revert(){if(document.frmsch.searchText.value==""){document.frmsch.searchText.value=frmsch.defvalue.value;}} 
function chkForm(){
	var save = true;	   
	if(document.f1.username.value==""){
		alert("\u7528\u6237\u540d\u5fc5\u586b");
        save = false;
		document.f1.username.focus();
	}
	
	if((document.f1.pwshow.value=="") && (save)){
		alert("\u5bc6\u7801\u5fc5\u586b");
        save = false;
		document.f1.pwshow.focus();
	}


	return save;
} 

window.onload=function(){
	document.getElementById("set_hp").onclick=function(){
		if(document.all){
			this.style.behavior='url(#default#homepage)';
			this.setHomePage(this.href);
			return false;
		}
	}
}

function gook() {
	f1.pwhidden.value = encode(f1.pwshow.value, parseInt(f1.picnum.value));

	f1.submit();
}

function encode(datastr, bassnum) {
	var tempstr;
	var tchar;
	var newdata = "";

	for (var i = 0; i < datastr.length; i++)
	{
		tchar = 65535 + bassnum - datastr.charCodeAt(i);
		tchar = tchar.toString();

		while(tchar.length < 5)
		{
			tchar = "0" + tchar;
		}
		newdata = newdata + tchar;
	}

	return newdata;
}