	function popupWindow(win,winWidth,winHeight,place,winName){
	leftPos = 0; topPos = 0; // default variables for old browsers
		if (screen){ 
		   // checks specified parameters are not outside screen area
    		if (winWidth>screen.width){
    		   winWidth = screen.width;
    		}
    		if (winHeight>screen.height){
    		   winHeight = screen.height - 55;
    		}
    		if (winWidth <= 0){
    		   winWidth = screen.width;
    		}
    		if (winHeight <= 0){
    		   winHeight = screen.height - 55;
    		}
			// positions window by checking place parameter
			if (place == 'topleft'){ // positions window in top left corner
			leftPos = 0;
			topPos = 0;
			}
			if (place == 'centre'){ // centres window
			leftPos = screen.width/2 - winWidth/2;
			topPos = screen.height/2 - winHeight/2;
			}
			if (place == 'topright'){ // positions window in top right corner
			leftPos = screen.width - winWidth;
			topPos = 0;
			}
			if (place == 'botleft'){ // positions window in bottom left corner
			leftPos = 0;
			topPos = screen.height - (winHeight + 55); // add 55 to prevent bottom of window being obscured by taskbar
			}
			if (place == 'botright'){ // positions window in bottom right corner
			leftPos = screen.width - winWidth;
			topPos = screen.height - (winHeight+55); // add 55 to prevent bottom of window being obscured by taskbar
			}
		}
		newWindow = window.open(win,winName,'toolbar=no,location=no,scrollbars=no,resizable=no,width='+winWidth+',height='+winHeight+',left='+leftPos+',top='+topPos+'');
		popupWindow.document.write('<head><title>XXXX</title></head>');
		newWindow.focus();
	}

	
function mmenu(mID) {
	var menu = document.getElementById(mID);
	var display = menu.style.display;
	menu.style.display = (display == "block") ? "none" : "block";
	menu.parentNode.style.listStyleImage = (display == "block") ? "url(../layout/cartellachiusa.gif)" : "url(../layout/cartellaaperta.gif)";
}

window.onload = function() {
	var uls = document.getElementsByTagName("ul");
	for (i=0;i<uls.length;i++) {
		if(uls[i].className=="submenu")uls[i].style.display = "none";
	}
}	
