function Init() {
	google_ad_client = "pub-1292379941817148";
	google_ad_channel ="";
	google_ad_type ="text";
	google_color_border = "336699";
	google_color_bg = "FFFFFF";
	google_color_link = "0000CC";
	google_color_url = "0000CC";
	google_color_text = "000000";
}

function GL120x90 (numCRs, isCentered) {
	Init();
	google_ad_width = 120;
	google_ad_height = 90;
	google_ad_format = "120x90_0ads_al_s";

	LoadAd(numCRs, isCentered);
}

function GL160x90 (numCRs, isCentered) {
	Init();
	google_ad_width = 160;
	google_ad_height = 90;
	google_ad_format = "160x90_0ads_al_s";

	LoadAd(numCRs, isCentered);
}

function GA120x600 (numCRs, isCentered) {
	Init();
	google_ad_width = 120;
	google_ad_height = 600;
	google_ad_format = "120x600_as";

	LoadAd(numCRs, isCentered);
}

function GA120x240 (numCRs, isCentered) {
	Init();
	google_ad_width = 120;
	google_ad_height = 240;
	google_ad_format = "120x240_as";

	LoadAd(numCRs, isCentered);
}

function GA125x125 (numCRs, isCentered) {
	Init();
	google_ad_width = 125;
	google_ad_height = 125;
	google_ad_format = "125x125_as";

	LoadAd(numCRs, isCentered);
}

function GA468x60 (numCRs, isCentered) {
	Init();
	google_ad_width = 468;
	google_ad_height = 60;
	google_ad_format = "468x60_as";

	LoadAd(numCRs, isCentered);
}

function LoadAd(numCRs, isCentered) {
	i = 0
	while (i < numCRs) {
		document.write('<BR>');
		i++
	}

	//for some reason centering does not work if google code is called.  For now centering must be done with
	//tags outside of calling js block.
	if (isCentered == 1) {
		document.write('<script type="text/javascript" <!--document.write(""<DIV STYLE="text-align: center;">"")--></script>');
	}

	document.write('<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>');

	if (isCentered == 1) {
		document.write('</DIV>');
	}
}

function findCartLink() {
	var areas = document.getElementsByTagName("area");
	for (var i=0; i < areas.length; i++) {
		if (areas[i].href.indexOf("norder.html")  >= 0) {
			areas[i].onclick = function(){ "pageTracker._link('http://order.store.yahoo.net/cgi-bin/wg-order?calculatorsource',true);";};
 			 break;
		 }
	}
}
