function browserCheck() {
    this.ns4 = (document.layers)? true:false;
    this.ie = (document.all&&(!window.opera))? true:false;
    this.dom = (document.getElementById)? true:false;
    this.ns6 = (window.sidebar)? true:false;
    this.moz = (window.sidebar||navigator.userAgent.indexOf('Gecko')!=-1)? true:false;
    this.opera = (navigator.userAgent.indexOf('Opera')!=-1)? true:false;
    this.o7 = (navigator.userAgent.indexOf('Opera 7')!=-1)? true:false;
    this.mac = (navigator.userAgent.indexOf('Mac')!=-1)? true:false;
}
is = new browserCheck();

var Obj;

function getObjectName(nameOfObject){

    Obj = null;
    
    if (is.ie) Obj = document.all[nameOfObject]
    else if (is.dom||is.opera) Obj = findDOMObject(nameOfObject)
    else if (is.ns4) findLayer(window,nameOfObject);

    if (!Obj || ( is.ns4 && Obj == window ) ) Obj = "Object not found"
   
    if (!Obj || is.ie ) {
       if (nameOfObject=="submit") {
          Obj = window.document.forms[0].elements["submit"];
       }  
    }    
     
    return Obj;
}

function findDOMObject(nameOfObject) {
    for (var i = 0; i < document.images.length; i++) {
        if (document.images[i].name==nameOfObject) return document.images[i]
    }
    return document.getElementById(nameOfObject)
}

function findLayer(node,nameOfObject) {

    if ( node.name == nameOfObject ) Obj = node;
        
    for ( var counter = 0; counter < node.document.images.length; counter++ ) {
        if (node.document.images[counter].name==nameOfObject) {
            Obj = node.document.images[counter];
            return;
        }
    }
    for ( var counter = 0; counter < node.document.forms[0].elements.length; counter++ ) {
        if (node.document.forms[0].elements[counter].name==nameOfObject) {
           Obj = node.document.forms[0].elements[counter]
           return
        }
    }
    
    if (node.document.forms[0].elements["submit"].name==nameOfObject) {
       Obj = node.document.forms[0].elements["submit"]
       return
    }
    
    for ( var i = 0; i < node.document.layers.length; i++ ) {
        findLayer(node.document.layers[i],nameOfObject);
    }
}
function dsp(loc){
	var foc=getObjectName(loc);
	foc=loc.firstChild.innerHTML?
	  loc.firstChild:
	  loc.firstChild.nextSibling;
	foc.innerHTML=foc.innerHTML=='+'?'-':'+';
	foc=loc.parentNode.nextSibling.style?
	  loc.parentNode.nextSibling:
	  loc.parentNode.nextSibling.nextSibling;
	foc.style.display=foc.style.display=='block'?'none':'block';
}
function ResultsWindow(sValue) {
	var isNav;
	if (parseInt(navigator.appVersion.charAt(0))>= 4) {
		isNav = (navigator.appName == "Netscape") ? 1 : 0;
	}
	if (isNav) { 
        openWin = window.open(sValue,'xml3','top=10,left=10,buttons=no,scrollbars=yes,location=no, menubar=no,resizable=no,status=yes,directories=no,toolbar=no');
    } else {
        openWin = window.open(sValue,'xml3','top=10,left=10,buttons=no,scrollbars=yes,location=no, menubar=no,resizable=no,status=yes,directories=no,toolbar=no');
    }
    openWin.focus(); 
}
