// are we dealing with IE, Netscape 6 or (else assumed) NN ~4.7?
var agt = navigator.userAgent.toLowerCase();
var is_ie = (agt.indexOf("msie") != -1);
var is_nn6 = (agt.indexOf("netscape6") != -1);
var is_nn7 = (agt.indexOf("gecko") != -1);
var is_pc = (agt.indexOf("win") != -1);
var is_mac = (agt.indexOf("mac") != -1);

// based on the browser type, we calculate the position of the service/equipment type boxes.
function browserDifferences() {
	if ((is_ie) && (is_pc)) {
		//alert("PC and ie")
		var theMapLeft = document.all.markets.offsetLeft;
		var theMapTop = document.all.markets.offsetTop;
		document.all.defWin.style.left = (theMapLeft + 195);
		document.all.defWin.style.top = (theMapTop + 770);
		document.all.defWin.style.visibility = 'visible';
		
		document.all.picMap.style.left = (theMapLeft + 450);
		document.all.picMap.style.top = (theMapTop + 540);
		document.all.picMap.style.visibility = 'visible';

	} else if ((is_nn6) && (is_pc)) {
		//alert("PC and nn6")
		var theMapLeft = document.images['markets_image'].offsetLeft;
		var theMapTop = document.images['markets_image'].offsetTop;
		document.getElementById("defWin").style.left = (theMapLeft + 5);
		document.getElementById("defWin").style.top = (theMapTop - 115);
		document.getElementById("defWin").style.visibility = 'visible';
		
		document.getElementById("picMap").style.left = (theMapLeft + 270);
		document.getElementById("picMap").style.top = (theMapTop - 330);
		document.getElementById("picMap").style.visibility = 'visible';
	} else if ((is_nn7) && (is_pc)){
		//alert("PC and nn7")
		document.getElementById("defWin").style.left = (190 + "px");
		document.getElementById("defWin").style.top = (770 + "px");
		document.getElementById("defWin").style.visibility = 'visible';
		
		document.getElementById("picMap").style.left = (460 + "px");
		document.getElementById("picMap").style.top = (550 + "px");
		document.getElementById("picMap").style.visibility = 'visible';
	
	} else if (is_pc) { // Netscape 4.7, specifically
		//alert("PC and 4.7")
		var theMapLeft = document.images['markets_image'].x;
		var theMapTop = document.images['markets_image'].y;
		document.layers.defWin.left = (theMapLeft + 5);
		document.layers.defWin.top = (theMapTop - 140);
		document.layers.defWin.visibility = 'visible';
		
		document.layers.picMap.left = (theMapLeft + 270);
		document.layers.picMap.top = (theMapTop - 360);
		document.layers.picMap.visibility = 'visible';
	} else if ((is_mac) && (is_ie)){ // Mac and IE
		//alert("Mac IE")
		document.getElementById("defWin").style.left = (185 + "px");
		document.getElementById("defWin").style.top = (643 + "px");
		document.getElementById("defWin").style.visibility = 'visible';
		
		document.getElementById("picMap").style.left = (510 + "px");
		document.getElementById("picMap").style.top = (435 + "px");
		document.getElementById("picMap").style.visibility = 'visible';
	} else { // Mac and other browser
		//alert("Mac other")
		var theMapLeft = document.images['markets_image'].offsetLeft;
		var theMapTop = document.images['markets_image'].offsetTop;
		document.getElementById("defWin").style.left = (190 + "px");
		document.getElementById("defWin").style.top = (740 + "px");
		document.getElementById("defWin").style.visibility = 'visible';
		
		document.getElementById("picMap").style.left = (530 + "px");
		document.getElementById("picMap").style.top = (530 + "px");
		document.getElementById("picMap").style.visibility = 'visible';
	}

};