bName = navigator.appName ;
bVer = navigator.appVersion ;

msIE3 = bName.indexOf("Microsoft") != -1 && parseInt(bVer) < 4;
msIE4 = bName.indexOf("Microsoft") != -1 && parseInt(bVer) >= 4;
msIE  = bName.indexOf("Microsoft") != -1 ;
ns4 = bName.indexOf("Netscape") != -1 && parseInt(bVer) <= 4;
ns6 = bName.indexOf("Netscape") != -1 && parseInt(bVer) >= 5;

window.__jsBrowserLibrary = "2.2";

function getWindowScrollLeft() {
  return ns4 || ns6 ? window.pageXOffset : document.body.scrollLeft ; }
  
function getWindowScrollTop () {
  return ns4 || ns6 ? window.pageYOffset : document.body.scrollTop ; }

function getElementFromDocument(eID,d) {
  if (d.getElementById) {
    var r = d.getElementById(eID) ; return r ;
  } else if (d.all) {
    return d.all[eID] ;
  } else if (d.layers) {
    return d.layers[eID] ;
  }
}

function getElement(eID) {
  return getElementFromDocument(eID,document) ;
}

function getCheckElement(id,d) {
  if (!d) d = document;
  var e = getElementFromDocument(id,d) ;
  if (!e) alert("Internal error: document element "+id+" is not present in "+d.location) ;
  return e ;
}
  
function showElement(eID) {
  var se = (eID.id || eID.style) ? eID : getElement(eID) ;
  if (se && se.style) { se.style.display = ""; }
}

function hideElement(eID) {
  var se = (eID.id || eID.style) ? eID : getElement(eID) ;
  if (se && se.style) { se.style.display = "none"; }
}

function getTags(tID,d) {
  if (!d) { d = document; }
  if (d.all) {
    return d.all.tags(tID) ;
  } else if (d.getElementsByTagName) {
    return d.getElementsByTagName(tID) ;
  } else {
    return ;
  }
}

function getIframeDocument(f) {
  if (f.contentDocument) {
    return f.contentDocument ;         // For NS6
  } else if (f.contentWindow) {
    return f.contentWindow.document;   // For IE5.5 and IE6
  } else if (f.document) {
    return f.document ;                // For IE5
  }
}

function rpcDone() {
  if (! window.parent) return ;
  if (window.parent == window) return ;
  if (! window.parent.makeRPCcallback) { alert ("internal error: no RPC callback (" + window.parent + ")") ; return ; }
  setTimeout ("window.parent.makeRPCcallback()",10) ;
}

function rpcStatus(code) {
  var rpf ;
  
  if (! window.parent) return ;
  if (window.parent == window) return ;
  rpf = window.parent.statusRPCcallback ;
  if (rpf) rpf(code) ;
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function fwBodyLoaded() {
//  alert("fwBodyLoaded");
  var docBody = xGetElementById("body"); if (!docBody) return;
  var docWidth = docBody.scrollWidth;    if (!(docWidth && docBody.style)) return;

  fwBodyResized() ;  
  xAddEventListener(window,"resize",fwBodyResized);
}

function fwBodyResized() {
  var docBody = xGetElementById("body"); if (!docBody) return;
  var docWidth = docBody.scrollWidth;
  
  var winWidth = xClientWidth() ;
  if (docWidth >= winWidth - 10) {
    docBody.fwOriginalWidth = docWidth ;
    docBody.style.width = (winWidth - 15) + "px" ;
  } else if (docWidth < winWidth - 15 && docBody.style.width && winWidth > docBody.fwOriginalWidth + 15) {
    docBody.style.width = "";
    setInterval("fwBodyResized()",50);
    docBody.fwOriginalWidth = "";
  }
}

loadedBrowserCheck = 3 ;