var preload_images = new Array("http://lovecards.com/images/cards/funny_signs/free/funny_signs_060_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_059_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_058_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_057_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_056_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_055_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_054_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_053_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_052_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_051_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_050_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_049_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_048_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_047_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_046_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_045_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_044_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_043_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_042_th.jpg","http://lovecards.com/images/cards/funny_signs/free/funny_signs_041_th.jpg");

	chk_msg = " before sending your card. This information is kept strictly confidential."
	card_num = 0;
	max_cards = 20;
	var card_images = new Array();
	for (cxx=0; cxx<max_cards; cxx++) {
		card_images[cxx] = new Image();
		card_images[cxx].src = preload_images[cxx];
	}

	function checkform() {
		email = document.cardform.email.value;
		toemail = document.cardform.toemail.value;
		if ((toemail == "") | (toemail.indexOf("@") == -1) | (toemail.indexOf(".") == -1) | (toemail.length < 6)) {
			alert("Please enter the recipient's valid email address" + chk_msg);
		} else if ((toemail.substring(0, 1) == "@") | (toemail.substring(0, 1) == ".")) {
			alert("The recipient's email address must not have a '" + toemail.substring(0, 1) + "' character at the beginning.");
		} else if ((email == "") | (email.indexOf("@") == -1) | (email.indexOf(".") == -1) | (email.length < 6)) {
			alert("Please enter your valid email address" + chk_msg);
		} else if ((email.substring(0, 1) == "@") | (email.substring(0, 1) == ".")) {
			alert("Your email address must not have a '" + email.substring(0, 1) + "' character at the beginning.");
		} else {
			document.cardform.fromname.value = email;
			document.cardform.toname.value = toemail;
			document.cardform.submit();
			return true;
		}
		return false;
	}
	function card_swap(increment) {
		card_num+=increment;
		if (card_num < 0) {
			card_num = 0;
		} else if (card_num == 0) {
			img_arr = document.getElementById("next");
			img_arr.style.visibility="hidden";
		} else if (card_num == max_cards) {
			img_arr = document.getElementById("prev");
			img_arr.style.visibility="hidden";
		} else if (card_num > max_cards) {
			card_num = max_cards - 1;
			img_arr = document.getElementById("prev");
			img_arr.style.visibility="hidden";
		} else {
			img_arr = document.getElementById("prev");
			img_arr.style.visibility="visible";
			img_arr = document.getElementById("next");
			img_arr.style.visibility="visible";
		}
		document['lovecard'].src = card_images[card_num].src;
		return;
	}


document.writeln ('<center><table cellpadding="3" cellspacing="0" border="0"><tr>');
document.writeln ('<td valign="center"><a href="Javascript:card_swap(1);"><img id="prev" hspace="10" width="16" height="16" border="0" src="http://lovecards.com/images/nav/prev.gif"></a></td>');
document.writeln ('<td valign="center"><table cellpadding="1" cellspacing="0" border="0" bgcolor="#a9a9a9"><tr><td>');
document.write   ('<a href="http://lovecards.com/cgi-bin/dailycard.cgi?goto_url=1" target="_blank">');
document.write   ('<div style="background-color: #fff; padding: 10px; border: 1px solid #a9a9a9;">');
document.writeln ('<img name="lovecard" border="0" alt="Click here to send this FREE card to someone you love." src="http://lovecards.com/images/cards//free/logo_sm.png" title="Click here to send this FREE card to someone you love."></div></a></td></tr></table></td>');
document.writeln ('<td valign="center"><a href="Javascript:card_swap(-1);"><img id="next" hspace="10" width="16" height="16" border="0" src="http://lovecards.com/images/nav/next.gif"></a></td>');
document.writeln ('</tr></table></center>');
document.writeln ('<form name="cardform" action="http://www.LoveCards.com/cgi-bin/index.cgi" method="post" target=_new>');
document.writeln ('<input type="hidden" name="fromname" value="">');
document.writeln ('<input type="hidden" name="toname" value="">');
document.writeln ('<input type="hidden" name="receipt" value="true">');
document.writeln ('<input type="hidden" name="section" value="">');
document.writeln ('<input type="hidden" name="sendcard" value="">');
document.writeln ('<input type="hidden" name="step" value="send">');
document.writeln ('<center><table cellpadding=1 border=0 style="font-family:Arial, Helvetica, sans-serif; font-size:1.1em;">');
document.writeln ('<tr><td align="right"><b>Recipient&#39;s Email:</b></td><td><input name="toemail" size=20></td>');
document.writeln ('<tr><td align="right"><b>Your Email:</b></td><td><input name="email" size=20></td>');
document.writeln ('<tr><td colspan=2 align=center><b>Message:</b></td>');
document.writeln ('<tr><td colspan=2 align=center><textarea name="message" cols=25 rows=2 nowrap></textarea></td>');
document.writeln ('<tr><td colspan=2 align=center><font size="-2"><input type="button" value="Send my LoveCard!" onClick="checkform();"></font></td>');
document.writeln ('</table></center></form>');
document.writeln ('<script type="text/javascript"><!--')
document.writeln ('google_ad_client = "pub-8705866154714612";')
document.writeln ('google_ad_width = 234;')
document.writeln ('google_ad_height = 60;')
document.writeln ('google_ad_format = "234x60_as";')
document.writeln ('google_ad_type = "text";')
document.writeln ('//2007-07-31: Card of the Day')
document.writeln ('google_ad_channel = "2069260852";')
document.writeln ('//-->')
document.writeln ('</script>')
document.writeln ('<script type="text/javascript"')
document.writeln ('  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">')
document.writeln ('</script>')
document.writeln ('<script type="text/javascript">img_arr = document.getElementById("next");img_arr.style.visibility="hidden";</script>')
