

// added by Priya 29-Aug-2007
// to resolve issue of special characters coming into Space via EPICKUP.
// accept ascii code 32-126
function checkSpecChar(sCtrl) 
{
  var asciiCode;
  var chkChar;
  var sCommand;
  
  var alertMsg;
  
  
  sCommand = "sContent=document.all." + sCtrl + ".value";
  eval(sCommand);
  
	for (var i = 0; i < sContent.length; i++) // loop through each character in the entry
	{
		
		chkChar = sContent.substring(i,i+1);
		
		asciiCode = chkChar.charCodeAt(0);
	
		
		if ((asciiCode < 32) || (asciiCode > 126)) //check if within acceptable range, if not replace with "^"
		{			
			if ((asciiCode != 13) && (asciiCode !=10)) //allow carriage return (13) & line feed (10)
			{
				
				alertMsg = "We are unable to recognise this character ' " + chkChar + " '. Please retype."
				alert(alertMsg);
				sCommand = "document.getElementById('" + sCtrl + "').focus();";			
				eval(sCommand);
				
			}
		}
	}
  return true;
}
//end of code by priya
