/* Nothing */

function calculateCorrect (mcWidth, mcHeight) {
	if (self.screen) {     
   	    width = screen.width
	} else if (self.java) {
		var javakit = java.awt.Toolkit.getDefaultToolkit();
	    var scrsize = javakit.getScreenSize();       
	    width = scrsize.width; 
	} else {
		width = height = '?' 
	}
	
	misureWidth = mcWidth;
	misureHeight = mcHeight;
	
	
		y = (screen.height - misureHeight -68)/2;
		x = (screen.width - misureWidth -10)/2; 
		
   } 
   
function openWindow (mWidth, mHeight, page) {
  calculateCorrect(mWidth, mHeight);
	popup = window.open(page,'newWin','scrollbars=yes, width='+misureWidth+',height='+misureHeight+',top='+y+',left='+x); 
}
	
function openWindowElem (mWidth, mHeight, page, elem) {
  calculateCorrect(mWidth, mHeight);
	popup = window.open(page,'newWin','' + elem + 'scrollbars=yes, width='+misureWidth+',height='+misureHeight+',top='+y+',left='+x); 
}

function reservedShow (qualeDiv, totDiv) {
	for (i=1; i<=totDiv; i++) {
		if (i==qualeDiv) {
			document.getElementById(i).style.display = 'block';
			document.getElementById("link"+i).className = 'rese_link_menu_active';
		} else {
			document.getElementById(i).style.display = 'none';
			document.getElementById("link"+i).className = 'rese_link_menu';
		}
	}

}

function subMenu (id,action) { // Trasforma in subMenuVP per avere il ritardo
	document.getElementById(id).style.display=action;
	
	if (action == 'block') {
		preClass = document.getElementById("link_" + id).className;
		document.getElementById("link_" + id).className='menu_link_active';
	} else {
		document.getElementById("link_" + id).className=preClass;
	}
}

/*
function subMenu (id,action) {
	setTimeout(function () {
	  subMenuVP(id,action);
	}, 250);
}
*/
