﻿/****************************************************************
*   Funzioni utente modificabili                                *
****************************************************************/
//
function popUpFull(id,imgUrl,altText){
	var obj = document.getElementById(id);
	var text = obj.childNodes[0].text;
	var js = document.createElement('a');
	var img =document.createElement('img');
	js.setAttribute('href','javascript:openFullWindow();');
	img.setAttribute('src',imgUrl);
	img.setAttribute('alt',altText);
	js.appendChild(img);
	obj.parentNode.insertBefore(js,obj);
	obj.style.display = "none";
}
//
function linkActive(id,imagePath){
    var tag = document.getElementById(id);
    var altText = tag.getAttribute('alt');
    var newTag = document.createElement('img');
    newTag.setAttribute('src',imagePath);
    newTag.setAttribute('alt',altText);
    tag.parentNode.parentNode.insertBefore(newTag,tag.parentNode);
    tag.parentNode.style.display = "none";
}
//
// funzioni per l'apertura di popUp
function popUp(){
	w = 580;
	h = screen.height;
	LeftPosition = 0;//(screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = 0;//(screen.height) ? (screen.height-h)/2 : 0;
	settings = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+w+',height='+h+',left='+LeftPosition+', top='+TopPosition+',screenX='+LeftPosition+',screenY='+TopPosition+'';
	win = window.open('normativa.html','normativa',settings)
}
//
//apertura PopUp a tutto schermo
function openFullWindow(lang) {
	var w = screen.width;
	var h = screen.height;

	LeftPosition = 0;
	TopPosition = 0;
    
    var windowprops = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+w+',height='+h+',left='+LeftPosition+', top='+TopPosition+',screenX='+LeftPosition+',screenY='+TopPosition+'';
	
	var wallsandtechnologycom = window.open('default.aspx','wallsandtechnologycom',windowprops);
	wallsandtechnologycom.moveTo(LeftPosition,TopPosition)
	wallsandtechnologycom.resizeTo(w,h);
	wallsandtechnologycom.focus();
}
