
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/image.height>= 130/90){
if(image.width>130){ 
ImgD.width=130;
ImgD.height=(image.height*130)/image.width;
}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}
}
else{
if(image.height>90){ 
ImgD.height=90;
ImgD.width=(image.width*90)/image.height; 
}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}
}
}
} 


function DrawImagess(ImgD){
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag=true;
if(image.width/image.height>= 150/50){
if(image.width>150){ 
ImgD.width=150;
ImgD.height=(image.height*150)/image.width;
}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}
}
else{
if(image.height>50){ 
ImgD.height=50;
ImgD.width=(image.width*50)/image.height; 
}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}
}
}
} 


function DrawImagesj(ImgD){
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag=true;
if(image.width/image.height>= 150/150){
if(image.width>150){ 
ImgD.width=150;
ImgD.height=(image.height*150)/image.width;
}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}
}
else{
if(image.height>150){ 
ImgD.height=150;
ImgD.width=(image.width*150)/image.height; 
}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}
}
}
} 

function checkpr(suook)
{
var suook=suook;
if (suook==1){
if (document.suo.contet1.value.length<1){
	alert('ÇëÊäÈëËÑË÷ÄÚÈÝ!');
	document.suo.contet1.focus();
	return false;
	}else{
	document.suo.submit();
	}
}
if (suook==2){
if (document.suo.contet2.value.length<1){
	alert('ÇëÊäÈëËÑË÷ÄÚÈÝ!');
	document.suo.contet2.focus();
	return false;
	}else{
	document.suo.submit();
	}
}
if (suook==3){
if (document.suo.contet3.value.length<1){
	alert('ÇëÊäÈëËÑË÷ÄÚÈÝ!');
	document.suo.contet3.focus();
	return false;
	}else{
	document.suo.submit();
	}
}
if (suook==4){
if (document.suo.contet4.value.length<1){
	alert('ÇëÊäÈëËÑË÷ÄÚÈÝ!');
	document.suo.contet4.focus();
	return false;
	}else{
	document.suo.submit();
	}
}
}
