var couponwidthdefault='400';
var couponheightdefault='500';
var couponiddefault='611';

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;
}


var title= document.getElementsByTagName('title')[0].innerHTML;

function bookmarksite(url){
	
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
else
	alert('Hit cmd-D to bookmark this page!');
}

function tryWindow() {
	var couponwidth='400';
	var couponheight='500';
	var couponid='611';
	
    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=" + couponid + "&OriginalReferer=" +
getCookie("JSREF") + "&OriginalPage=" + cgi['script_name'] + "&OriginalSite=" + cgi['http_host'];


	var popupWin;
	// if a window already exists, destroy it.
	if (popupWin && !popupWin.closed) {
               popupWin.close();
	}
	var attr = 'scrollbars=yes,status=yes,width=' + couponwidth + ',height= ' + couponheight  +',left=1,top=1,resizable=1';
   	popupWin = window.open(LinkLocation, 'Coupon', attr);

	
	if(!popupWin) {
		return LinkLocation;
		return "false";
	} else {
		popupWin.focus();
		
		return "true";
	}
}

function axisWindow() {
	var couponwidth='800';
	var couponheight='560';
	
	var LinkLocation = "/breast-imaging.cfm";

	var popupWin;
	// if a window already exists, destroy it.
	if (popupWin && !popupWin.closed) {
               popupWin.close();
	}
	var attr = 'scrollbars=yes,status=yes,width=' + couponwidth + ',height= ' + couponheight  +',left=1,top=1,resizable=1';
   	popupWin = window.open(LinkLocation, 'Coupon', attr);

	
	if(!popupWin) {
		return LinkLocation;
		return "false";
	} else {
		popupWin.focus();
		
		return "true";
	}
}