    function ChkInteger(value)
    {
        var reg=new RegExp(/\d+/);
        return reg.test(value);
    }

   function ChkDateValid(ControlName)
    {
        var obj=document.getElementById(ControlName).value;
		if(obj=="")
		  return false;
var reg=new RegExp(/\b\d{4}-(([0-2][0-9]),(3[0-1]),([0-9])){1}-(([0-2][0-9]),(3[0-1]),([0-9])){1}\b/);
        reg.global=true;
        if(reg.test(obj))
          return true;
        else
         {
           return false;
         }  
    }

function DrawImage(ImgD,param){ 
 var image=new Image(); 
 image.src=ImgD.src; 
 if(image.width>0 && image.height>0){ 
  flag=true; 
  if(image.width/image.height>= 1){ 
   if(image.width>param){
    ImgD.width=param; 
    ImgD.height=(image.height*param)/image.width; 
   }
   else
   { 
    ImgD.height=param; 
    ImgD.width=(image.width*param)/image.height; 
//    ImgD.width=image.width;
  //  ImgD.height=image.height; 
   } 
   ImgD.alt="点击查看详细信息..."; 
  } 
  else{ 
   if(image.height>param){
    ImgD.height=param; 
    ImgD.width=(image.width*param)/image.height; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
   ImgD.alt="点击查看详细信息..."; 
  } 
 }
}

