
var browserIsIE = false;
var browserIsNN = false;
var browserIsOpera = false;

function getBrowserType() {
	if (document.all) {
		browserIsIE=true;
		if (navigator.userAgent.toLowerCase().indexOf('opera')+1) {
			browserIsIE = false;
			browserIsOpera = true;
		}
	} else if (document.getElementById) {
		browserIsNN=true;
	}
}

function displayWindow(url, name, width, height) {
        var Win = window.open(url, name,'width=' + width + ',height=' + height + ',resizable=no,scrollbars=no,menubar=no,status=no' );
        if (browserIsNN) {
        	Win.innerHeight = height;
        	Win.innerWidth = width;
        } else if (browserIsOpera) {
       		Win.resizeTo(width, height);
        	dx = width - Win.document.body.clientWidth;
    	    dy = height - Win.document.body.clientHeight;
	       	Win.resizeTo(width + dx, height + dy);
        }
        Win.focus();
}

function show() {
	o = document.getElementById('lpm');
	if (o) {
		o.style.display = 'block';
		o.style.visibility = 'visible';
	}
}

function hide() {
	mouseOverUl = false;
	o = document.getElementById('lpm');
	if (o) {
		o.style.display = 'none';
		o.style.visibility = 'hidden';
	}
}

function toggle() {
	o = document.getElementById('lpm');
	if (o) {
		if (o.style.display == 'block') {
			mouseOverUl = false;
			o.style.display = 'none';
			o.style.visibility = 'hidden';
		} else {
			o.style.display = 'block';
			o.style.visibility = 'visible';
		}
	}
}

var mouseOverDiv = false;
var mouseOverUl = false;

function divOnMouseOut() {
	// o=document.getElementById('lpm');o.style.display='none';o.style.visibility='hidden';
	mouseOverDiv = false;
	// defaultStatus = 'mouseOverUl = ' + mouseOverUl;
	if (!mouseOverUl)
		hide();
}

function ulOnMouseOut() {
	mouseOverUl = false;
	// defaultStatus = 'mouseOverUl = ' + mouseOverUl;
	// if (!mouseOverDiv)
	//	hide();
}