<!--
function addBookmark(anchor)
{
    if (window.external)
    {
          window.external.AddFavorite(anchor.getAttribute("href"), anchor.getAttribute("title"));
          return false;
    }
    return true;
}

function CNH()
{
	if(NHform.realname.value=="")
		{
			alert("请填写您的姓名！");
			document.NHform.realname.focus();
			return false;
		}

	if(NHform.tel.value==""&&NHform.fax.value==""&&NHform.email.value=="")
		{
			alert("电话、传真、E-mail必须选填一项！\n以便我们的工程师与您联系！");
			document.NHform.tel.focus();
			return false;
		}

	if(NHform.size.value=="")
		{
			alert("请填写浪潮空压机型号！");
			document.NHform.size.focus();
			return false;
		}

	if(NHform.text.value=="")
		{
			alert("请填写故障信息！");
			document.NHform.text.focus();
			return false;
		}

}


function ios()
{
	if(ios_form.pql.value!=""||ios_form.pql2.value!="")
	{
		if(ios_form.pql.value=="")
		{
		alert("请输入排气量的最小值");
		document.ios_form.pql.focus();
		return false;
		}
		if(ios_form.pql2.value=="")
		{
		alert("请输入排气量的最大值");
		document.ios_form.pql2.focus();
		return false;
		}
	}
	
	
	if(ios_form.pqyl.value!=""||ios_form.pqyl2.value!="")
	{
		if(ios_form.pqyl.value=="")
		{
		alert("请输入排气压力的最小值");
		document.ios_form.pqyl.focus();
		return false;
		}
		if(ios_form.pqyl2.value=="")
		{
		alert("请输入排气压力的最大值");
		document.ios_form.pqyl2.focus();
		return false;
		}
	}
	
	if(ios_form.djgl.value!=""||ios_form.djgl2.value!="")
	{
		if(ios_form.djgl.value=="")
		{
		alert("请输入电机功率的最小值");
		document.ios_form.djgl.focus();
		return false;
		}
		if(ios_form.djgl2.value=="")
		{
		alert("请输入电机功率的最大值");
		document.ios_form.djgl2.focus();
		return false;
		}
	}
	
}


var perid;
var thisid;
var thisbid;
function showdiv(id)
{

	if(!perid)
	{perid=document.getElementById('wel_t');}
	perid.style.display="none";
	thisid=document.getElementById(id);
	thisid.style.display="block";
	perid=thisid;

}

function changB(bid)
{

	if(thisbid)
	{thisbid.className="navli";}
	thisbid=document.getElementById(bid);
	thisbid.className="navli2";

}



function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


function CT(text)
{
	var tt=document.getElementById("Ch_T");
	
	if(text)
		{
			tt.innerHTML=text;
		}
	else
		{
			tt.innerHTML="机器型号";
		}

}


function CHTML(id,text)
{
	var t=document.getElementById(id);
		t.innerHTML=text;

}


function CC(id,name)
{
	var c=document.getElementById(id);
		c.className=name;
}

function CL(id,v)
{
	var c=document.getElementById(id);
		c.style.visibility=v;
}


var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
//extra height in px to add to iframe in FireFox 1.0+ browsers
var FFextraHeight=getFFVersion>=0.1? 16 : 0 

function dyniframesize(iframename) {
  var pTar = null;
  if (document.getElementById){
    pTar = document.getElementById(iframename);
  }
  else{
    eval('pTar = ' + iframename + ';');
  }
  if (pTar && !window.opera){
    //begin resizing iframe
    pTar.style.display="block"
    
    if (pTar.contentDocument && pTar.contentDocument.body.offsetHeight){
      //ns6 syntax
      pTar.height = pTar.contentDocument.body.offsetHeight+FFextraHeight; 
    }
    else if (pTar.Document && pTar.Document.body.scrollHeight){
      //ie5+ syntax
      pTar.height = pTar.Document.body.scrollHeight;
    }
  }
}


var flag=false;
function DrawImage(ImgD,FitWidth,FitHeight){
   var image=new Image();
   image.src=ImgD.src;
   if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= FitWidth/FitHeight){
     if(image.width>FitWidth){  
     ImgD.width=FitWidth;
     ImgD.height=(image.height*FitWidth)/image.width;
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }

     }
    else{
     if(image.height>FitHeight){  
     ImgD.height=FitHeight;
     ImgD.width=(image.width*FitHeight)/image.height;     
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }

     }
    }
}
//-->
