//------------------------------------------------------------------------------------------------
//11/3/04 following two variables are global variables that need to be set here, they are used in
//        the following two functions (LoadHomePageBanners, GoToHomePageBannerURL)
//------------------------------------------------------------------------------------------------
// delay between banners (in milliseconds)(currently set to 12 seconds)
var bannerDelay = 12000;

		
// Index of the homepage banner & current link
var curbannerindex = -1;

//10/30/04 this function is used in /common/global_header.asp to control dynamic banner rotation
function LoadHomePageBanners() {
	curbannerindex = ((curbannerindex + 1) % bannerURL.length);
	//window.alert('LoadHomePageBanners Function - curbannerindex = ' + curbannerindex);
	document.images["bannerImg"].src = bannerURL[curbannerindex];
	curTimeout = setTimeout("LoadHomePageBanners()", bannerDelay);
}

//10/30/04 this function is used in /common/global_header.asp to control dynamic banner rotation
function GoToHomePageBannerURL() {
    //window.alert('GoToHomePageBannerURL Function - curbannerindex = ' + curbannerindex);
	url = linkURL[curbannerindex];
	window.open(url, "_blank","location=yes, status=yes, toolbar=yes, menubar=yes, width=800, scrollbars=yes, resizable=yes, directories=no, top=0, left=0 ", "yes");
}

// Index of the home page block ad & current link
var curblockindex = -1;

//5/22/07 this function is used in Default.aspx to control dynamic block ad rotation
function LoadHomePageBlock() {
	curblockindex = ((curblockindex + 1) % blockURL.length);
	//window.alert('LoadHomePageBlock Function - curbannerindex = ' + curbannerindex);
	document.images["blockImg"].src = blockURL[curblockindex];
	curTimeout = setTimeout("LoadHomePageBlock()", bannerDelay);
}

//05/23/07 this function is used in /common/global_header.asp to control dynamic banner rotation
function GoToHomePageBlockURL() {
    //window.alert('GoToHomePageBannerURL Function - curbannerindex = ' + curbannerindex);
	url = blocklinkURL[curblockindex];
	window.open(url, "_blank","location=yes, status=yes, toolbar=yes, menubar=yes, width=800, scrollbars=yes, resizable=yes, directories=no, top=0, left=0 ", "yes");
}


// Index of the home page skyscraper ad & current link
var curskyscraperindex = -1;

//5/23/07 this function is used in Default.aspx to control dynamic block ad rotation
function LoadHomePageSkyscraper() {
	curskyscraperindex = ((curskyscraperindex + 1) % skyscraperURL.length);
	//window.alert('LoadHomePageBlock Function - curbannerindex = ' + curbannerindex);
	document.images["skyscraperImg"].src = skyscraperURL[curskyscraperindex];
	curTimeout = setTimeout("LoadHomePageSkyscraper()", bannerDelay);
}

//5/23/07 this function is used in /common/global_header.asp to control dynamic banner rotation
function GoToHomePageSkyscraperURL() {
    //window.alert('GoToHomePageBannerURL Function - curbannerindex = ' + curbannerindex);
	url = skyscraperlinkURL[curskyscraperindex];
	window.open(url, "_blank","location=yes, status=yes, toolbar=yes, menubar=yes, width=800, scrollbars=yes, resizable=yes, directories=no, top=0, left=0 ", "yes");
}



   