//*-- Browser Detection --*/
function browserDetect()  {
	ns4 = (document.layers)&&(navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)==4) ? 'ns4' : false;
	ie4 = (document.all)&&(navigator.appName.indexOf("Microsoft") > -1)&&(parseInt(navigator.appVersion)==4)&&(navigator.appVersion.indexOf('MSIE 6') <0) ? 'ie4' : false;
	ie5 = (document.getElementById)&&(navigator.appName.indexOf("Microsoft") > -1)&&(navigator.appVersion.indexOf('MSIE 6') <0) ? 'ie5' : false;
	ie6 = (document.getElementById)&&(navigator.appName.indexOf("Microsoft") > -1)&&(navigator.appVersion.indexOf('MSIE 6') >=0) ? 'ie6' : false;
	ns6 = (document.getElementById)&&(navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)>4) ? 'ns6' : false;
	return (ns4 || ie5 || ie4 || ns6 || ie6);
}
var browser = browserDetect();

if (browser == "ns4") {
	onresize = redo;
}

function redo() {
                    location.reload();
}


/*-- [End] Browser Detection --*/


/*-- Cross-Browser Object Access Function --*/
function myDOM(id)	{
	//alert(id)
	if (browser == 'ns4')  {return ns4ElementById(id);}
	if (browser == 'ns6')  {return document.getElementById(id);}
	if (browser == 'ie4')  {return eval('document.all.'+ id);}
	if (browser == 'ie5')  {return document.getElementById(id);}
	if (browser == 'ie6')  {return document.getElementById(id);}
	return false;
}

/*-- Search Layers Array by ID [Netscape 4 Work-Around] --*/
function ns4ElementById(layerId,me)	{
	var foundIt = false;
	var whereAmI = (me) ? me : document.layers;
	if (whereAmI[layerId])  {
		return whereAmI[layerId];
	}
	for (var i=0; i<whereAmI.length; i++)  {
	  if (whereAmI[i].document.layers){
	  		foundIt = ns4ElementById(layerId,whereAmI[i].document.layers);
	  }
	  if (foundIt)  {
	  return foundIt;
	  }
	}
	return null;
}

/*-- [End] Cross-Browser Object Access Function --*/

//***************************//

//       functions           //

//***************************//


function imgRoll(img, state) {
	if (document.images[img].src.indexOf('_on.gif') == -1) {
		(state) ? document.images[img].src = eval(img + '_over.src') : document.images[img].src = eval(img + '_off.src');
	}
}

function hilite(img, state) {
	document.images[img].src = eval(img + '_on.src');
}

function popWin(theURL,winName,features) {

  var mywin = window.open(theURL,winName,features);
  mywin.focus();
}
