﻿function FontZoom(Size,LineHeight,Id)
 {
   var Obj=document.getElementById(Id);
   Obj.style.fontSize=Size; 
   Obj.style.lineHeight=LineHeight; 
 }


function IsNum(str)
 {
   var str1="0123456789";
   var Astr=str.split('');
   for(i=0;i<Astr.length;i++)
    {
      if(str1.indexOf(Astr[i])<0)
       {
        return false;
       }
    }
  return true;

 }

//改变验证码
function Code_Change()
 {
  Obj=document.getElementById("ImageCheck");
  if(Obj.src.indexOf("Yzm.aspx")>=0)
   {
    Obj.src="/vali/Yzm1.aspx";
   }
  else
   {
    Obj.src="/vali/Yzm.aspx"
   }
 }

function isOver(sText,len)
 {
    var intlen=sText.value.length;
    if (intlen>len)
    {
       alert("字符不能超过 "+len);
       sText.focus();
       sText.select();
    }
}

function resizeimg(ImgD,iwidth,iheight) {
     var image=new Image();
     image.src=ImgD.src;
     if(image.width>0 && image.height>0)
	 {
        if(image.width/image.height>= iwidth/iheight)
		{
           if(image.width>iwidth){
               ImgD.width=iwidth;
               ImgD.height=(image.height*iwidth)/image.width;
           }else{
                  ImgD.width=image.width;
                  ImgD.height=image.height;
                }
               //ImgD.alt="宽×高:"+image.width+"×"+image.height;
        }
        else
		{
                if(image.height>iheight){
                       ImgD.height=iheight;
                       ImgD.width=(image.width*iheight)/image.height;
                }else{
                        ImgD.width=image.width;
                        ImgD.height=image.height;
                     }
                //ImgD.alt="宽×高:"+image.width+"×"+image.height;
         }
    }
} 




