// funzione pel avvertire sul valore del ct
function CtAlert(form)
{
message=("ATTENZIONE\n\n\nCome da Specifiche Tecniche TIM i pali vanno dimensionati con ct=1.15.\n\nQualora accada che in un determinato sito il palo non sia idoneo con\nct=1.15,si può ricorrere a ct=1, a condizione che esso corrisponda\nalla realtà della geografia locale.");
    alert(message);
}


//funzione richiamata nelle prestazioni

function surfto(form,a,b,c,d,e,f,width,height,left,top) {        
	var myindex=form.dest.selectedIndex;
	window.open(form.dest.options[myindex].value, "", 'toolbar='+a+', scrollbars='+b+', location='+c+', status='+d+', menubar='+e+', resizable='+f+', width=' + width + ', height=' + height +', left = '+left+',top = '+top+'');
}

//funzione check all

var checkflag = "false";

function check(field) {
	if (checkflag == "false") {
		for (i = 0; i < field.length; i++) {
		field[i].checked = true;}
		checkflag = "true";
		return "Uncheck All"; }
	else {for (i = 0; i < field.length; i++) {
		field[i].checked = false; }
		checkflag = "false";
		return "Check All"; }
}

// cambia l'immagine e apre la calcolatrice della normativa

function displayNewImage(id,form,a,b,c,d,e,f,width,height,left,top) {
var List1=new Array();
image=form.dest.options[form.dest.selectedIndex].value;
List1=image.split("/");
document.images[id].src="../../image/Normative/" + List1[1];
window.open(List1[0], "", 'toolbar='+a+', scrollbars='+b+', location='+c+', status='+d+', menubar='+e+', resizable='+f+', width=' + width + ', height=' + height +', left = '+left+',top = '+top+'');
}

// cambia l'immagine 

function ChangeImage(id,form) {
var List1=new Array();
image=form.ral.options[form.ral.selectedIndex].value;
List1=image.split("/");
document.images[id].src="../../image/" + List1[1];
}

// cambia l'immagine 

function PpImage(id,form) {
var List1=new Array();

image=form.pippo.checked;
List1=image.split("/");
document.images[id].src="../../image/" + List1[1];
}


//funzione di reset

function show(file)
	{for (var f=0; f< parent.frames.length; f++)
	if (parent.frames[f].name == "PRO_WEB_PANEL")
        parent.frames[f].document.PPA.loadGeomTarget(file);
	}

function popUp(URL,a,b,c,d,e,f,width,height,left,top) 
{day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar='+a+', scrollbars='+b+', location='+c+', status='+d+', menubar='+e+', resizable='+f+', width=' + width + ', height=' + height +', left = '+left+',top = '+top+'');");
}


function popPage(URL,name,width,height,left,top) 
{
settings="scrollbar=yes,resizable=yes,width=" + width + ",height=" + height + ",left=" +left+ ",top=" + top;
MyNewWindow=window.open("/INTRALINK_html/text/tecnico/"+URL,name,settings);
}

function displayImage(path,id) { 
document.images[id].src=path;
}

//funzioni richiamate in sinistra.html e destra.html

var nom = 1; // Number of menus

var tits = new Array(); // An array for the title objects
var subs = new Array(); // An array for the submenu objects

if (document.layers) { // Setting the visibility for NN and IE
	visible = 'show';
	hidden = 'hide';
	}
else if (document.all) {
	visible = 'visible';
	hidden = 'hidden';
	}

for (var i = 0; i < nom; i++) {
	tits[i] = ('title' + i);
	subs[i] = ('submenu' +i);
	}

// n = the number of the submenu to show/hide
// move = the number of pixels for moving the objects below

function toggle(n,move) {
	menu = ('submenu' + n);
	if (document.layers) {
		submenu = document.layers[menu];
		}
	else if (document.all) {
		submenu = document.all(menu).style;
		}
	if (submenu.visibility == visible) {
		submenu.visibility = hidden;
		for (var i = (n+1); i < nom; i++) {
		if (document.layers) {
			document.layers[tits[i]].top -= move;
			document.layers[subs[i]].top -= move;
			}
		else if (document.all) {
			document.all(tits[i]).style.pixelTop -= move;
			document.all(subs[i]).style.pixelTop -= move;
			}
		}
	}
	else {submenu.visibility = visible;
		for (var i = (n+1); i < nom; i++) {
		if (document.layers) {
			document.layers[tits[i]].top += move;
			document.layers[subs[i]].top += move;
			}
		if (document.all) {
			document.all(tits[i]).style.pixelTop += move;
			document.all(subs[i]).style.pixelTop += move;
			}
		}
	}
	lastmenu = submenu;
}

