
function checkLength(ID,len){
	var str=document.getElementById(ID);
	var val=str.value;
	if (val.length>len){
    str.focus();
        return false;
	}else{
		return true;
	}
	
}
 function checkValue(va){
	var str=document.getElementById(va);
	var val=str.value;
	var n=0;
	var m=0;
	if(val.length!=0){
	while(n<=val.length-1){
	if(val.charAt(n)=='\ '){
		n++;
	}else {
		return true;
	}
}	
	}else{	
	if (val==''){
       str.focus();
        return false;
	}
	}
}

 function checkDeno(id){
	var bu=0;
	var n=0;
	var str=document.getElementById(id);
	var val=str.value;
	while(n<=val.length&&bu==0){
		 	if(val.charAt(n)=='\''||val.charAt(n)=='\"'){	
		 	bu=1;
	       }
		 	else
		{n++;}
 }
		 if(bu==0){
			 return true;
		}
		 else
        return false;
}
 
 
 function checkKey(I,D){
		var str=document.getElementById(I);
		var val=str.value;
		var st=document.getElementById(D);
		var va=st.value;
		var m=0;
		var n=0;
		var p=val.length;
		var g=0;
		while(m<=p-1&&g==0){
			if(val.charAt(m)==va.charAt(n)){
				m++;
				n++;
			}else{
				g=1;
			}
		}
		if(g==1){
		return false;
		}else{
			return true;
		}
		
	}
 
 
 function getselect(id){
	 
	 var str=document.getElementById(id);
		var val=str.value;
		return val;
 }

