function showMessage(highslideName,highslideHref){
	var hrefObj = document.getElementById('show_message_div');
		//alert(document.getElementById('show_message_div'));
		hrefObj.setAttribute("href",highslideHref);
		hrefObj.setAttribute("class","highslide");
		hrefObj.setAttribute("onclick", new Function("return hs.htmlExpand(this, {contentId: "+highslideName+",objectType: 'ajax'} );"));
		hs.align = 'center';
		hs.htmlExpand(document.getElementById('show_message_div'), {contentId: highslideName,objectType: 'ajax'} );
		//hs.htmlExpand(hrefObj, {contentId: highslideName,objectType: 'iframe',objectWidth: 600, objectHeight: 400 } );
}
function modifyPopup(tag,contenuto_base_tmpl)
{
    window.open( contenuto_base_tmpl +"/modificaTesto.jsp?tag="+tag,"modifica","width=620,height=400,resizable=yes,scrollbars=no,location=no,menubar=no,status=no,toolbar=no");
}
function modifyImagePopup(tag,contenuto_base_tmpl)
{
    window.open (contenuto_base_tmpl+"/modificaImmagine.jsp?tag="+tag,"modificaimg","width=400,height=500,resizable=yes,scrollbars=yes,location=no,menubar=no,status=no,toolbar=no");
}
function annulla(contenuto_base_tmpl)
{
    window.open(contenuto_base_tmpl+"/annullaPagina.jsp","annulla","width=300,height=200,resizable=no,scrollbars=no,location=no,menubar=no,status=no,toolbar=no");
}
function salva(contenuto_base_tmpl)
{
    window.open(contenuto_base_tmpl+"/salvaPagina.jsp","salva","width=300,height=200,resizable=no,scrollbars=no,location=no,menubar=no,status=no,toolbar=no");
}
function pageAdmin(contenuto_base_tmpl)
{
    window.open(contenuto_base_tmpl+"/pages/index.jsp","pageAdmin","width=640,height=480,resizable=yes,scrollbars=yes,location=no,menubar=no,status=yes,toolbar=no");
}
function imageAdmin(contenuto_base_tmpl)
{
    window.open(contenuto_base_tmpl+"/archive/index.jsp","archiveAdmin","width=400,height=500,resizable=yes,scrollbars=yes,location=no,menubar=no,status=yes,toolbar=no");
}
function pannelloDiControllo(base_tmpl)
{
    window.location= base_tmpl+'adm/index.jsp';
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function popupImg(url,width,height)	{
	prev = window.open("","_blank","resizable=no,scrollbars=no,location=no,menubar=no,status=no,toolbar=no,height="+height+",width="+width+",left="+((screen.width - width) / 2)+",top="+((screen.height - height) / 2));
	prev.document.open();
	prev.document.writeln("<html><head><title>Preview</title></head>")
	prev.document.writeln("<body bottommargin=0 leftmargin=0 marginheight=0 marginwidth=0 rightmargin=0 topmargin=0>");
	prev.document.writeln("<script>");
	prev.document.writeln("function completeImg() {");
	prev.document.writeln("i = document.getElementById(\"imm\");");
//	prev.document.writeln("window.resizeTo(i.width, i.height);");
//	prev.document.writeln("window.moveTo((screen.width - i.width) / 2, (screen.height - i.height) / 2);");
	prev.document.writeln("}");
	prev.document.writeln("</script>");
	prev.document.writeln("<a href=\"javascript:window.close();\">");
	prev.document.writeln("<img src=\""+url+"\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\" id=\"imm\" name=\"imm\" onload=\"return completeImg();\">");
	prev.document.writeln("</a>");
	prev.document.writeln("</body>");
	prev.document.writeln("</html>");
	prev.document.close();
}