function openWindow(win, width, height) 
{
	window.open(win, "", "width=" + width + ",height=" + height + ",menubar=1,toolbar=1,scrollbars=1,directories=1,location=1,resizable=1");
}

function validateEmailAddress(frmEmail){
	var Email_filter=/^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w+\.[a-zA-Z]{2,6}$/;	
	
	if (Email_filter.test(frmEmail.value) && frmEmail.value != ""){ 
		return true;
 	}
	
	return false;
}

function bookmarkpage()
{
	var str = navigator.appVersion;
	var pos = str.indexOf("MSIE");
						
	//check the version of IE is 4.0 or above
	if (pos >= 0 && str.substr(pos + 5,1) >= 4)
	{
		//users browser is IE 4.0 or above so pop up add favorite window
		window.external.AddFavorite(location.href,document.title);
	}
	else
	{
		//users browser is not IE 4.0 or above so tell them how to bookmark this page
		alert("If you are using Netscape, press Ctrl + D to bookmark this page.  For other browsers view your browsers help to learn how to bookmark this page.");
	}
}

function StrTrim(StrVar)
{
	for (I = 0 ; I < StrVar.length ; I++)
	{
		if ((StrVar.substring(0,1)) == " ")
		{
			StrVar = StrVar.substring(1,StrVar.length);
			I = I - 1;
		}
	}

	for (I = 0 ; I < StrVar.length ; I++)
	{
		if ((StrVar.substring(StrVar.length - 1,StrVar.length - 0)) == " ")
		{
			StrVar = StrVar.substring(0,StrVar.length - 1);
			I = I - 1;
		}
	}
	return StrVar;
}
