function InvalidEmail(elm)
{
	if (elm.value.indexOf("@") <= 0 || elm.value.indexOf(".") <= 0 || elm.value.indexOf("@.") > 0 || elm.value.indexOf(".@") > 0)
		return true;
	else
		return false;
}
function InvalidPassword(elm)
{
	if (elm.value.length < 6)
		return true;
	else
		return false;
}
function openPopUp_485x390(href, target)
{
	newWindow = window.open(href, target, 'width=485, height=390, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=0');
	if (window.focus) {newWindow.focus()}
		return false;
}
function openPopUp_600x450(href, target)
{
	newWindow = window.open(href, target, 'width=600, height=450, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=1');
	if (window.focus) {newWindow.focus()}
		return false;
}
function openPopUp_600x600(href, target)
{
	newWindow = window.open(href, target, 'width=600, height=600, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=1');
	if (window.focus) {newWindow.focus()}
		return false;
}
function openPopUp_800x600(href, target)
{
	newWindow = window.open(href, target, 'width=800, height=600, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=1');
	if (window.focus) {newWindow.focus()}
		return false;
}
function handleEnter (field, event)
{
	var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	alert(keyCode);
	if (keyCode == 13) 
		return false;
	else
		return true;
}
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 onlyNumber()
{
	if (event.keyCode < 45 || event.keyCode> 57) 
		event.returnValue = false;
}
