/****************************************************************************/
var NS  = (document.layers) ? true : false;
var IE  = (document.all) ? true : false;
var IE6 = (IE) && (navigator.appVersion.indexOf['MSIE 6'] != -1) ? true : false;
var DOM = (document.getElementById) ? true : false;
var Mac = (navigator.appVersion.indexOf('Mac') != -1) ? true : false;
var Win = ((navigator.userAgent.indexOf('Windows') != -1) && 
     (navigator.userAgent.indexOf('Windows 3') == -1)) ? true : false;
/****************************************************************************/
if (!NS && !IE && !DOM) {location.href = 'browser.html';}
//if (top.frames.length != 0) top.location.href = 'index.html';
/****************************************************************************/
var intWidth  = window.innerWidth;
var intHeight = window.innerHeight;
/****************************************************************************/
var newWindow;
/****************************************************************************/
window.onresize = function ()
{
 if ((!NS) && (window.innerWidth == intWidth) && (window.innerHeight == intHeight)) return;
 window.history.go(0);
}
/****************************************************************************/
function openStyle()
{
 var txtHTML = '<link rel=stylesheet href="/styles/style';
 if (NS && !Mac) {txtHTML += '_ns.css" type="text/css">';}
 else {txtHTML += '.css" type="text/css">';}
 document.write(txtHTML);
}
/****************************************************************************/
function openWindow(txtHTTP, txtNewWin, intX, intY) 
{
  var directive;
  directive = 'scrollbars=no,resizable=no,status=no,width=' + intX + ',height=' + intY;
  newWindow = window.open(txtHTTP, txtNewWin, directive);
 setTimeout('newWindow.focus();', 200);
}
/****************************************************************************/
function openDynWindow(txtHTTP, txtNewWin, intX, intY) 
{
  var directive;
  directive = 'scrollbars=yes,resizable=yes,status=yes,width=' + intX + ',height=' + intY;
  newWindow = window.open(txtHTTP, txtNewWin, directive);
 setTimeout('newWindow.focus();', 200);
}
/****************************************************************************/
var cur_lyr;
function swapLayers(id) 
{
	if (cur_lyr) hideLayer(cur_lyr);
	showLayer(id);
 	cur_lyr = id;
}
function showLayer(id) 
{
 	var lyr = getElemRefs(id);
 	if (lyr && lyr.css) lyr.css.visibility = "visible";
}
function hideLayer(id) 
{
	var lyr = getElemRefs(id);
 	if (lyr && lyr.css) lyr.css.visibility = "hidden";
}
function getElemRefs(id) 
{
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}