function libUnixPath(strPath) { return(strPath.replace(/\\/gi, "/")) }
function xbElHide(el){
	if (document.getElementById || document.all) {
		el.style.visibility = 'hidden';
	}
	else if (document.layers)  el.visibility = 'hidden';
}
function xbElShow(el){
	if (document.getElementById || document.all) {
		el.style.visibility = 'visible';
		el.style.display = 'block';
	}
	else if (document.layers)  el.visibility = 'visible';
}
// Return the path of the background image for a passed elements window and ID
function xbGetElBGImage(el){ 
 
 	if (el == null) return (""); 	
	if (document.layers) return(el.backgroundImage)
	else return(el.style.backgroundImage);
}
// Set the path of the background image for a passed elements window and ID to the passed path
function xbSetElBGImage(el,strPath){
 	if (document.layers) el.backgroundImage = strPath;
	else el.style.backgroundImage = strPath;
}
// Returns teh current classname of a passed elements ID
function xbGetElClass(el){
 	if (el != null){
 		if (document.layers ) return(""); //unsupported in document.layers.X
		else if (document.getElementById) return(el.className);
		else if (document.all ) return(el.className); 
	}
	else return("");
}
function xbWinWidth() {
	if (document.layers) {
     w = window.innerWidth;
	}
	if (document.all) {
   	w = document.body.clientWidth;
	}
	return(w);
}
function xbWinHeight() {
	if (document.layers) {
     h  = window.innerHeight;
	}
	if (document.all) {
   	h = document.body.clientHeight;
	}
	return(h);
}
//	Returns a reference to a page element from an ID string
function xbSetElClass(el,strClass){

	if (el != null){
 		if (document.layers ) ; //unsupported in document.layers.X
		else if (document.getElementById) el.className = strClass;
		else if (document.all ) el.className = strClass;
	}
}
// Return a reference to an element from  a passed window and ID 
function xbGetElement(win,strID){
	if (document.layers) return (xbGetNS4Element(win, strID))
	if (document.getElementById) return(win.document.getElementById(strID));
	else if (document.all) return( win.document.all[strID]);
}
function xbGetInnerText(win,strID){
var el = xbGetElement( win, strID )

	if ( ! win.document.layers ){
		if (win.document.getElementById) return( el.innerText );
		else if (win.document.all)  return(el.innerHTML );
	}
}
function xbGetInnerHTML(win,strID){
var el = xbGetElement( win, strID )

	if ( ! win.document.layers ){
		if (win.document.getElementById) return( el.innerHTML );
		else if (win.document.all)  return(el.innerHTML );
	}
}
function xbSetInnerHTML(win,strID,strHTML){
var el = xbGetElement( win, strID )

	if ( ! win.document.layers ){
		if (win.document.getElementById)  el.innerHTML = strHTML;
		else if (win.document.all)  el.innerHTML  = strHTML;
	}
}  
// setStyleByClass: given an element type and a class selector,
// style property and value, apply the style.
// args:  t - type of tag to check for (e.g., SPAN)
//  c - class name p - CSS property v - value
var ie = (document.all) ? true : false;
function xbSetStyleByClass(t,c,p,v){
	var elements;
	if(t == '*') {
		// '*' not supported by IE/Win 5.5 and below
		elements = (ie) ? document.all : document.getElementsByTagName('*');
	} else {
		elements = document.getElementsByTagName(t);
	}
	for(var i = 0; i < elements.length; i++){
		var node = elements.item(i);
		for(var j = 0; j < node.attributes.length; j++) {
			if(node.attributes.item(j).nodeName == 'class') {
				if(node.attributes.item(j).nodeValue == c) {
					eval('node.style.' + p + " = '" +v + "'");
				}
			}
		}
	}
}
// Detect the browser when this file loads convert all characters to lowercase to simplify testing
var agt=navigator.userAgent.toLowerCase();
// Note: On IE5, these return 4, so use is_ie5up to detect IE5.
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var is_gecko = (agt.indexOf('gecko') != -1);
// Note: Opera and WebTV spoof Navigator.  We do strict client detection.
// If you want to allow spoofing, take out the tests for opera and webtv.
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
            && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
            && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_nav6up = (is_nav && (is_major >= 5));

var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie3    = (is_ie && (is_major < 4));
var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
var is_opera = (agt.indexOf("opera") != -1);
var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);
var is_win = (agt.indexOf("win")!=-1);
var is_mac = (agt.indexOf("mac")!=-1);