function bbimg(obj){
	
	}
function DrawImage(MyPic,W,H){
  var flag=false;
  var image=new Image();
  image.src=MyPic.src;
  if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= W/H){
      if(image.width>W){
        MyPic.width=W;
        MyPic.height=(image.height*W)/image.width;
      }
	  else{
        MyPic.width=image.width;
        MyPic.height=image.height;
      }
    }
    else{
      if(image.height>H){
        MyPic.height=H;
        MyPic.width=(image.width*H)/image.height;
      }
	  else{
        MyPic.width=image.width;
        MyPic.height=image.height;
      }
    }
  }
}
function chkSearch(obj){
	if(obj.KeyWord.value==''){
			alert("请输入关键字再点击搜索！");
			obj.KeyWord.focus();
			return false;
		}
	}
function chkbook(obj){
	if(obj.name.value==""){
		alert("请输入你的姓名");
		obj.name.focus()
		return false;
	}
	/*if(obj.company.value==""){
		alert("请输入公司名称");
		obj.company.focus()
		return false;
	}
	if(obj.tel.value==""){
		alert("请你输入联系电话");
		obj.tel.focus()
		return false;
	}
	if(obj.Mobile.value==""){
		alert("请你输入移动电话");
		obj.Mobile.focus()
		return false;
	}*/
	if(obj.MesName.value==""){
		alert("请输入咨询主题");
		obj.MesName.focus()
		return false;
	}
	if(obj.content.value==""){
		alert("请输入咨询内容");
		obj.content.focus()
		return false;
	}
	if(obj.code.value==""){
		alert("请输入验证码");
		obj.code.focus()
		return false;
	}
}

function flash(sFile,sWidth,sHeight){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+ sWidth +'" height="'+ sHeight +'"> ');
	document.write('<param name="movie" value="'+ sFile +'"> ');
	document.write('<param name="quality" value="high"> ');
	document.write('<param name="wmode" value="transparent"> ');
	document.write('<param name="menu" value="false"> ');
	document.write('<embed src="'+ sFile +'" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ sWidth +'" height="'+ sHeight +'"></embed> ');
	document.write('</object> ');
}

