//start of javascript for preloading images, image rollovers and drop down menus

// sniff for browser type

var browser=navigator.appName;
var browserNum=parseInt(navigator.appVersion);

//declaration of variable for screen width

var w_width;

// browsr specific code

if ((browser=="Netscape")&&(browserNum>=5) || (browser=="Opera")) {
	//Netscape 6 and Opera
	layerRef="document.getElementById('";
	styleRef=".style";
	endLayerRef="')";
}
else {
	//Internet Explorer
	layerRef="document.all['";
	endLayerRef="']";
	styleRef=".style";
}

// clear the drop down menu layers

function hideLayers() {
	//eval(layerRef+"layerSolutions"+endLayerRef+styleRef+".visibility='hidden'");
	//eval(layerRef+"layerLOB"+endLayerRef+styleRef+".visibility='hidden'");
	//eval(layerRef+"layerProducts"+endLayerRef+styleRef+".visibility='hidden'");
	//eval(layerRef+"layerCompany"+endLayerRef+styleRef+".visibility='hidden'");
	//eval(layerRef+"layerPress"+endLayerRef+styleRef+".visibility='hidden'");
}

// a tweaked version of the MM Studio rollover code

function changeImages() {
	if (document.images) {
		for (var i=0; i<changeImages.arguments.length;i+=2)	{
		  if (document[changeImages.arguments[i]]) {
			  document[changeImages.arguments[i]].src=changeImages.arguments[i+1];
			}
		}
	}
}

var zoot_timer;

function countdown() {
	zoot_timer=setTimeout("hideLayers()",750);
}

function stopCountdown() {
	for(var tc=0; tc<5; tc+=1) {
		clearTimeout(zoot_timer);
	}
}

// getting the window width here. a browser issue dictates that this be coded within the body tag
function updateWidth() {
	if ((browser=="Netscape")&&(browserNum>=5) || (browser=="Opera")) {
		w_width = window.innerWidth;
	}
	else {
		w_width = document.body.offsetWidth;
	}
}

window.onresize=updateWidth;

// this makes the nav dropdown layers visible.
function setLayer(layername, expander) {
	var str = layerRef+layername+endLayerRef+styleRef;
	eval(str+".visibility='visible'");
	eval(str+".top=24");
	eval(str+".left=expander");
}


// misc functions: preload rollover images, assign event handlers to menu items

function zootPreloadImages() {
// (new Image(145, 24)).src = '../zoot_img/lending_solutions_o.gif';
// (new Image(131, 24)).src = '../zoot_img/line_of_business_o.gif';
// (new Image(89, 24)).src  = '../zoot_img/products_o.gif';
// (new Image(125, 24)).src = '../zoot_img/press_and_events_o.gif';
// (new Image(103, 24)).src = '../zoot_img/company_o.gif';
//
// (new Image(162, 23)).src = '../zoot_img/lending_solutions1_o.gif';
// (new Image(162, 22)).src = '../zoot_img/lending_solutions2_o.gif';
// (new Image(162, 21)).src = '../zoot_img/lending_solutions3_o.gif';
// (new Image(162, 21)).src = '../zoot_img/lending_solutions4_o.gif';
// (new Image(162, 21)).src = '../zoot_img/lending_solutions5_o.gif';
// (new Image(162, 22)).src = '../zoot_img/lending_solutions6_o.gif';
// (new Image(162, 22)).src = '../zoot_img/lending_solutions7_o.gif';
// (new Image(162, 30)).src = '../zoot_img/lending_solutions8_o.gif';
//
// (new Image(159, 23)).src = '../zoot_img/LOB1_o.gif';
// (new Image(159, 22)).src = '../zoot_img/LOB2_o.gif';
// (new Image(159, 21)).src = '../zoot_img/LOB3_o.gif';
// (new Image(159, 21)).src = '../zoot_img/LOB4_o.gif';
// (new Image(159, 21)).src = '../zoot_img/LOB5_o.gif';
// (new Image(159, 22)).src = '../zoot_img/LOB6_o.gif';
// (new Image(159, 21)).src = '../zoot_img/LOB7_o.gif';
// (new Image(159, 22)).src = '../zoot_img/LOB8_o.gif';
// (new Image(159, 30)).src = '../zoot_img/LOB9_o.gif';
//
// (new Image(159, 23)).src = '../zoot_img/product1_o.gif';
// (new Image(159, 22)).src = '../zoot_img/product2_o.gif';
// (new Image(159, 21)).src = '../zoot_img/product3_o.gif';
// (new Image(159, 21)).src = '../zoot_img/product4_o.gif';
// (new Image(159, 21)).src = '../zoot_img/product5_o.gif';
// (new Image(159, 31)).src = '../zoot_img/product6_o.gif';
//
// (new Image(159, 26)).src = '../zoot_img/press_events1_o.gif';
// (new Image(159, 21)).src = '../zoot_img/press_events2_o.gif';
// (new Image(159, 21)).src = '../zoot_img/press_events3_o.gif';
// (new Image(159, 21)).src = '../zoot_img/press_events4_o.gif';
// (new Image(159, 29)).src = '../zoot_img/press_events5_o.gif';
//
// (new Image(159, 23)).src = '../zoot_img/comp1_o.gif';
// (new Image(159, 22)).src = '../zoot_img/comp2_o.gif';
// (new Image(159, 21)).src = '../zoot_img/comp3_o.gif';
// (new Image(159, 29)).src = '../zoot_img/comp4_o.gif';
// (new Image(159, 21)).src = '../zoot_img/comp6_o.gif';
// (new Image(159, 31)).src = '../zoot_img/comp7_o.gif';
}

function fixSolutionsNavImage() {
    // data for a local script to control images in the sub nav tabs
    var solutions_over_imgs, solutions_exceptons;
    solutions_over_imgs = {
        'decisioning_tab':'zoot_img/Solutions_sub_nav_blue/decisioning_over.gif',
        'origination_tab':'zoot_img/Solutions_sub_nav_blue/origination_over.gif',
        'acquisition_tab':'zoot_img/Solutions_sub_nav_blue/customer_acq_over.gif',
        'risk_tab':'zoot_img/Solutions_sub_nav_blue/risk_comp_over.gif',
        'aggregation_tab':'zoot_img/Solutions_sub_nav_blue/data_agg_over.gif',
        'LOB_tab':'zoot_img/Solutions_sub_nav_blue/LOB_over.gif',
        'tools_tab':'zoot_img/Solutions_sub_nav_blue/tools_services_over.gif'
    };
    solutions_exceptons = {
        // format: 'filename':'desired home tab'
        // "home tab" candidates: decisioning_tab, origination_tab, acquisition_tab, risk_tab, aggregation_tab, LOB_tab, tools_tab
        // order of list below doesn't matter
        'business-rules-tool.html':'tools_tab',
        'business-process-tool.html':'tools_tab',
        'decision_engine.html':'tools_tab',
        'instant-rules-tool.html':'tools_tab',
        'tools.html':'tools_tab',
        'workflow_engine.html':'tools_tab',
        'vendor-management-tool.html':'tools_tab',
        'vendor_network.html':'tools_tab',
        'application-design-tool.html':'tools_tab',
        'application-design-environment.html':'tools_tab',
        'test-file-modification-tool.html':'tools_tab' // NOTE! no comma on the last one in the list
    };
    fixNavImage(solutions_over_imgs, solutions_exceptons);
}

function fixInsightsNavImage() {
    // data for a local script to control images in the sub nav tabs
    var industry_insights_over_imgs, industry_insights_exceptons;
    industry_insights_over_imgs = {
        'news_room_tab':'zoot_img/Industry_Insights_sub_green/news_room_over.gif',
        'events_tab':'zoot_img/Industry_Insights_sub_green/events_over.gif',
        'content_lib_tab':'zoot_img/Industry_Insights_sub_green/content_lib_over.gif',
        'thought_leaders_tab':'zoot_img/Industry_Insights_sub_green/thought_leaders_over.gif'
    };
    industry_insights_exceptons = {
    };
    fixNavImage(industry_insights_over_imgs, industry_insights_exceptons);
}

function fixAboutNavImage() {
    // data for a local script to control images in the sub nav tabs
    var about_zoot_over_imgs, about_zoot_exceptons;
    about_zoot_over_imgs = {
        'who_tab':'zoot_img/About_Zoot_sub_yellow/who_over.gif',
        'where_tab':'zoot_img/About_Zoot_sub_yellow/where_over.gif',
        'community_tab':'zoot_img/About_Zoot_sub_yellow/community_over.gif',
        'join_our_team_tab':'zoot_img/About_Zoot_sub_yellow/join_team_over.gif'
    };
    about_zoot_exceptons = {
    };
    fixNavImage(about_zoot_over_imgs, about_zoot_exceptons);
}

function fixNavImage(over_imgs, excepts) {
    // this runs onload to set the highlight on the tab that the page is under.
    // also run after a mouseover/out on a tab to reset to highlight if needed.
    // some pages are on multiple tabs, so these are hard-coded to an image n the
    // excepts argument.
    var url, fname, fnames, sub_nav, li, len, len2, i, j, img, divid, div, links, tmp, hst;
    var breakCheck1 = false;
    url = document.URL;
    fname = url.substring(url.lastIndexOf("\/")+1,url.length);
    hst = url.substring(0, url.indexOf(fname));
    sub_nav = document.getElementById('sub_nav');
    li = sub_nav.getElementsByTagName('li');
    if (fname in excepts) {
        divid = excepts[fname];
        var exc_li = document.getElementById(divid).parentNode;
        img = exc_li.getElementsByTagName('img')[0];
        //alert(fname);
        //alert(img.src);
        //alert(over_imgs[excepts[fname]]);
        img.src = hst + over_imgs[excepts[fname]];
        return;
    }
    len = li.length;
    for (i = 0; i < len; i++) {
        if (li[i].className.search('mega') || li[i].className.search('megaNot')) {
            img = li[i].getElementsByTagName('img')[0];
            div = li[i].getElementsByTagName('div')[0];
            if (div && div.id) {
                divid = div.id;
            }
            links = li[i].getElementsByTagName('a');
            len2 = links.length;
            for (j = 0; j < len2; j++) {
                tmp = links[j].href.substring(links[j].href.lastIndexOf("\/")+1,url.length);
                if (tmp == fname) {
                    img.src = hst + over_imgs[divid];
                    breakCheck1 = true;
                    break;
                }
            }
        }
        if (breakCheck1) {break;}
    }
}


// assign all the event handlers
function addEventHandlers() {

	var tmp;

	// EVENT HANDLER FOR SPACER DIV
	tmp = document.getElementById('spacer');
	if(tmp) {
		tmp.onmouseover = function() {
			hideLayers();
		};
	}


	// EVENT HANDLERS FOR NAV *TABS*
	// also see "TEMPLATE-SPECIFIC EVENT HANDLERS FOR NAV *TABS*" way below

	// Lending Solutions tab
	//tmp = document.getElementById('solutions');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('solutions','../zoot_img/lending_solutions_o.gif');
	//		hideLayers();
	//		setLayer('layerSolutions', 0);
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('solutions','../zoot_img/lending_solutions.gif');
	//		countdown();
	//	};
	//}

	// Line of Business tab
	//tmp = document.getElementById('LOB');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('LOB','../zoot_img/line_of_business_o.gif');
	//		hideLayers();
	//		setLayer('layerLOB', 144);
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('LOB','../zoot_img/line_of_business.gif');
	//		countdown();
	//	};
	//}

	// Products tab
	//tmp = document.getElementById('products');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('products','../zoot_img/products_o.gif');
	//		hideLayers();
	//		setLayer('layerProducts', 276);
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('products','../zoot_img/products.gif');
	//		countdown();
	//	};
	//}

	// Press & Events tab
	//tmp = document.getElementById('press');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('press','../zoot_img/press_and_events_o.gif');
	//		hideLayers();
	//		setLayer('layerPress', 365);
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('press','../zoot_img/press_and_events.gif');
	//		countdown();
	//	};
	//}

	// Company tab
	//tmp = document.getElementById('companytab');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('company','../zoot_img/company_o.gif');
	//		hideLayers();
	//		setLayer('layerCompany', 489);
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('company','../zoot_img/company.gif');
	//		countdown();
	//	};
	//}


	// EVENT HANDLERS FOR *<UL>s* CONTAINING NAV MENU ITEMS

	// Lending Solutions tab
	//tmp = document.getElementById('layerSolutions');
	//if(tmp) {
	//	tmp.onmouseover = function() { stopCountdown(); };
	//	tmp.onmouseout	= function() { countdown(); };
	//}
  //
	//// Line of Business tab
	//tmp = document.getElementById('layerLOB');
	//if(tmp) {
	//	tmp.onmouseover = function() { stopCountdown(); };
	//	tmp.onmouseout  = function() { countdown(); };
	//}
  //
	//// Products tab
	//tmp = document.getElementById('layerProducts');
	//if(tmp) {
	//	tmp.onmouseover = function() { stopCountdown(); };
	//	tmp.onmouseout  = function() { countdown(); };
	//}
  //
	//// Press & Events tab
	//tmp = document.getElementById('layerPress');
	//if(tmp) {
	//	tmp.onmouseover = function() { stopCountdown(); };
	//	tmp.onmouseout  = function() { countdown(); };
	//}
  //
	//// Company tab
	//tmp = document.getElementById('layerCompany');
	//if(tmp) {
	//	tmp.onmouseover = function() { stopCountdown(); };
	//	tmp.onmouseout  = function() { countdown(); };
	//}


	// EVENT HANDLERS FOR NAV *MENU ITEMS*

	// Lending Solutions tab
	//tmp = document.getElementById('lending_solutions1');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('lending_solutions1','../zoot_img/lending_solutions1_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('lending_solutions1','../zoot_img/lending_solutions1.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('lending_solutions2');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('lending_solutions2','../zoot_img/lending_solutions2_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('lending_solutions2','../zoot_img/lending_solutions2.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('lending_solutions3');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('lending_solutions3','../zoot_img/lending_solutions3_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('lending_solutions3','../zoot_img/lending_solutions3.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('lending_solutions4');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('lending_solutions4','../zoot_img/lending_solutions4_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('lending_solutions4','../zoot_img/lending_solutions4.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('lending_solutions5');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('lending_solutions5','../zoot_img/lending_solutions5_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('lending_solutions5','../zoot_img/lending_solutions5.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('lending_solutions6');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('lending_solutions6','../zoot_img/lending_solutions6_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('lending_solutions6','../zoot_img/lending_solutions6.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('lending_solutions7');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('lending_solutions7','../zoot_img/lending_solutions7_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('lending_solutions7','../zoot_img/lending_solutions7.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('lending_solutions8');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('lending_solutions8','../zoot_img/lending_solutions8_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('lending_solutions8','../zoot_img/lending_solutions8.gif');
	//	};
	//}
  //
  //
	//// Line of Business tab
	//tmp = document.getElementById('LOB1');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('LOB1','../zoot_img/LOB1_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('LOB1','../zoot_img/LOB1.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('LOB2');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('LOB2','../zoot_img/LOB2_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('LOB2','../zoot_img/LOB2.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('LOB3');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('LOB3','../zoot_img/LOB3_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('LOB3','../zoot_img/LOB3.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('LOB4');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('LOB4','../zoot_img/LOB4_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('LOB4','../zoot_img/LOB4.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('LOB5');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('LOB5','../zoot_img/LOB5_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('LOB5','../zoot_img/LOB5.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('LOB6');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('LOB6','../zoot_img/LOB6_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('LOB6','../zoot_img/LOB6.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('LOB7');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('LOB7','../zoot_img/LOB7_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('LOB7','../zoot_img/LOB7.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('LOB8');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('LOB8','../zoot_img/LOB8_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('LOB8','../zoot_img/LOB8.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('LOB9');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('LOB9','../zoot_img/LOB9_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('LOB9','../zoot_img/LOB9.gif');
	//	};
	//}
  //
  //
	//// Products tab
	//tmp = document.getElementById('product1');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('product1','../zoot_img/product1_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('product1','../zoot_img/product1.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('product2');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('product2','../zoot_img/product2_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('product2','../zoot_img/product2.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('product3');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('product3','../zoot_img/product3_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('product3','../zoot_img/product3.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('product4');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('product4','../zoot_img/product4_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('product4','../zoot_img/product4.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('product5');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('product5','../zoot_img/product5_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('product5','../zoot_img/product5.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('product6');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('product6','../zoot_img/product6_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('product6','../zoot_img/product6.gif');
	//	};
	//}
  //
  //
	//// Press & Events tab
	//tmp = document.getElementById('press_events1');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('press_events1','../zoot_img/press_events1_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('press_events1','../zoot_img/press_events1.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('press_events2');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('press_events2','../zoot_img/press_events2_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('press_events2','../zoot_img/press_events2.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('press_events3');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('press_events3','../zoot_img/press_events3_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('press_events3','../zoot_img/press_events3.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('press_events4');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('press_events4','../zoot_img/press_events4_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('press_events4','../zoot_img/press_events4.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('press_events5');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('press_events5','../zoot_img/press_events5_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('press_events5','../zoot_img/press_events5.gif');
	//	};
	//}
  //
  //
	//// Company tab
	//tmp = document.getElementById('comp1');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('comp1','../zoot_img/comp1_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('comp1','../zoot_img/comp1.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('comp2');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('comp2','../zoot_img/comp2_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('comp2','../zoot_img/comp2.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('comp3');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('comp3','../zoot_img/comp3_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('comp3','../zoot_img/comp3.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('comp4');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('comp4','../zoot_img/comp4_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('comp4','../zoot_img/comp4.gif');
	//	};
	//}
  //
	//// skip number 5 :)
  //
	//tmp = document.getElementById('comp6');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('comp6','../zoot_img/comp6_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('comp6','../zoot_img/comp6.gif');
	//	};
	//}
  //
	//tmp = document.getElementById('comp7');
	//if(tmp) {
	//	tmp.onmouseover = function() {
	//		stopCountdown();
	//		changeImages('comp7','../zoot_img/comp7_o.gif');
	//	};
	//	tmp.onmouseout = function() {
	//		changeImages('comp7','../zoot_img/comp7.gif');
	//	};
	//}

}


// TEMPLATE-SPECIFIC EVENT HANDLERS FOR NAV *TABS*
// addRedHandlers() only gets called on the red template pages, etc.
// there is one function for each of the 5 main templates corresponding
// to the five tabs, since that tab behaves differently than the other 4 tabs.
// these overwrite the default handlers defined up above.

// Products tab
function addGreenHandlers() {
	var tmp;
	tmp = document.getElementById('products');
	if(tmp) {
		tmp.onmouseover = function() {
			stopCountdown();
			hideLayers();
			setLayer('layerProducts', 276);
		};
		tmp.onmouseout = function() {
			countdown();
		};
	}
}


// add another onload event handler
//function addLoadEvent(func) {
//	var oldonload = window.onload;
//	if (typeof window.onload != 'function') {
//		window.onload = func;
//		//alert(' in addLoadEvent: ' + typeof window.onload);
//		//alert('addLoadEvent:' + window.onload);
//	}
//	else {
//		window.onload = function() {
//			oldonload();
//			func();
//		};
//		//alert('addLoadEvent: else block');
//	}
//	//alert('addLoadEvent:' + window.onload);
//}


// load 'em all up!
//addLoadEvent(addEventHandlers);
//addLoadEvent(firstFieldFocus);
//addLoadEvent(zootPreloadImages);
//alert('past addLoadEvent:' + window.onload);
