function getThisYear()
{
	var d = new Date(); 
	document.write(d.getFullYear());
}

// Called from <body onLoad>
function init()
{
	if(window.locate)
	{
		locate();
	}
}


function print_page() {
    var url = document.location.href + "?print-page=yes";
    if (document.location.href.indexOf('?') > 0)
	    url = document.location.href + "&print-page=yes";
	else if (document.location.href.indexOf('#') > 0)
	    url = document.location.href.substring(0,document.location.href.indexOf('#')) + "?print-page=yes";
	window.open(url,"PrintPage", "scrollbars=yes,width=800,height=600");

}

//
// Sends a user to the email a friend feature, with the proper referer
//
function sendLink(title,referer,event)
{
	title = (title ? title : "ASISOnline");
	referer = (referer ? "http://www.asisonline.org" + referer : window.location);	
	event = (event ? event : "");

	url = "/forms/email-a-friend.php";
	url += "?title=" + title;
	url += "&referer=" + referer;
	url += "&event=" + event;

	window.open(url, 'EmailFriend', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,height=420,width=475');
}


//********************************************************************************
// THIS IS FOR THE ADVERTISING CONTROLLER
//********************************************************************************

function showAdBanner(zone) {

   var m3_u = (location.protocol=='https:'?'https://ads.asisonline.org/openads/www/delivery/ajs.php':'http://ads.asisonline.org/openads/www/delivery/ajs.php');
//   var m3_u = '/openads/www/delivery/ajs.php';
   var m3_r = Math.floor(Math.random()*99999999999);
   if (!document.MAX_used) document.MAX_used = ',';
   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
   document.write ("?zoneid="+zone+"&amp;source=asisonline&amp;target=_blank");
   document.write ('&amp;cb=' + m3_r);
   if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
   document.write ("&amp;loc=" + escape(window.location));
   if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
   if (document.context) document.write ("&context=" + escape(document.context));
   if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
   document.write ("'><\/scr"+"ipt>");
}
