function openZoomWindowPrint(v_strIdImage,v_strTitle,v_strCharatteristics)
{
	var l_strZoomPageUrl = "";
	l_strZoomPageUrl = "tools/shared/zoomImage.aspx?img=" + v_strIdImage + "&title=" + escape(v_strTitle) + "&chrt=" + escape(v_strCharatteristics);
	window.open(l_strZoomPageUrl,"zoomImage","dependent=yes,Height=0,Width=0,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no");
}

function voidFunction(){
	//ie bug
}
function findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function npwidthmax(){
	//calcola width della pagina, toglie larghezza menu sinistra e larghezza menu destra return (la differenza)
	size = parseInt(window.innerWidth) - 440;
	return size;
}
function credits(){
	window.open("credits.htm","credits","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=320,height=140");
}
function PopUpWindow(v_strFile,v_strWidth,v_strHeight,v_strResizable){
	if(v_strResizable==null)
		v_strResizable = "no";
	window.open(v_strFile,"","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=" + v_strResizable + ",width=" + v_strWidth + ",height=" + v_strHeight);
}
function goToAnchor(v_strAnchorID){
	document.location.href = "#" + v_strAnchorID
}
function OpenPrintWindow(v_strURLPrint){
	var oWin = window.open(v_strURLPrint,'','status=0,scrollbars=1,width=550px,height=400px');
	oWin.focus();
}

function LoadDataToPrint(){
	var strId = 'tdPrint';
	var objSource = window.opener.document.getElementById(strId);
	var objDest = window.document.getElementById(strId);
	objDest.innerHTML = objSource.innerHTML;
	//alert(objSource.innerHTML)
}

function onMenuItemClicked(e, eventInfo){
	var strNavUrl = eventInfo.getMenuItem().getNavigateUrl();
	//alert(eventInfo.getMenuItem());
	if (strNavUrl == ""){
		return false;
	}
}

function switchImage(imgPath, imgId){
	var curImg = document.getElementById(imgId);
	curImg.src = imgPath;
}

function createMedia(mediaType,src,width,height,bgcolor,wmode,swliveConn,embedMovie){
    //si tratta di flash
    if (mediaType == 0){
		if (navigator.appVersion.indexOf("MSIE") != -1){
			var strContent = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ';
			//se non sono definiti width e height ==> non li setto
			if (width != "") strContent += 'width="' + width + '" ';
			if (height != "") strContent += 'height="' + height + '"';
			strContent += '>';
			strContent += '<param name="movie" value="'+src+'">';
			strContent += '<param name="quality" value="high">';
			strContent += '<param name="bgcolor" value="'+bgcolor+'" />';
			strContent += '<param name="wmode" value="'+wmode+'">';
			
			if (swliveConn != "") strContent += '<param name="SwLiveConnect" value="'+swliveConn+'">';
			if (embedMovie != "") strContent += '<param name="EmbedMovie" value="'+embedMovie+'">';
			
			strContent += 'Flash plug-in not installed.';
			strContent += '</object>';
			document.write(strContent);
		}else{
			document.write('<object type="application/x-shockwave-flash" data="'+src+'" ');
			
			//se non sono definiti width e height ==> non li setto
			if (width != "") document.write('width="'+width+'" ');
			if (height != "") document.write('height="'+height+'" ');
			
			document.write('wmode="'+wmode+'" bgcolor="'+bgcolor+'" ');
			
			if (swliveConn != "") document.write('SwLiveConnect="'+swliveConn+'" ');
			if (embedMovie != "") document.write('EmbedMovie="'+embedMovie+'"');
			
			document.write('>Flash plug-in not installed.</object>');
		}
	}
}