function ValidateValue(o, blnAllowAtSign){
	
	sBlacklist = "',\",+,&,=,<,>,?,=,÷,%,|,*,#,;,--,=";
	
	s = "" + o.value;
	for (var i = 0, n = s.length; i < n; i++) {
        if (s[i].charCodeAt() > 166) {
			sBlacklist += "," + s[i];
		}
    }
	
	aBlacklist = sBlacklist.split(",");
	
	
	var x = 0;
	for(x=0;x<aBlacklist.length;x++){
		while(s.indexOf(aBlacklist[x]) != -1){
			s = s.replace(aBlacklist[x],"");
		}
	}
	
	o.value = "" + s;
	
}

function ValidateInputNumeric(e){

	var blnInvalid = true;
	var strKeyCode;
	
	if(window.event) {
		strKeyCode = window.event.keyCode;
	}
	else if(e.which) {
		strKeyCode = e.which; 
	}

	if (strKeyCode == 8  || strKeyCode == 48 || strKeyCode == 49 || strKeyCode == 50 || strKeyCode == 51 || strKeyCode == 52 || strKeyCode == 53 || strKeyCode == 54 || strKeyCode == 55 || strKeyCode == 56 || strKeyCode == 57){
		blnInvalid = false;
	}
	
	//window.top.document.title = strKeyCode;
	
	return !blnInvalid;	
}


function ValidateInput(e, blnAllowQuestion){

//KEYS PREVENTED BY I*MAGINE

//34 = "
//39 = '
//38 = &
//60 = <
//62 = >
//63 = ?
//47 = /
//43 = +
//42 = *

	var blnInvalid = false;
	var strKeyCode;
	
	if(window.event) {
		strKeyCode = window.event.keyCode;
	}
	else if(e.which) {
		strKeyCode = e.which; 
	}

	if (strKeyCode == 38 || strKeyCode == 39 || strKeyCode == 60 || strKeyCode == 62 || strKeyCode == 47 || strKeyCode == 92 || strKeyCode == 43 || strKeyCode == 42 || strKeyCode == 34 || strKeyCode > 166){
		blnInvalid = true;
	}
	
	//window.top.document.title = strKeyCode;
	
	if (blnAllowQuestion == false){
		if (strKeyCode == 63){
			blnInvalid = true;
		}
	}
	
	return !blnInvalid;	
	
}

if (window.location.href.indexOf("index.asp") != -1){
	if (typeof window.event != 'undefined') // IE
	document.onkeydown = function() // IE
		{
		var t=event.srcElement.type;
		var kc=event.keyCode;
		return ((kc != 8 && kc != 13) || ( t == 'text' &&  kc != 13 ) ||
				(t == 'textarea') || ( t == 'submit' &&  kc == 13))
		}
	else
	document.onkeypress = function(e)  // FireFox/Others 
		{
		var t=e.target.type;
		var kc=e.keyCode;
		if ((kc != 8 && kc != 13) || ( t == 'text' &&  kc != 13 ) ||
			(t == 'textarea') || ( t == 'submit' &&  kc == 13))
			return true
		else {
			//alert('Sorry Backspace/Enter is not allowed here'); 
			return false
		}
	}
}
