﻿// JScript 文件

var flag=false; 
function DrawImage(ImgD,ImgH){ 
 var image=new Image(); 
 image.src=ImgD.src; 
 if(image.width>0 && image.height>0){ 
  flag=true; 
  if(image.width/image.height>= ImgH/ImgH){ 
   if(image.width>ImgH){
    ImgD.width=ImgH; 
    ImgD.height=(image.height*ImgH)/image.width; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
  // ImgD.alt=" "; 
  } 
  else{ 
   if(image.height>ImgH){
    ImgD.height=ImgH; 
    ImgD.width=(image.width*ImgH)/image.height; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
 //  ImgD.alt=" "; 
  } 
 }
}
function MM_setTextOfTextfield(objId,x,newText) { //v9.0
  with (document){ if (getElementById){
    var obj = getElementById(objId);} if (obj) obj.value = newText;
  }
}

//显示隐藏层（多个菜单项的情况下）
 function showmenu(id)
	 {
		var curid = document.getElementById("curid");	//获取当前案例id
		if(curid.value != "")
		{
			curid.style.display = "none";
			document.getElementById(id).style.display = "block";
			curid.style.display = "none";
		}else{
			document.getElementById(id).style.display = "block";
			document.getElementById("curid").value = id;
		}
		
	 }
隐藏层	 
function hiddenmenu(id)
	 {
		document.getElementById(id).style.display = "none";
		
	 }

