<!--
function mailpage( HE_count )
{
  mail_str = "mailto:?subject=Interesting Article on CreditUnions.com";
  mail_str += "&body=I thought you might be interested in this credit union related article on the CreditUnions.com site: ";
  mail_str += "(If clicking on the link below doesn't work, just cut and paste the entire URL into your browser address window.)%0D%0A%0D" + location.href;
  mail_str += "%0D%0A%0D" + "Join over " + HE_count + " other credit union professionals that receive articles like the one above every week through the CreditUnions.com Industry Insights eNewsletter. Sign up now!%0D%0A%0D" + "http://www.creditunions.com/home/main/emailpopup.asp";
  location.href = mail_str;
}

function ValidateForwardDetails()
{
if(document.getElementById('Layer23').style.display!="none")
{
    function echeck(str) 
    {
		var at="@";
		var dot=".";
		str = str.replace(/^\s*|\s*$/g,"");
		var lat=str.indexOf(at);
		var lstr=str.length;
		var ldot=str.indexOf(dot);
		if (str.indexOf(at)==-1)
		{
		   alert("Invalid E-mail ID");
		   return false;
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
		{
		   alert("Invalid E-mail ID");
		   return false;
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)
		{
		    alert("Invalid E-mail ID");
		    return false;
		}

		 if (str.indexOf(at,(lat+1))!=-1)
		 {
		    alert("Invalid E-mail ID");
		    return false;
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
		 {
		    alert("Invalid E-mail ID");
		    return false;
		 }

		 if (str.indexOf(dot,(lat+2))==-1)
		 {
		    alert("Invalid E-mail ID");
		    return false;
		 }
		
		 if (str.indexOf(" ")!=-1)
		 {
		    alert("Invalid E-mail ID");
		    return false;
		 }

 		 return true;					
	}
    if(document.frmMail.sendername.value.replace(/^\s*|\s*$/g,"")=="")
    {
        alert("Please enter your name");
        document.frmMail.sendername.focus();
        return false;
    }
    
    if(document.frmMail.senderemail.value.replace(/^\s*|\s*$/g,"")=="")
    {
        alert("Please enter your email address");
        document.frmMail.senderemail.focus();
        return false;
    }
    
    if(echeck(document.frmMail.senderemail.value)==false)
    {
        document.frmMail.senderemail.focus();
        return false;
    }
    
    if(document.frmMail.recipientemail.value.replace(/^\s*|\s*$/g,"")=="")
    {
        alert("Please enter recipient's email address separated by comma");
        document.frmMail.recipientemail.focus();
        return false;
    }
    else if (document.frmMail.recipientemail.value.replace(/^\s*|\s*$/g,"").indexOf(",")==-1)
    {
        if(echeck(document.frmMail.recipientemail.value)==false)
        {
            document.frmMail.recipientemail.focus();
            return false;
        }
    }
    else
    {
        var recipientemail_array=document.frmMail.recipientemail.value.replace(/^\s*|\s*$/g,"").split(",");
     
        var part_num=0;
        
        while(part_num <recipientemail_array.length)
        {            
            if(echeck(recipientemail_array[part_num])==false)
            {
                document.frmMail.recipientemail.focus();
                return false;
            }
            part_num+=1;
        }    
    }
    return true;   
  }
  else
    return false;
}
    
//-->