// JavaScript Document to send page location
function email() 
{
   var add = document.sendpage.To.value;
   var msg = document.sendpage.Message.value;
   var from = document.sendpage.Name.value;
   var page = document.location;
   document.sendpage.action="mailto:"+add+"?subject=DataCards may be what you're looking for!"+"&body="+msg+page+" <br /><br />- "+from;
}

function isEMailAddr(elem) {
	var str = elem.value;
    var re = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
    if (!str.match(re)) {
        alert("Verify the e-mail address format.");
        setTimeout("focusElement('" + elem.form.name + "', '" + elem.name + "')", 0);
        return false;
    } else {
        return true;
    }
}

function sendpage()
{
document.write('<p align="center" style="font-size:10pt; margin-top:0;">');
document.write('<p>E-mail this webpage to a friend.</p>');
document.write('<form method="post" name="sendpage" action="sendpage.php"');
document.write('E-mail this page to a friend or associate: <br />');
document.write('<input name="To" type="text" class="p" onfocus="select();" value="Their e-mail address" size="30">&nbsp;');
document.write('<input type="text" name="Name" size="15" style="font-size:10pt;" value="Your name" onfocus="select();">&nbsp;');
document.write('<input type="hidden" name="Message" value="DataCards may have the ideal promotional idea for you -- take a look at ' +  document.location + '">');
//document.write('<input type="hidden" name="ReferPage" value="' + document.location + '">');
document.write('<INPUT TYPE="submit" VALUE="Send" onclick="if (isEMailAddr(sendpage.To)) { return true } else {alert(\'Please enter a correct e-mail address\'); return false;}">');
document.write('</form></center></p>');
}