
function spoglioPopup(mylink){
	if (! window.focus)
		return true;
	var href;
	if (typeof(mylink) == 'string')
	   href=mylink;
	else
	   href=mylink.href;
	wnd=window.open(href,'wnd','scrollbars=yes,menubar=no,resizable=yes,width=750,height=550,left=800,top=20');
	return false;
}

function popup(mylink, windowname)
{
	if (! window.focus)
		return true;
	var href;
	if (typeof(mylink) == 'string')
	   href=mylink;
	else
	   href=mylink.href;
	wnd=window.open(href, windowname, 'scrollbars=yes,menubar=no,resizable=yes,width=750,height=550,left=800,top=20');
	return false;
}

function popupEdit(mylink, windowname)
{
	if (! window.focus)
		return true;
	var href;
	if (typeof(mylink) == 'string')
	   href=mylink;
	else
	   href=mylink.href;
	wnd=window.open(href, windowname, 'scrollbars=yes,menubar=no,resizable=yes,width=750,height=550,left=600,top=20');
	return false;
}

function popupURL(mylink)
{
	if (! window.focus)
		return true;
	wnd=window.open('', 'URL', 'scrollbars=yes,menubar=no,resizable=yes,width=400,height=150,left=600,top=20');
	if (window.focus) {wnd.focus()}
//	wnd.document.write('<html>');
//	wnd.document.write('<head>');
//	wnd.document.write('<link rel="stylesheet" type="text/css" href="css/bess.css">');
//	wnd.document.write('<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />');
//	wnd.document.write('<meta http-equiv="Content-type" content="text/html;charset=UTF-8" >');
//	wnd.document.write('<SCRIPT LANGUAGE="Javascript" SRC="./jscripts/ires_scripts.js"></SCRIPT>');
//	wnd.document.write('</head>');
	wnd.document.write('<body bgcolor="#666666">');
	wnd.document.write('<table bgcolor="#FFFFFF" width="95%" height="95%" align="center"><tr><td valign="top">');
	wnd.document.write('<table width="95%" >');
	wnd.document.write('<tr>');
	wnd.document.write('<td><b>'+mylink+'</b> </td>');
	wnd.document.write('</tr>');
	wnd.document.write('</table></td></tr><tr><td align="center" valign="bottom">&nbsp;<br><FORM><INPUT type="button" value="Chiudi finestra" onClick="window.close()"></FORM></td></tr></table>');
	wnd.document.write('</body>');
//	wnd.document.write('</html>');
	wnd.document.close();
	return false;
}

function removePage(pageName){
 var where_to = confirm('Deleting '+pageName+'. Are you sure?');
 //window.document.write(where_to);
 if (where_to== true)
 {
	window.location='index.jsp?req_page=edit&action=remove&pageName='+pageName;
 	return false;
 }
 else
 {
	window.location='index.jsp?req_page=edit';
	return false;
 }
}

function removeImage(imageName){
 var where_to = confirm('Deleting '+imageName+'. Are you sure?');
 //window.document.write(where_to);
 if (where_to== true)
 {
	window.location='editContentImagePop.jsp?req_page=&action=remove&imageName='+imageName;
 	return false;
 }
 else
 {
	window.location='editContentImagePop.jsp?req_page=';
	return false;
 }
}

function navUp(path)
{ top.location.href = path; }

