function createMainLink (theName,theID,theWidth,theHeight,theLink) {
	if(document.layers) {
		document.write('<td valign="top" class="topNavNetscape"><ilayer id="'+theID+'ButtonParent" visibility="hide"><layer id="'+theID+'Button" width="'+theWidth+'" height="'+theHeight+'">');
		if(theLink) document.write('<a href="'+theLink+'" target="_blank">');
		document.write('<center><img src="'+theName+'.gif" border=0></center>');
		if(theLink) document.write('</a>');
		document.write('</layer></ilayer></td>');
	} else {
		document.write('<td valign="top" class="topNav" width="'+theWidth+'" height="'+theHeight+'" id="'+theID+'Button">');
		if(theLink) document.write('<a href="'+theLink+'" target="_blank">');
		document.write('<center><img src="'+theName+'.gif" border=0></center>');
		if(theLink) document.write('</a>');
		document.write('</td>');
	}
}

function createSubLink (theSubName,theSubID,theSubWidth,theSubHeight,theSubLink,theParentID) {
	var theOutput = "";
	theOutput += '<tr><td><img src="/homeimages/spacer.gif" width="1" height="'+theSubHeight+'" alt=""></td>';
	if(document.layers) {
		theOutput += '<td valign="top" class="dropdownNetscape" align="left"><ilayer id="'+theSubID+'ButtonParent"><layer id="'+theSubID+'Button" width="'+theSubWidth+'" height="'+theSubHeight+'">';
		if(theSubLink) theOutput += '&nbsp;<a href="'+theSubLink+'" onmouseover="subRollover(\''+theSubID+'Button\',\''+theParentID+'\',\'#aaaaaa\');" onmouseout="subRollover(\''+theSubID+'Button\',\''+theParentID+'\',\'#cccccc\');">';
		theOutput += theSubName;
		if(theSubLink) theOutput += '</a>';
		theOutput += '</layer></ilayer></td>';
	} else {
		theOutput += '<td valign="top" align="left" class="dropdown" width="'+theSubWidth+'" height="'+theSubHeight+'" id="'+theSubID+'Button">';
		if(theSubLink) theOutput += '&nbsp;<a href="'+theSubLink+'" onmouseover="subRollover(\''+theSubID+'Button\',\''+theParentID+'\',\'#aaaaaa\');" onmouseout="subRollover(\''+theSubID+'Button\',\''+theParentID+'\',\'#cccccc\');">';
		theOutput += theSubName;
		if(theSubLink) theOutput += '</a>';
		theOutput += '</td>';
	}
	theOutput += '</tr>';
	return theOutput;
}

function mainRollover(theRollover,theBackgroundImage) {
	if(ns4) document[theRollover + "Parent"].document[theRollover].background.src = theBackgroundImage;
	else {
		var whichBackground = getReference(theRollover);
		whichBackground.backgroundImage = "url("+theBackgroundImage+")";
	}
}

function subRollover(theRollover,theRolloverParent,theBackgroundColor) {
	if(ns4) document[theRolloverParent].document[theRollover + "Parent"].document[theRollover].bgColor = theBackgroundColor;
	else {
		var whichBackground = getReference(theRollover);
		whichBackground.backgroundColor = theBackgroundColor;
	}
}

// IE3 safe image switching code
var goodBrowser = 0;

if(document.images){
        // enable rollovers
        goodBrowser = 1;
        
        //image preloading stuff
        //put your images that will be used into a comma delimited
        //list on the next line... follow the example =)
        var preLoad = new Array('/homeimages/bIndividualOver.gif','/homeimages/bCentersOver.gif','/homeimages/bGovernmentOver.gif','/homeimages/bEducationalOver.gif','/homeimages/bCorporationsOver.gif');

        //don't touch this (it does the pre-loading for you)
        for(var i = 0; i < preLoad.length;i++){
                var k = new Image();
                k.src = preLoad[i];
        }
        
}

function flipper(){
        if(goodBrowser == 1){
                for(var i = 0; i < flipper.arguments.length; i += 2){
                document.images[flipper.arguments[i]].src = flipper.arguments[i+1];
                }
        }

}

function popWindow(theURL,theName,theOptions){
        var newWin = window.open(theURL,theName,theOptions);
        newWin.focus();
}