﻿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("Sorry, message name is not empty ！");
		document.form1.cname.focus();
		return false;
	}
	if (document.form1.dh.value==""){
       alert ("Sorry, message tel is not empty ！");
       document.form1.dh.focus();
       return(false);
    }
	if (document.form1.email.value==""){
       alert ("Sorry, message email is not empty ！");
       document.form1.email.focus();
       return(false);
    }
	if (document.form1.CheckCode.value==""){
       alert ("Sorry, message SecurityCode is not empty ！");
       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 flash(name, height, width){
	var str = "<object type=\"application/x-shockwave-flash\" data=\"" + name + "\" height=\"" + height + "\" width=\"" + width + "\">"
	str += "<param name=\"movie\" value=\"" + name + "\" />"
	str += "<param name=\"menu\" value=\"false\" />"
	str += "</object>"
	document.write(str);
}
