// BROWSER SNIFFER (Sniff out the good and bad browsers)

function Is() {
    var agent = navigator.userAgent.toLowerCase();
    this.major = parseInt(navigator.appVersion);
    this.minor = parseFloat(navigator.appVersion);
    this.ns  = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
    this.ns2 = (this.ns && (this.major == 2));
    this.ns3 = (this.ns && (this.major == 3));
    this.ns4b = (this.ns && (this.minor < 4.04));
    this.ns4 = (this.ns && (this.major >= 4));
    this.ie   = (agent.indexOf("msie") != -1);
    this.ie3  = (this.ie && (this.major == 2));
    this.ie4  = (this.ie && (this.major >= 4));
    this.op3 = (agent.indexOf("opera") != -1);
    this.win   = (agent.indexOf("win")!=-1);
    this.mac   = (agent.indexOf("mac")!=-1);
    this.unix  = (agent.indexOf("x11")!=-1);
}

var is = new Is();

function onerror() {
    document.location.href = "javascript:";
}

// DOCUMENT OBJECT SWITCH (Used for building cross_browser functions)

if(is.ns4) {
    doc = "document";
    sty = "";
    htm = ".document"
} else if(is.ie4) {
    doc = "document.all";
    sty = ".style";
    htm = ""
}

// Position the layers

function positionLayers() {

    bannerObj = eval(doc + '["banner"]' + sty);
    bannerObj.left = 10;
    bannerObj.top = 10;
 
    navbarObj = eval(doc + '["navbar"]' + sty);
    navbarObj.left = 10;
    navbarObj.top = 110;

		newObj = eval(doc + '["new"]' + sty);
    newObj.left = 10;
    newObj.top = 145;

    mainObj = eval(doc + '["main"]' + sty);
    mainObj.left = 170;
    mainObj.top = 145;

    soonObj = eval(doc + '["soon"]' + sty);
    soonObj.left = 10;
    soonObj.top = 335;
 
    modernObj = eval(doc + '["modern"]' + sty);
    modernObj.left = 535;
    modernObj.top = 145;
		
    ww1Obj = eval(doc + '["ww1"]' + sty);
    ww1Obj.left = 535;
    ww1Obj.top = 390;

    searchObj = eval(doc + '["search"]' + sty);
    searchObj.left = 10;
    searchObj.top = 485;

    bannerObj.visibility = "visible";
    navbarObj.visibility = "visible";
		
    newObj.visibility = "visible";
  	mainObj.visibility = "visible";
  	modernObj.visibility = "visible";
    ww1Obj.visibility = "visible";
  	soonObj.visibility = "visible";
  	searchObj.visibility = "visible";
}

