
<!-- 
var flag=false; 
function DrawImage(ImgD,width,height){ 
	/*var image=new Image(); 
	image.src=ImgD.src; 
	if(image.width>0 && image.height>0){ 
		flag=true; 
		if(image.width/image.height>= width/height){ 
			if(image.width>width){  
				ImgD.width=width; 
				ImgD.height=(image.height*width)/image.width; 
			}else{ 
				ImgD.width=image.width;  
				ImgD.height=image.height; 
			} 
			ImgD.alt=image.width+"กม"+image.height; 
		} 
		else{ 
			if(image.height>height){  
				ImgD.height=height; 
				ImgD.width=(image.width*height)/image.height;  
			}else{ 
				ImgD.width=image.width;  
				ImgD.height=image.height; 
			} 
			ImgD.alt=image.width+"กม"+image.height; 
		} 
	} */
	var image=new Image(); 
	image.src=ImgD.src; 
	ImgD.width = width;
	ImgD.height = height;
	//ImgD.alt=image.width+"*"+image.height; 
}  
//--> 

function fucCheckNUM(NUM){
	var i,j,strTemp;
    strTemp="0123456789.";
    if(NUM.length== 0)
		return 0
	for (i=0;i<NUM.length;i++){
		j=strTemp.indexOf(NUM.charAt(i)); 
		if (j==-1)
		//is not a number
			return 0;
	}
    //is num
    return 1;
}

