var lhs = "&#105;&#110;&#102;&#111;";
var rhs = "&#115;&#104;&#101;&#114;&#119;&#105;&#110;&#99;&#117;&#114;&#114;&#105;&#100;&#46;&#99;&#111;&#109;";

function print_mail_to_link() 
{
   document.write("<a href=\"mailto");
   document.write(":" + lhs + "@");
   document.write(rhs + "\">" + lhs + "@" + rhs + "<\/a>");
}

var lhs_martin = "&#109;&#97;&#114;&#116;&#105;&#110;&#115;&#104;&#111;&#114;&#116;&#55;&#52;";
var rhs_martin = "&#104;&#111;&#116;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;";

function print_mail_to_link_martin() 
{
   document.write("<a href=\"mailto");
   document.write(":" + lhs_martin + "@");
   document.write(rhs_martin + "\"> Martin Short<\/a>");
}


function validateTaxTipsForm(){
Msg = "";
emailStr = document.taxtipsForm.inputEmail.value;

{
if (emailStr != "" && (emailStr.indexOf("@") < 0 || emailStr.indexOf(".")<0)) Msg += "A VALID email address\r\n";
}

if (Msg == ""){
document.taxtipsForm.submit();
}
else{
alert('Please provide the following information:\r\n\r\n' + Msg);
}
}

var Formfuncs = new Object();
Formfuncs.validateNewsAddition = function()
{

var Msg = "";

var aTitle = document.getElementById("aTitle");
articleTitle = aTitle.value;
var aIntro = document.getElementById("aIntro");
articleIntro = aIntro.value;
var aBody = document.getElementById("aBody");
articleBody = aBody.value;


if (articleTitle == "" || articleTitle == null || articleTitle.charAt(0) == "")
{
	Msg +=  "The article title\r\n"
}

if (articleIntro == "" || articleIntro == null ||  articleIntro.charAt(0) == "")
{
	Msg +=  "The article intro\r\n";
}

if (articleBody == "" || articleBody == null ||  articleBody.charAt(0) == "")
{
	Msg +=  "The main article text\r\n";
}


if (Msg == ""){
var send = document.getElementById("newsAddForm");
send.submit();
}

else{
alert('Please provide the following information:\r\n\r\n' + Msg);
}

}


