var isIE = false; 
var isNS4 = false; 
var isNS6 = false; 
var isMac = false;
var isPC = false;

function browserCheck() { 
	if (document.layers) { 
		isNS4 = true;
	} 
	if (document.getElementById) { 
		if (document.all) { 
			isIE = true; 
		} 
		if (navigator.appName == "Netscape") { 
			isNS6 = true; 
		} 
	} 
	if ((navigator.appVersion.indexOf("Mac") != -1)) {
		isMac = true;
	}
	else {
		isPC = true;
	}
}

function hideLayer(id) {
	if (isIE) document.all[id].style.visibility = "hidden"
	else if (isNS6) document.getElementById(id).style.display = "none"
	else document.layers[id].visibility = "hide"
}

function popupLocal(url,id) {
	window.open(url, "", "width=795,height=490,toolbar=yes,scrollbars=yes,menubar=yes,resizable=yes,location=yes,status=yes");
	hideLayer(id)
}

function init(id) {
	browserCheck();
	positionLayer(id);
}

function positionLayer(id) {
	posLeft = (isIE)? document.body.offsetWidth-200 : window.innerWidth-196
	if (isIE) eval(id+".style.left = posLeft");
	else if (isNS6) eval("document.getElementById('"+id+"').style.left = posLeft");
	else eval("document."+id+".left = posLeft");
}
