// JavaScript Document
function expand(name,cursel,n){ 
for(i=1;i<=n;i++){ 
var menu=document.getElementById(name+i);  
menu.style.display=i==cursel?"block":"none"; 
} 
} 
function setNav(name,cursel,n){ 
for(i=1;i<=n;i++){ 
var menu=document.getElementById(name+i); 
menu.className=i==cursel?"choose":""; 
} 
}
var flag=false; 
function DrawImage(ImgD){ 
    var image=new Image(); 
    image.src=ImgD.src; 
    if(image.width>0 && image.height>0){ 
        flag=true; 
        if(image.width>275){
            ImgD.height = (image.height*275)/image.width;
            ImgD.width = 275;
        }
		if(image.height>180){
            ImgD.width = (image.width*180)/image.height;
            ImgD.height = 180;
        }
    }
}

function reloadCode() {
  document.getElementById("ValidateCode1").setAttribute("src","Common/Controls_New/ValidateCode.aspx?"+Math.random());
  return false;
  } 
