var splashWin = null;

function NewWindow(theURL, W, H) {
	wname = "splashWin"
	
	//var windowW = Math.ceil( W );
	//var windowH = H;
	
	//windowW = windowW+20;
	//windowH = windowH+20;
	
	W = (W/2)*2+46;
	H = (H/2)*2+46;
	
	size = ",width="+W+",height="+H;
	
	//alert("Width: "+W+"\n Height: "+H);
	
	splashWin = window.open(theURL, wname, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1"+size, true);
		// focus sulla finestra
	splashWin.focus();
}




function popImage(theURL, W, H) {
	wname = "popImage"
	
	//var windowW = Math.ceil( W );
	//var windowH = H;
	
	//windowW = windowW+20;
	//windowH = windowH+20;
	
	
	W = W+40;
	H = H+40;
	
	size = ",width="+W+",height="+H;
	
	//alert("Width: "+W+"\n Height: "+H);
	
	popImage = window.open(theURL, wname, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1"+size, true);
		// focus sulla finestra
	popImage.focus();
}








//lastsub = 30;

function show(area, id) {
	//alert ("pippo " + id);
	if (area == "learning") area = "a";
	if (area == "pages") area = "p";
	if (area == "cards") area = "c";
	if (area == "adora") area = "d";
	
	for (i=1; i<70; i++) {
		mod_id = "sub-"+area+i;
		//alert (mod_id);
		if (i == id) {
			set_visibility = "visible";
			set_display= "block";
			//alert (mod_id);
		} else {
			set_visibility= "hidden";
			set_display= "none";
		}
		if (document.getElementById(mod_id)!=null) {
			//alert (mod_id);
			document.getElementById(mod_id).style.visibility= set_visibility;
			document.getElementById(mod_id).style.display= set_display;
		}
	} //end loop
	//return false;
}


//document.onload=show(0);





