// share this page

function chk_name()
{
	if(document.share_frm.uemail.value == '')
	{
		document.share_frm.uemail.value='Your Email Please';		
	}
}

function emp_name()
{
	if(document.share_frm.uemail.value == 'Your Email Please')
	{
		document.share_frm.uemail.value='';		
	}
}

function chk_email()
{
	if(document.share_frm.shareemail.value == '')
	{
		document.share_frm.shareemail.value='Your Friend Email Please';		
	}
}

function emp_email()
{
	if(document.share_frm.shareemail.value == 'Your Friend Email Please')
	{
		document.share_frm.shareemail.value='';		
	}
}
	function chk_frm1()
	{
		if(document.share_frm.uemail.value != '')
	    {
				if(validate_email(document.share_frm.uemail.value))
				{
					if(validate_email(document.share_frm.shareemail.value))
					{
						patharr=window.location.pathname.split('/');
   					    i=patharr.length;
   					    page=patharr[i-1];
						path=window.location.href;
						document.share_frm.action='http://www.cafecrazee.com/share.asp?page='+path;
    				 	document.share_frm.submit();
                    }
					else{alert("Incorrect Friend Email id");}
				}
				else{alert("Please Enter correct Email id");}
	    }
	
	}

function validate_email(str)
{
			s1=str;
	
			var emailexp=/^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-Z0-9]{2,4}$/;
			if (s1.match(emailexp))
			{	
			return true;  }
			else
			{
				return false;
			}
	}

/// right panel
document.write('<div id="SendtoFriend" onClick="toggleDisplay(\'myToggledDiv1\')"><img src="../images/share-this-page.gif" /></div>');
document.write('<div class="SendtoFriend1" id="myToggledDiv1" style="display:none; position:absolute; z-index:10; margin-left:-59px;">');
document.write('<form name="share_frm" id="share_frm" method="post"><table width="120" border="0" cellspacing="4" cellpadding="0" bgcolor="#99CC00">');
document.write('<tr>');
document.write('<td align="center"><input type="text" name="uemail" id="uemail" value="Your Email ID" onblur="javascript: chk_name();" class="text" size="15" onclick="javascript: emp_name();"/></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td align="center"><input type="text" name="shareemail" id="shareemail" value="Your Friend&#8217;s Email ID" onblur="javascript: chk_email();" class="text" size="15" onclick="javascript: emp_email();"/></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td colspan="2">');
document.write('<table width="112" border="0" cellspacing="4" cellpadding="0" bgcolor="#99CC00"><tr>');
document.write('<td align="center" valign="middle"><a  href="javascript:chk_frm1();" class="text">submit</a></td>');
document.write('<td align="center" valign="middle"><a onClick="toggleDisplay(\'myToggledDiv1\')" style="cursor:pointer" class="text">close</a></td>');
document.write('</tr></table>');
document.write('</td>');
document.write('</tr>');
document.write('</table></form></div>');
//document.write('<img src="../images/clear.gif" width="1" height="5" /><BR><a href="/shows/index_survivor.asp"><img src="../images/survivor120x600.jpg" /></a>');
