// JavaScript Document
function sendchk()
{
	if(document.form1.uname.value.length<2)
	{
		alert("错误提示:\n\n请输入您的姓名");
		document.form1.uname.focus();
		return false;
	}
	if(document.form1.utel.value.length<7 || document.form1.utel.value.length>12 || isNaN(document.form1.utel.value))
	{
		alert("错误提示:\n\n请输入您的电话或手机");
		document.form1.utel.focus();
		return false;
	}
    if(document.form1.uemail.value.length!=0)
     {
       if (document.form1.uemail.value.charAt(0)=="." ||        
            document.form1.uemail.value.charAt(0)=="@"||       
            document.form1.uemail.value.indexOf('@', 0) == -1 || 
            document.form1.uemail.value.indexOf('.', 0) == -1 || 
            document.form1.uemail.value.lastIndexOf("@")==document.form1.uemail.value.length-1 || 
            document.form1.uemail.value.lastIndexOf(".")==document.form1.uemail.value.length-1)
        {
         alert("错误提示:\n\nEmail地址格式不正确！");
         document.form1.uemail.focus();
         return false;
         }
      }
    else
     {
      alert("错误提示:\n\nEmail不能为空！");
      document.form1.uemail.focus();
      return false;
      }
	if(document.form1.ucontent.value.length<5)
	{
		alert("能否多提供点您的需求呢?");
		document.form1.ucontent.focus();
		return false;
	}

}


function message()
{
	if(document.form1.gtitle.value=="")
	{
		alert("请填写留言主题");
		document.form1.gtitle.focus();
		return false;
	}
	if(document.form1.gcontent.value.length<=10)
	{
		alert("留言内容必须在十字以上!");
		document.form1.gcontent.focus();
		return false;
	}
}

function chkorderform()
{
	if(document.orderform.t12.value==""||document.orderform.t13.value=="")
	{
	alert("请填写您的电话号码或电子邮件!");	
	return false;
	}
	
}


function getFlashObject(flashSrc, objWidth, objHeight, etcParam) {
	var tag = "";
	var baseFlashDir="";
	flashSrc = baseFlashDir + flashSrc;

	if ( etcParam != "" || etcParam != null ) {
		if ( etcParam.substr(0, 1) == "?" )
			flashSrc += etcParam;
		else
			flashSrc += "?" + etcParam;
	}

	tag += "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ";
	tag += "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" ";
	tag += "width=\"" + objWidth + "\" height=\"" + objHeight + "\">";
	tag += "<param name=\"movie\" value=\"" + flashSrc + "\" />";
	tag += "<param name=\"quality\" value=\"high\" />";
//	tag += "<param name=\"wmode\" value=\"transparent\" />";
	tag += "<embed src=\"" + flashSrc + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ";
	tag += "type=\"application/x-shockwave-flash\" width=\"" + objWidth + "\" height=\"" + objHeight + "\" ";
	tag += "wmode=\"transparent\"></embed>";
	tag += "</object>";

	document.write(tag);
}

