var couponwidthdefault='358';
var couponheightdefault='500';
var couponiddefault='13';

function validateForm(theForm)
	{
		// Customize these calls for your form
		// Start ------->
		if (!validFirstName(theForm.FirstName))
			return false;
		if (!validLastName(theForm.LastName))
			return false;
		if (!validRequired(theForm.Email,"email"))
			return false;
		if (!validEmail(theForm.Email,"Email",true))
			return false;
		// <--------- End
		validateCustomForm(theForm);
		return true;
}


//original javascript

var bookmarkurl=location.href
var bookmarktitle=document.title

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function mailpage()
{
  mail_str = "mailto:?subject= You should see this page: " + document.title;
  mail_str += "&body= I thought you might like to take a look at the page titled \'" + document.title;
  mail_str += "\'. Just click this link " + location.href;
  location.href = mail_str;
}

function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}


<!--
// The Central Randomizer 1.3 (C) 1997 by Paul Houle (houle@msc.cornell.edu)
// See: http://www.msc.cornell.edu/~houle/javascript/randomizer.html
rnd.today=new Date();
rnd.seed=rnd.today.getTime();


    function rnd() {
    rnd.seed = (rnd.seed*9301+49297) % 233280;
    return rnd.seed/(233280.0);
};


    function rand(number) {
    return Math.ceil(rnd()*number);
};
// end central randomizer. -->




function OpenCouponThread()
{
	var cgi = new Object();
      cgi.http_host = location.host;
      cgi.http_user_agent = navigator.userAgent;
      cgi.http_cookie = document.cookie;
      cgi.https = (location.protocol == 'https:\/\/') ? 'on' : 'off';
      cgi.path_info = (location.pathname.indexOf('?') != -1) ?
location.pathname.substring(0, location.pathname.indexOf('?')) :
location.pathname;
      cgi.query_string = (location.search) ?
((location.search.indexOf('#') != -1) ? location.search.substring(1,
location.search.indexOf('#')) : location.search.substring(1)) : '';
      cgi.script_name = cgi.path_info;
      cgi.http_referer = document.referrer;
	var LinkLocation =
"http://www.etnasystems.com/coupon/?COUPONID=42&OriginalReferer=" +
getCookie("jsRef") + "&OriginalPage=" + cgi['script_name'] + "&OriginalSite=" + cgi['http_host'];
//alert("link=" + LinkLocation);
	openWindow(LinkLocation, 'Coupon', '358', '500');
}

