function getObj(objName){
	if(document.getElementById){
		return eval('document.getElementById("' + objName + '")');
	}else if(document.layers){
		return eval("document.layers['" + objName +"']");
	}else{
		return eval('document.all.' + objName);
	}
}

function tt(sName,n){	
	getObj(sName+"0").className = "t1_f";
	getObj(sName+"1").className = "t1_f";
	getObj(sName+"2").className = "t1_f";
	getObj(sName+"_0").style.display = "none";
	getObj(sName+"_1").style.display = "none";
	getObj(sName+"_2").style.display = "none";
	getObj(sName+n).className = "t1_t";
	getObj(sName+"_"+n).style.display = "";	
}

function showTitle(stName,stTitle){
	var st,sp,i,s;
	st = stTitle.split(",");
	document.writeln("<div class='t1'>");
	for(i=0;i<3;i++){
		if(i==0){s="t1_t"}else{s="t1_f"}
		document.writeln("<div class=\"" + s + "\" id=\"" + stName + i + "\" onmouseover=\"javascript:tt('" + stName + "','" + i + "');\">" + st[i] + "</div>");
		}
	document.writeln("</div>")
}	

function login(){
	var pdSubmit=1;
	if (document.form1.txtuser.value == "" || document.form1.txtpwd.value == ""){
		alert("用户名和密码均必须填写！");
		document.form1.txtuser.focus();
		pdSubmit=0;
		}
	if (document.form1.select1.value == "mail"){
		document.form1.name.value = document.form1.txtuser.value;
		document.form1.passwd.value = document.form1.txtpwd.value;
		document.form1.domain.value = "yuenet.cn";
		document.form1.action = "http://mail.yuenet.cn/login.php?Cmd=login";
		}
	if (document.form1.select1.value == "mail1"){
		document.form1.name.value = document.form1.txtuser.value;
		document.form1.passwd.value = document.form1.txtpwd.value;
		document.form1.domain.value = "jyt.com.cn";
		document.form1.action = "http://mail.yuenet.cn/login.php?Cmd=login";
		}
	if (pdSubmit == 1){
		document.form1.submit();
	}
	document.form1.txtpwd.value = ""
}