﻿var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
var client_browse = "";
if(document.getElementById)
{client_browse="ie5";}	// IE5+,NN6+	document.getElementById("id")
else if(document.all)
{client_browse="ie4";}	// IE4	document.all("id");
else if(document.layers)
{client_browse="ns4";}	// NN4	document.layers["id"];
function get(strname)
{
	switch(client_browse){
		case "ie5":
			return document.getElementById(strname);
			break;
		case "ns4":
			return document.layers[strname];
			break;
		default:	//"ie4"
			return document.all(strname);
			break;
	}
}

function yz_guest()
{
	if(document.form1.cname.value=="")
	{
		alert("请输入姓名！");
		document.form1.cname.focus();
		return false;
	}
	if(document.form1.dz.value == "")
	{
		alert("请输入地址！");
		document.form1.dz.focus();
		return false;
	}
	if (document.form1.dh.value==""){
       alert ("请输入您的电话！");
       document.form1.dh.focus();
       return(false);
    }
	if (document.form1.content.value==""){
       alert ("请输入您的内容！");
       document.form1.content.focus();
       return(false);
    }
	if (document.form1.CheckCode.value==""){
       alert ("请输入验证码！");
       document.form1.CheckCode.focus();
       return(false);
    }
}
function imageJump()
{
	document.getElementById("image1").src='admincheckcode.asp';
	return false;
}
function menuDisplay(obj, n){
	for(i=1; i<=n; i++){
		get("li_" + i).style.display = "none";
	}
	get("li_" + obj).style.display = "block";
}
function menuDisplay_1(obj, n){
	for(i=1; i<=n; i++){
		get("li1_" + i).style.display = "none";
	}
	get("li1_" + obj).style.display = "block";
}
