function openCredits(v_intIdLanguage){
	window.open("Tools/Credits/creditsPleiadi.asp?lng=" + v_intIdLanguage,"Credits","dependent=yes,Height=140,Width=320,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=yes,toolbar=no");
}


function OpenZoomWindow(sImg,sTitle,sWidth,sHeight,sClose,sDescription){
	if(sClose==null) sClose = "close";
	var sTotHeight;
	sTotHeight = (sHeight/1+17);
	var oWin = window.open('','','status=0,scrollbars=0,height=' + sTotHeight + 'px,width='+sWidth+'px');
	var sHtml = '<html>\n';
	sHtml += '<head><title>' + sTitle + '</title>\n';
	sHtml += '<style type=\"text/css\">\n';
	sHtml += '.fntDefault { text-decoration: none; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #666666 }\n';
	sHtml += '</style>\n</head>\n';
	sHtml += '<body bgcolor=\"#ffffff\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n';
	sHtml += '<table width=\"100%\" height=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n';
	sHtml += '<tr><td align=\"center\" valign=\"middle\"><img border=\"0\" src=\"'+sImg+'\"></td></tr>\n';

	sHtml += '<tr height=\"2\"><td bgcolor=\"#EBEAE5\"><img src=\"img/np.gif\" height=\"2\"></td></tr>\n';
	sHtml += '<tr height=\"15\"><td bgcolor=\"#E9E9E9\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr>\n';
	if(sDescription!=null && sDescription!=''){
		sHtml += '<td align=\"left\" valign=\"middle\" class=\"fntDefault\" style=\"padding-left:5px;\">' + sDescription + '</td>\n';
	}
	sHtml += '<td align=\"right\" valign=\"middle\" class=\"fntDefault\" style=\"padding-right:5px;\"><a class=\"fntDefault\" href=\"javascript:window.close()\">' + sClose + '</a></td></tr></table></td></tr>\n';

	sHtml += '</table>\n';
	sHtml += '</body>\n';
	sHtml += '</html>';
	oWin.document.write(sHtml);
}

function openResources(v_strIdLanguage, v_strResourceType, v_strIdProduct){
	window.open("tools/products/productDwnlPopUp.aspx?type=" + v_strResourceType + "&lng=" + v_strIdLanguage + "&idp=" + v_strIdProduct,"DoqnloadPage","dependent=yes,Height=300,Width=450,location=no,menubar=no,resizable=yes,scrollbars=auto,status=no,titlebar=yes,toolbar=no");
}

function openComparatore(v_strIdLanguage,v_strUrl,v_strWidth,v_strHeight){
	window.open(v_strUrl + "?lng=" + v_strIdLanguage,"CompPage","dependent=yes,Height=" + v_strHeight + ",Width=" + v_strWidth + ",location=no,menubar=no,resizable=no,scrollbars=auto,status=no,titlebar=yes,toolbar=no");
}

function openNewWindow(v_strUrl,v_strWidth,v_strHeight){
	window.open(v_strUrl,"newPage","dependent=yes,Height=" + v_strHeight + ",Width=" + v_strWidth + ",location=no,menubar=no,resizable=no,scrollbars=auto,status=no,titlebar=yes,toolbar=no");
}

function openPressRZoomImage(v_strFilePath){
	window.open("/tools/zoomImage.aspx?fp=" + v_strFilePath,"zoom","dependent=yes,Height=400,Width=600,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=yes,toolbar=no");
}

/*function openNewsletterPopUpPage(v_strPage, v_strIdLanguage){
	window.open("Tools/Newsletter/nlPopUpPage.aspx?page=" + v_strPage + "&lng=" + v_strIdLanguage, "newsletterPopUp","dependent=yes,Height=500,Width=700, top=0, left=0, location=no,menubar=no,resizable=no,scrollbars=yes,status=no,titlebar=no,toolbar=no,linksbar=no");
}



function CheckEnable(v_strRadioButtId){
	if(getObject(v_strRadioButtId).checked){
		return(true);
	}else{
		alert("Please select \"yes\" to go on with your offer proposal");
		return(false);
	}
}

function openPressRZoomImage(v_strFilePath){
	window.open("/tools/shared/zoomImage.aspx?fp=" + v_strFilePath,"zoom","dependent=yes,Height=400,Width=600,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=yes,toolbar=no");
}

function loadInOpener(v_strPage){
	window.opener.location.href = v_strPage;
}

function goToAnchor(v_strAnchorID){
	document.location.href = "#" + v_strAnchorID
}



function loadInOpener(v_strUrl){
	window.opener.location = v_strUrl;
	window.focus()
}






function BoxImagesChanger(v_strNumImage, v_strFgImagesList, v_strBgImagesList, v_strCurrImgVarName, v_flStep, v_strImageID, v_strCellID){
	var strFgImagesList = "";
	var strBgImagesList = "";
	var arrFgImagesList = new Array();
	var arrBgImagesList = new Array();
	var pattern = /<!--slash-->/gi;
	var intCurrImgIndex = 0;
	var objImage;	//immagine da cambiare
	var objCell;	//cella a cui cambiare il background
	
	//indice dell'immagine corrente
	intCurrImgIndex = eval(v_strCurrImgVarName);
	
	//stringhe conl'elenco delle immagini
	strFgImagesList = v_strFgImagesList.replace(pattern, "\\");
	strBgImagesList = v_strBgImagesList.replace(pattern, "\\");
	
	//array conl'elenco delle immagini
	arrFgImagesList = strFgImagesList.split(",");
	arrBgImagesList = strBgImagesList.split(",");
		
	//incremento, decremento l'ingice corrente
	if(v_flStep < 0 && intCurrImgIndex <= 1){
		intCurrImgIndex = v_strNumImage;
	}else if(v_flStep > 0 && intCurrImgIndex >= v_strNumImage){
		intCurrImgIndex = 1;
	}else{
		intCurrImgIndex += v_flStep;
	}
		
	//riferimenti algi oggetti client (image e td)
	objImage = getObject(v_strImageID);
	objCell = getObject(v_strCellID);
		
	//cambio l'src all'immagine e il background alla cella
	objImage.src = arrFgImagesList[intCurrImgIndex-1];
	
	if (objCell.background) {
		objCell.background = arrBgImagesList[intCurrImgIndex-1];
	}else if (objCell.style.background) {
		objCell.style.background = "url(' + arrBgImagesList[intCurrImgIndex-1] + ')";
	}else if (objCell.setAttribute) {
		objCell.setAttribute('background', arrBgImagesList[intCurrImgIndex-1]);
	}
	
	eval(v_strCurrImgVarName + "=" + intCurrImgIndex);
}


function BoxImagesGoTo(v_strLinkList, v_strCurrImgVarName){
	var arrLinkList = new Array();
	var intCurrImgIndex = 0;
	
	//indice dell'immagine corrente
	intCurrImgIndex = eval(v_strCurrImgVarName) - 1;
	
	arrLinkList = v_strLinkList.split(",");
	
	//alert(v_strLinkList);
	if(arrLinkList[intCurrImgIndex] != null && arrLinkList[intCurrImgIndex] != ""){
		document.location.href = arrLinkList[intCurrImgIndex];
	}else{
		return(false);
	}
}

function BoxImagesNext(v_strNumImage, v_strFgImagesList){
	var arrFgImagesList = v_strFgImagesList.split(",")


	alert(v_strNumImage);
}



function getObject(v_strIdImage){
	var strBrowserName = "";
	var vObj;
	
	strBrowserName = whatbrowser();
	
	switch(strBrowserName){
		case "NN6":{
			vObj = document.getElementById(v_strIdImage);
			break;
		}
		case "NN4":{
			vObj = document.getElementById(v_strIdImage);
			break;
		}
		case "ie4":
		case "ie6":
		case "ieMac":{
			vObj = document.all(v_strIdImage);
			break;
		}
		default:{
			vObj = document.all(v_strIdImage);
		}
	}
	
	return(vObj);
}


//whatbrowser()
//
//determina con quale browser l'utente è collegato e restituisce la sigla corrispondente
//
//argomenti:
//	nessuno
//
//valore di ritorno:
//	stringa	=	sigla corrispondente al browser con cui l'utente è collegato
//				NN4	=	netscape4
//				NN6	=	netscape6
//				ie	=	internet explorer
function whatbrowser(){
	var thisbrowser = "";	//sigla del browser utilizzato dall'utente
	var strAppVersion = navigator.appVersion;

	var blnIsIe4 = (strAppVersion.indexOf("MSIE 4") == -1) ? 0 : 1;
	var blnIsIe5 = (strAppVersion.indexOf("MSIE 5") == -1) ? 0 : 1;
	var blnIsIe6 = (strAppVersion.indexOf("MSIE 6") == -1) ? 0 : 1;
	var blnIsMac = (strAppVersion.indexOf("Macintosh") == -1) ? 0 : 1;
	
	//interrogo l'oggetto document per capire quale broeser sta utilizzando l'utente
    if(document.layers){
        thisbrowser="NN4";
    }
    if(document.all){
         if(blnIsIe4 == 1 || blnIsIe5==1) thisbrowser="ie4";
         else if(blnIsIe6 == 1) thisbrowser="ie6";
         else if(blnIsMac == 1) thisbrowser="ieMac";
         else thisbrowser="ie";
         
         //alert(thisbrowser);
    }
    if(!document.all && document.getElementById){
         thisbrowser="NN6";
    }
    
    return(thisbrowser);
}*/

function printPage(){
	/*var strPage = "";
	var intStartIndex = 0;
	var intEndIndex = 0;
	
	strPage = document.location.href;
	
	intStartIndex = strPage.lastIndexOf("/") + 1;
	
	strPage = strPage.substr(intStartIndex);
	window.open("printPage.asp?page=" + escape(strPage),"printPage","dependent=yes,Height=400,Width=600,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,titlebar=yes,toolbar=no");*/
	
	window.print();
}

/*function openPage(v_strPage, v_intWidth, v_intHeight){
	window.open(v_strPage,"popuppage","dependent=yes,Height=" + v_intHeight + ",Width=" + v_intWidth + ",location=no,menubar=no,resizable=no,scrollbars=yes,status=no,titlebar=yes,toolbar=no");
}

function OpenZoomWindow(strImg){

	//alert("tools/zoomWindow.aspx?img=" + strImg)

	window.open("tools/zoomWindow.aspx?img=" + strImg,"zoomWindow",'height=300,width=300,status=0,scrollbars=0');
}

function WriteSpace(v_intWidth){
	alert("v_intWidth: " + v_intWidth);
	
	var strSpace = "";
	
	strSpace = "<td width=\"" + v_intWidth + "\"><img src=\"img/shared/np.gif\" border=\"0\" width=\"" + v_intWidth + "\" height=\"1\"></td>";
	
	if(v_intWidth > 0){
		document.write(strSpace);
	}
}

//npwidthmax()
//
//calcola width della pagina, toglie larghezza menu sinistra e larghezza menu 
//destra return (la differenza)
function npwidthmax(){
	size = parseInt(window.innerWidth) - 161;
	return size;
}*/