/* findDOM script*/

var isDHTML = 0;
var isID = 0;
var isAll = 0;
var isLayers = 0;


if (document.getElementById) {isID = 1; isDHTML = 1;}
else {
if (document.all) {isAll = 1; isDHTML = 1;}
else {
browserVersion = parseInt(navigator.appVersion);
if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {isLayers = 1; isDHTML = 1;}
}}

function findDOM(objectID,withStyle) {
	if (withStyle == 1) {
		if (isID) { return (document.getElementById(objectID).style) ; }
		else { 
			if (isAll) { return (document.all[objectID].style); }
		else {
			if (isLayers) { return (document.layers[objectID]); }
		};}
	}
	else {
		if (isID) { return (document.getElementById(objectID)) ; }
		else { 
			if (isAll) { return (document.all[objectID]); }
		else {
			if (isLayers) { return (document.layers[objectID]); }
		};}
	}
}

/* dropdown script*/

var menuTop = 45;
var menuLeft = 400;

var domSMenu = null;
var oldDomSMenu = null;
var t = 0;
var lDelay = 3;
var lCount = 0;
var pause = 100;

function popMenu(menuNum){
	if (isDHTML) {
///// Sets the previous menu's visibility to hidden
		t = 2;
		if (oldDomSMenu) {
			oldDomSMenu.visibility = 'hidden'; 
			oldDomSMenu.zIndex = '0'; 
			t = 2; 
			lCount = 0;
		}

///// Defines the DOMs	of the menu objects
		var idMenu = 'menuHead';
		var domMenu = findDOM(idMenu,0);

		var idMenuOpt = 'menuHead' + menuNum;
		var domMenuOpt = findDOM(idMenuOpt,0);		

		var idSMenu = 'menu' + menuNum;
		var domSMenu = findDOM(idSMenu,1);


///// Positions and shows the menu
		if (oldDomSMenu != domSMenu) {	
			domSMenu.visibility = 'visible';
			domSMenu.zIndex = '100';
			oldDomSMenu = domSMenu;
		}

///// Resets oldDom if it is the same as the current DOM
		else { oldDomSMenu = null; }
	}

////// Returns a 'null' value for non-DHTML Browsers 
	else { return null; }
}

function delayHide() {
///// Checks to see if there is a menu showing and whether 
///// the global variable 't' has been set to 0
    if ((oldDomSMenu) && (t == 0)) {

///// Hides the old menu, resets menu conditions, 
///// and stops the function running
        oldDomSMenu.visibility = 'hidden'; 
        oldDomSMenu.zIndex = '0';
        oldDomSMenu = null;
        lCount = 0; 
        return false;
    }

///// Interupts the function if another menu is opened
    if (t == 2) { lCount = 0; return false; }

///// Repeats the function adding 1 to lCount each time until 
///// lCount is equal to lDelay and then sets 't' to 0 so that 
///// the menu will hide when it runs again
    if (t == 1) { 
        lCount = lCount + 1;
        if (lDelay <= lCount) { t = 0; }
        if (lDelay >= lCount) { setTimeout('delayHide(' + t + ')',pause); }
    }
}

/* date script*/

function MM_openBrWindow(theURL,winName,features) { //v2.0
  		window.open(theURL,winName,features);
		}
	
	monName = new Array ("January","February","March","April","May","June","July","August","September","October","November","December")
		now = new Date
		
		
		
/* rollover script*/

var imagesLoaded;
/*
var _on = new Image();
_on.src = 'images/home/';
var _off = new Image();
_off.src = 'images/home/';
*/


//homepage arrows
var arr1_on = new Image();
arr1_on.src = 'images/arrow_bl.gif';
var arr1_off = new Image();
arr1_off.src = 'images/arrow.gif';
	
var arr2_on = new Image();
arr2_on.src = 'images/arrow_bl.gif';
var arr2_off = new Image();
arr2_off.src = 'images/arrow.gif';

var arr3_on = new Image();
arr3_on.src = 'images/arrow_bl.gif';
var arr3_off = new Image();
arr3_off.src = 'images/arrow.gif';

var arr4_on = new Image();
arr4_on.src = 'images/arrow_bl.gif';
var arr4_off = new Image();
arr4_off.src = 'images/arrow.gif';

var arr5_on = new Image();
arr5_on.src = 'images/arrow_bl.gif';
var arr5_off = new Image();
arr5_off.src = 'images/arrow.gif';

var arr6_on = new Image();
arr6_on.src = 'images/arrow_bl.gif';
var arr6_off = new Image();
arr6_off.src = 'images/arrow.gif';

var arr7_on = new Image();
arr7_on.src = 'images/arrow_bl.gif';
var arr7_off = new Image();
arr7_off.src = 'images/arrow.gif';

var arr8_on = new Image();
arr8_on.src = 'images/arrow_bl.gif';
var arr8_off = new Image();
arr8_off.src = 'images/arrow.gif';

var arr9_on = new Image();
arr9_on.src = 'images/arrow_bl.gif';
var arr9_off = new Image();
arr9_off.src = 'images/arrow.gif';

var arr10_on = new Image();
arr10_on.src = 'images/arrow_bl.gif';
var arr10_off = new Image();
arr10_off.src = 'images/arrow.gif';

var arr11_on = new Image();
arr11_on.src = 'images/arrow_bl.gif';
var arr11_off = new Image();
arr11_off.src = 'images/arrow.gif';

var arr1 = new Array('arr1');
var arr2 = new Array('arr2');
var arr3 = new Array('arr3');
var arr4 = new Array('arr4');
var arr5 = new Array('arr5');
var arr6 = new Array('arr6');
var arr7 = new Array('arr7');
var arr8 = new Array('arr8');
var arr9 = new Array('arr9');
var arr10 = new Array('arr10');
var arr11 = new Array('arr11');

var imagesLoaded = 1;

function rollOn(which) {
var privWhich = eval(which);
	if (document.images && imagesLoaded == true) {
		for (i=0; i<privWhich.length; i++) {
			document.images[privWhich[i]].src = eval(privWhich[i] + '_on.src');
		}
	} else {
		return false;	
	}
}

function rollOff(which) {
var privWhich = eval(which);
	if (document.images && imagesLoaded == true) {
		for (i=0; i<privWhich.length; i++) {
			document.images[privWhich[i]].src = eval(privWhich[i] + '_off.src');
		}
	} else {
		return false;	
	}
}



/* Level 2 navigation, visibility function for bullets*/

function setVisibility(objectID,state) {
			var dom = findDOM(objectID,1);
			dom.visibility = state;
		}	
		
	
		function toggleVisibility(objectID)	{
			var dom = findDOM(objectID,1);
			state = dom.visibility;
			if (state == 'hidden' || state == 'hide' )
				dom.visibility = 'visible';
				
			else {
				if (state == 'visible' || state == 'show' )
				dom.visibility = 'hidden';
			
			else dom.visibility = 'visible';
			}
		}