function checkNumSpace(x,L,U){
	if(isNaN(x)){
		return false;
	}
	if(x>L&&x<U){
		return true;
	}
	else{
		return false;
	}
}

function isInt(x){
	if(x==Math.round(x))
		return true;
	else
		return false;	
}

function checkUID(s,min,max,extraChar){
	s=s.trim().toLowerCase();
	var iL=s.length;
	var ss="01234567890abcdefghijklmnopqrstuvwxyz"+extraChar;
	if(iL<min||iL>max)
		return(false);
	
	for(var i=0;i<iL;i++)
		if(ss.indexOf(s.substr(i,1))==-1){
			return(false);
		}
		
	return(true);		
}

function checkEmail(s){
	s=s.trim();
	if(s.length>50)
		return(false);
	var regS=/^\S+@\S+\.\S+\S+$/;
	return(regS.test(s));
}

function checkURL(s){
	var bRe=true;
	s=s.trim();
	var regS=/^\S+\.\S+$/;
	bRe=regS.test(s);
	if(!bRe)
		return(bRe);
	
	if(s.length>500){
		bRe=false;
		return(bRe);}
	
	if(s.indexOf("http://")==0||s.indexOf("https://")==0)
		return(false);
		
	return(true);	
}


