function ConfirmChoice(sMessage)
{
	answer = confirm(sMessage);					
	if (answer ==true)
	{
		return true;
	}
	else
	{
		return false;
	}
}
function trim(s) {
		while (s.substring(0,1) == ' ') {
			s = s.substring(1,s.length);
		}
		while (s.substring(s.length-1,s.length) == ' ') {
			s = s.substring(0,s.length-1);
		}
		return s;
}
function dispMsg(msg) {
   
	dispMsg1 (msg, "ERR");
   
   }
	function dispMsg1(msg, type) {
	//alert for non ie browsersd
    if(type=="ERR") {
		//if (window.showModalDialog)
		//{
		//window.showModalDialog('javascript:document.writeln('+msg+'), null,"dialogHeight:50px;dialogWidth:50px;help:yes;scroll:yes;resizable:yes"');

//		window.showModalDialog('javascript:document.writeln("test")');

		//}
		//else
		//
alert(msg)
	}
		else if (type=="INF")
	{
		alert(msg+"INF")
	}

	else if (type=="SUC")
	{
 		alert(msg+"SUC")


	}
	//modal dialog for ie

	}

	function validateEmail(email) {
	    // This function is used to validate a given e-mail 
	    // address for the proper syntax		
	    if (email == "") {
	        return false;
	    }
	    posOfAtSign = email.indexOf("@", 1)
	    if (posOfAtSign == -1) {
	        return false;
	    }
	    if (email.indexOf("@", posOfAtSign + 1) != -1) {
	        return false;
	    }
	    posOfPeriod = email.indexOf(".", posOfAtSign)
	    if (posOfPeriod == -1) {
	        return false;
	    }
	    if (posOfPeriod + 2 > email.length) {
	        return false;
	    }
	    return true
	}
	