
function setCookie( theName, theValue ){
	var argv = setCookie.arguments;
	var argc = setCookie.arguments.length;
	var expires = ( argc > 2 ) ? argv[2] : null;
	if( expires != null ){
		var LargeExpDate = new Date();
		LargeExpDate.setTime( LargeExpDate.getTime() + expires * 1000 * 3600 * 24 );
	}
	document.cookie = theName + "=" + escape( theValue ) + ( ( expires == null ) ? "" : ( "; expires=" + LargeExpDate.toGMTString() ) ) + "; path=/;";
} 

function checkUnacceptChar( theFields, theMessage ){
	if( theMessage == "" || theMessage == null ){
		theMessage = "The data you have entered includes unacceptable digits, please enter again!";
	}
	var re = /[^\w@ ~,&#+'!\-\(\)\.\*]/;
	for( var Key in theFields ){
		if( re.test( document.getElementById(theFields[Key]).value ) ){
			document.getElementById(theFields[Key]).focus();
			document.getElementById(theFields[Key]).select();
			alert( theMessage );
			return false;
		}
	}
	return true;
}

