function checkEmail(email) 
{
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email))
		return true;		
	else
		return false;
}


function isNumber(num)
{
	if (/(^-*\d+$)|(^-*\d+\.\d+$)/.test(num))
		return true;
	else
		return false;
}


function IsZip(num)
{
	ValidChars = "0123456789";
	zipF="";

	for (i=0; i<num.length; i++)
	{
		Char = num.charAt(i);
		if (ValidChars.indexOf(Char) != -1) 
			zipF+=Char;
	}
	
	
	if (zipF.length!=5)
		return false;
		
	return zipF;
}


function IsPhone(num)
{
	ValidChars = "0123456789";
	phoneF="";
	
	for (i=0; i<num.length; i++)
	{
		Char = num.charAt(i);
		if (ValidChars.indexOf(Char) != -1) 
			phoneF+=Char;
	}
	
	
	
	if (phoneF.length!=10)
		return false;
		
	return phoneF;
}


function ShowPopup(hoveritem)
{
	hp = document.getElementById("hoverpopup");

	// Set position of hover-over popup
	hp.style.top = hoveritem.offsetTop + 180;
	hp.style.left = hoveritem.offsetLeft + 585;

	// Set popup to visible
	hp.style.visibility = "Visible";
}


function HidePopup()
{
	hp = document.getElementById("hoverpopup");
	hp.style.visibility = "Hidden";
}

function showObject(e,name)
{
	if (!e){
		var e=window.event;
	}
	obj = document.getElementById(name);
	if (e.pageX || e.pageY){
		obj.style.left = e.pageX+"px";
		obj.style.top = e.pageY+"px";
	}
	else if (e.clientX || e.clientY){
		obj.style.left = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
		obj.style.top = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
	}
	
	obj.style.visibility = "Visible";
}

function hideObject(name)
{
	obj = document.getElementById(name);
	obj.style.visibility = "Hidden";
}

function goLite(FRM,BTN)
{
   window.document.forms[FRM].elements[BTN].style.color = "#663300";
}

function goDim(FRM,BTN)
{
   window.document.forms[FRM].elements[BTN].style.color = "#330000";
}

    function abc(id)
    {

      document.getElementById(id).value="";
        document.getElementById(id).value.length=0;
          document.getElementById(id).focus();

    }
