<!--

			// onBlur=>fucPWDchk(this)
			function fucPWDchk(theElement){
				var str=theElement.value;
				var strSource ='_-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
				var ch;
				var i;
				var temp;
				var ret;
				for (i=0;i<=(str.length-1);i++){
					ch = str.charAt(i);
					temp = strSource.indexOf(ch);
					if (temp==-1){
						ret = 0;
					}
				}
				if (strSource.indexOf(ch)==-1){
					ret = 0;
				}
				else{
					ret = 1;
				}
				if(str.length>0 && ret==0){
					alert('eng number only'); 
					theElement.value="";
					theElement.focus(); 
					return false; 
				}
			}


			//onKeypress=>JHshNumberText()
			function JHshNumberText(){
			if ( !(((window.event.keyCode >= 48) && (window.event.keyCode <= 57)) 
			|| (window.event.keyCode == 13) || (window.event.keyCode == 46) 
			|| (window.event.keyCode == 45)))
			{
			window.event.keyCode = 0 ;
			}
			} 
			//checkbox sel all fn
			function SelAll_checkbox( theForm,x ) {
				if(!x){
					x=0;
				}
				len=Number(theForm.elements.length)-x;
				for (var i=x;i<len;i++) {
					var e = theForm.elements[i];
				    if (e.name != 'allbox'){
		               e.checked = !e.checked;
					}
				 }
			 }


			//onBlur=>fucPWDchk(this)
			function fucDatechk(theElement){
				var str=theElement.value;
				var strSource ='0123456789-: ';
				var ch;
				var i;
				var temp;
				var ret;
				for (i=0;i<=(str.length-1);i++){
					ch = str.charAt(i);
					temp = strSource.indexOf(ch);
					if (temp==-1){
						ret = 0;
					}
				}
				if (strSource.indexOf(ch)==-1){
					ret = 0;
				}
				else{
					ret = 1;
				}
				if(str.length>0 && ret==0){
					alert('date only'); 
					theElement.focus(); 
					return false; 
				}
			}


//preview upload pic
function PreviewPic(Value){
	document.all.uploadimage.width=10;
	document.all.uploadimage.height=10;
	document.all.uploadimage.alt="";
	document.all.uploadimage.src=Value;
}


function FileChange(idname,Value){
	img=document.getElementById(idname);
	img.setAttribute("width","10");
	img.setAttribute("height","10");
	img.setAttribute("src",Value);
}

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>= 120/80){
			if(image.width>120){ 
				ImgD.width=120;
				ImgD.height=(image.height*120)/image.width;
			}else{
				ImgD.width=image.width; 
				ImgD.height=image.height;
			}
			ImgD.alt=image.width+"×"+image.height;
		}
		else{
			if(image.height>80){ 
				ImgD.height=80;
				ImgD.width=(image.width*80)/image.height; 
			}else{
				ImgD.width=image.width; 
				ImgD.height=image.height;
			}
			ImgD.alt=image.width+"×"+image.height;
		}
	}
	/*else{
	ImgD.src="";
	ImgD.alt=""
	}*/
}

//-->
