﻿// JScript File

	function OpenEmailFriend(intID)
	{
		var strWinOptions = "width=400,height=500,left=10,top=10,resizable=no,scrollbars=no,menubar=no,toolbar=no,location=no,directories=no";
		var URL = "EmailFriend.aspx?ID=" + intID;
		var objWindow = window.open(URL,"EmailFriend",strWinOptions);
	}
	
	function OpenPrintFriendly(intID)
	{
		var strWinOptions = "width=600,height=500,left=10,top=10,resizable=yes,scrollbars=yes,menubar=yes,toolbar=no,location=no,directories=no";
		var URL = "PrinterFriendly.aspx?ID=" + intID;
		var objWindow = window.open(URL,"PrintFriendly",strWinOptions);			
	}	
	
	function addToBookmarks(title, url)
	{
        if (document.all)
        {
            window.external.AddFavorite(url, title);
        }
        else
        {
            if (window.sidebar)
            {
                window.sidebar.addPanel(title, url, "");
            }
        }
    }
    
    function SendEmail()
	{
		if (document.frmSwords.txtFrom.value==0)
		{
			alert("Please enter an Email Address.");
			document.frmSwords.txtFrom.focus();
		}
		else
		if ((document.frmSwords.txtFrom.value.indexOf("@")==-1) || (document.frmSwords.txtFrom.value.indexOf(".")==-1))
		{
			alert("Please enter a valid Email Address.");
			document.frmSwords.txtFrom.focus();
		}	
		else
		if (document.frmSwords.txtBody.value==0)
		{
			alert("Please enter a Message.");
			document.frmSwords.txtBody.focus();
		}		
		else
		{
			document.frmSwords.submit();		
		}
	}
