// JavaScript Document
var flag=false;
function DrawImagee(ImgD,w,h){
var max_height = h 
var max_width = w	
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>max_width){ 
ImgD.width=max_width;
ImgD.height=(image.height*max_width)/image.width;
}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}
}
else{
if(image.height>max_height){ 
ImgD.height=max_height;
ImgD.width=(image.width*max_height)/image.height; 
}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}
}
}
} 
function showmypic (pic) { 	
	if (document.getElementById) { 		
	document.getElementById('BigPic').src = pic.href;
	return false; 	
	} 
	  else { return true; } 
}