﻿function addFavorite(){
    var url=location.href;
    var description=document.title;
    try{//IE
        window.external.addFavorite(url,description);
    }catch(e){//FF
        window.sidebar.addPanel(description,url,"");
    }
}

function SubmitEmail() 
{
    if (document.getElementById("ctl00_InputBox").value == "" )
    {
		alert ("The Email Address field is blank. \n\nPlease enter your Email Address.")
	    document.getElementById("ctl00_InputBox").focus();
        return false;
    }
    
	if (CheckEmail() == false)
    {
		return false;
	}	
	
	return true;
}
function CheckEmail() 
{
	if (document.getElementById("ctl00_InputBox").value != ""  && /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.getElementById("ctl00_InputBox").value))
	{
		return true;
	}
	
	alert ("The Email Address is invalid. \n\nPlease enter a valid Email Address!")
	document.getElementById("ctl00_InputBox").focus();
	return false;
}
