
function chkString(val){
	if (val == ""){
		return false;
	}
	else{
		tempval = new String(val)
		for (y=0;y<tempval.length;y++){
				if (tempval.substring(y,y+1) != " "){
					tempval=tempval.slice(y,tempval.length);
					y = tempval.length;
					objName = tempval
				}
				else {
						if (y == tempval.length-1){
							val = ''
							return false;
						}	
				}
		}
	}
	
	tempval = new String(val)
	for (y=tempval.length;y>0;y--){
		if (tempval.substring(y-1,y) != " "){
			tempval = tempval.slice(0,y);
			y=0;
			val = tempval
		}
	}
	return true;
}

function validate(valu) {
var novalid = "<>\';@#&*`~"
var ok = "yes";
var temp;
for (var i=0; i<valu.length; i++) {
temp = "" + valu.substring(i, i+1);
if (novalid.indexOf(temp) != "-1") return false;
}
return true;
}



