function openPopUp(PageName){
	new_window = window.open(PageName,"new_window","width=400,height=400,location=0,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=0,toolbar=0,left=150,top=50,screenx=150,screeny=50"); 
	if (new_window.opener == null) { 
		new_window.opener = self; 
	} 
	new_window.focus();
}
function openSizedPopUp(PageName, Width, Height){
	new_window = window.open(PageName,"new_window","width="+Width+",height="+Height+",location=0,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=0,toolbar=0,left=150,top=50,screenx=150,screeny=50"); 
	if (new_window.opener == null) { 
		new_window.opener = self; 
	} 
	new_window.focus();
}

//T20070314.0014
function RTrim(str)
{
	for (var i=str.length-1; ((str.charAt(i)<=" ")&&(str.charAt(i)!="")); i--);
	return str.substring(0,i+1);
}

function IsValidEmail(str)
{

	var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)|(.,.)|(,.)|(.,)|(.\s.)|(\s.)/; // not valid |(^,\s)
	var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; // valid
	
	if (!reg1.test(str) && reg2.test(str) )
	 {
		 return true;
	 }
	else
	{
	 return false;
	} 
	
}

function isAlphaNumeric(strField)
{
	var   rex = new RegExp(/^[a-zA-Z0-9\d .,#@&'"/]+$/)

	if (strField.value.match(rex))
		{
			return true;
		}
		else
		{
			return false;
		} 
}






