// Flash Image Extension for Dreamwever ,by wushanfeng (wushf@aiecc.com)
 	var Obj;
	var imgOpen = new Image()
	var imgClose = new Image()
    imgOpen.src="images/open.gif"
	imgClose.src="images/close.gif"
	
	function expand(el)
	{
	  //alert(el);
		Obj = eval("child"+el)		 
		var whichEl = (event) ? event.srcElement : false
		if(!whichEl.name) whichEl = eval("document.all.img" + el)
	
		if(Obj.style.display == "none")
			{
			Obj.style.display = "block"
			whichEl.src = imgOpen.src
			}
		else
			{
			Obj.style.display = "none"
			whichEl.src = imgClose.src
			}
	}

var imgObj;
function checkImg(theURL,winName){
  // 对象是否已创建
  if (typeof(imgObj) == "object"){
    // 是否已取得了图像的高度和宽度
    if ((imgObj.width != 0) && (imgObj.height != 0))
      // 根据取得的图像高度和宽度设置弹出窗口的高度与宽度，并打开该窗口
      // 其中的增量 20 和 30 是设置的窗口边框与图片间的间隔量
      OpenFullSizeWindow(theURL,winName, ",width=" + (imgObj.width+20) + ",height=" + (imgObj.height+30));
    else
      // 因为通过 Image 对象动态装载图片，不可能立即得到图片的宽度和高度，所以每隔100毫秒重复调用检查
      setTimeout("checkImg('" + theURL + "','" + winName + "')", 100)
  }
}

function OpenFullSizeWindow(theURL,winName,features) {
  var aNewWin, sBaseCmd;
  // 弹出窗口外观参数
  sBaseCmd = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,";
  // 调用是否来自 checkImg 
  if (features == null || features == ""){
    // 创建图像对象
    imgObj = new Image();
    // 设置图像源
    imgObj.src = theURL;
    // 开始获取图像大小
    checkImg(theURL, winName)
  }
  else{
    // 打开窗口
    aNewWin = window.open(theURL,winName, sBaseCmd + features);
    // 聚焦窗口
    aNewWin.focus();
  }
}


function MM_openBrWindow(theURL,winName,features)
 { //v2.0
  window.open(theURL,winName,features);
 }
 
 function clearform(f1)
  {
   document.all.f1.reset(); 
   return false;
   }
 
 function link(par)  //更多连接的窗口打开
{
 var linkUrl = "" ;
  linkUrl = par.options[par.selectedIndex].value;
  //alert(linkUrl);
  //this.location.href=linkUrl;  
  if (linkUrl.length != 0)
   var neww = window.open(linkUrl,"_blank")
 }
 
 function order_Check(f1) //业务员登陆检测
{
		{ 
		  var flag=true;
		  if(f1("name").value=="")
	      {
           alert("请输入你的姓名");
		   f1("name").focus();
		   return false;
		   }
		   if(f1("company").value=="")
	      {
            alert("请输入公司名称");
		   f1("company").focus();
		   return false;
		   }
		   if(f1("ph1").value=="" ||f1("ph2").value==""|| f1("ph3").value=="" )
	      {
            alert("请输入完整的电话号码");
		    f1("ph1").focus();
		   return false;
		   }
		   if(f1("fax1").value=="" ||f1("fax2").value==""|| f1("fax3").value=="" )
	      {
            alert("请输入完整的传真");
		    f1("fax1").focus();
		   return false;
		   }
		   if(f1("country").value=="")
		   {
		    alert("请输入你所在的国家或者地区");
			 f1("country").focus();
			return false;
		    }
         return flag;
		 }		
}

 function order_Check_En(f1) //业务员登陆检测
{
		{ 
		  var flag=true;
		  if(f1("name").value=="")
	      {
           alert("Please Input The Name");
		   f1("name").focus();
		   return false;
		   }
		   if(f1("company").value=="")
	      {
            alert("Please Input The Company Name");
		   f1("company").focus();
		   return false;
		   }
		   if(f1("ph1").value=="" ||f1("ph2").value==""|| f1("ph3").value=="" )
	      {
            alert("Please Input The Correct Telephone");
		    f1("ph1").focus();
		   return false;
		   }
		   if(f1("fax1").value=="" ||f1("fax2").value==""|| f1("fax3").value=="" )
	      {
            alert("Please Input The Correct Fax");
		    f1("fax1").focus();
		   return false;
		   }
		   if(f1("country").value=="")
		   {
		    alert("Please Input The Country or Area");
			f1("country").focus();
			return false;
		    }
         return flag;
		 }		
}

 function service_Check(f1) //业务员登陆检测
{
		{ 
		  var flag=true;
		  if(f1("name").value=="")
	      {
           alert("请输入你的姓名");
		   f1("name").focus();
		   return false;
		   }
		   if(f1("company").value=="")
	      {
            alert("请输入公司名称");
		   f1("company").focus();
		   return false;
		   }
		   if(f1("ph1").value=="" ||f1("ph2").value==""|| f1("ph3").value=="" )
	      {
            alert("请输入完整的电话号码");
		    f1("ph1").focus();
		   return false;
		   }
		   if(f1("fax1").value=="" ||f1("fax2").value==""|| f1("fax3").value=="" )
	      {
            alert("请输入完整的传真");
		    f1("fax1").focus();
		   return false;
		   }		   
         return flag;
		 }		
}

 function service_Check_En(f1) //业务员登陆检测
{
		{ 
		  var flag=true;
		  if(f1("name").value=="")
	      {
           alert("Please Input The Name");
		   f1("name").focus();
		   return false;
		   }
		   if(f1("company").value=="")
	      {
            alert("Please Input The Company Name");
		   f1("company").focus();
		   return false;
		   }
		   if(f1("ph1").value=="" ||f1("ph2").value==""|| f1("ph3").value=="" )
	      {
            alert("Please Input The Correct Telephone");
		    f1("ph1").focus();
		   return false;
		   }
		  if(f1("fax1").value=="" ||f1("fax2").value==""|| f1("fax3").value=="" )
	      {
            alert("Please Input The Correct Fax");
		    f1("fax1").focus();
		   return false;
		   }		   
         return flag;
		 }		
}

 function fm_Search_Check(fm_search) //查询检测
  {
		{ 
		  var flag=true;
		   if(fm_search("S_Title").value=="")
	       {
           alert("请输入查询关键字");
		    fm_search("S_Title").focus();
		   return false;
		   }
		   
		  if(fm_search("Search_Style").value=="")
	      {
            alert("请选择产品类别");		   
		   return false;
		   }
		   
		   if(fm_search("bmid").value=="")
	      {
            alert("请选择部门名称");		   
		   return false;
		   }
		 
         return flag;
		 }		
  }


function fontZoom(size)  //字体大小
{
 document.getElementById('fontzoom').style.fontSize=size+'px'
}



function XjCheck(xj_form)  //留言
{
 
	 if (xj_form.name.value=="")
	{
    window.alert("请输入姓名");
	xj_form.name.focus();
	return false;
	 }
	if (xj_form.tel.value=="")
	{
    window.alert("请输入电话");
	xj_form.tel.focus();
	return false;
	 }
        if (xj_form.email.value=="" || xj_form.email.value.indexOf("@")<0 || xj_form.email.value.indexOf(".")<0)
         {
   window.alert("请正确的输入email");
        xj_form.email.focus();
        return false;
         }
    return true; 
		
}	

function XjCheck_En(xj_form)  //留言
{
 
	 if (xj_form.name.value=="")
	{
    window.alert("Please Input Your Name");
	xj_form.name.focus();
	return false;
	 }
	if (xj_form.tel.value=="")
	{
    window.alert("Please Input Your Tel");
	xj_form.tel.focus();
	return false;
	 }
        if (xj_form.email.value=="" || xj_form.email.value.indexOf("@")<0 || xj_form.email.value.indexOf(".")<0)
         {
   window.alert("Please Input The Correct Email");
        xj_form.email.focus();
        return false;
         }
    return true; 
		
}	

function ContactCheck(Contact_form)  //留言
{
	if (Contact_form.company.value=="")
	{
    window.alert("请输入你所属公司");
	Contact_form.company.focus();
	return false;
	 }
	 if (Contact_form.name.value=="")
	{
    window.alert("请输入姓名");
	Contact_form.name.focus();
	return false;
	 }
	  if (Contact_form.tel.value=="")
	{
    window.alert("请输入电话");
	Contact_form.tel.focus();
	return false;
	 }
        if (Contact_form.email.value=="" || Contact_form.email.value.indexOf("@")<0 || Contact_form.email.value.indexOf(".")<0)
         {
   window.alert("请正确的输入email");
        Contact_form.email.focus();
        return false;
         }
    return true; 
		
}	


function ContactCheck_En(Contact_form)  //留言
{
	if (Contact_form.company.value=="")
	{
    window.alert("Please Input The Company");
	Contact_form.company.focus();
	return false;
	 }
	 if (Contact_form.name.value=="")
	{
    window.alert("Please Input Your Name");
	Contact_form.name.focus();
	return false;
	 }
	  if (Contact_form.tel.value=="")
	{
    window.alert("Please Input The Tel");
	Contact_form.tel.focus();
	return false;
	 }
        if (Contact_form.email.value=="" || Contact_form.email.value.indexOf("@")<0 || Contact_form.email.value.indexOf(".")<0)
         {
   window.alert("Please Input The Correct Email");
        Contact_form.email.focus();
        return false;
         }
    return true; 
		
}	
 
