function Pop_Up(the_url,the_title,w,h,scrolls,resize,menu,status)
{    if (scrolls)
    	{ scrolls = "YES"    }
    else
    	{        scrolls = "NO"     }
    if (resize)
        {        resize = "YES"    }
    else    {        resize = "NO"     }
    if (menu)    {        menu = "YES"    }
        else    {        menu = "NO"     }
   if (status)    {        status = "YES"    }
   else    {        status = "NO"     }
   	window.open(the_url,the_title,"height="+ h +",width="+ w +",scrollbars="+scrolls+",resize="+resize+",menubar="+menu+"status="+status+"");
   }
   
function print_sys (syscart_id)
{
	window.open('print_sys.php?syscart_id='+syscart_id, syscart_id, "height=400, width=500, scrollbars=YES, resize=NO, menubar=NO, status=NO");
}
function SubInfo (sys_id, subid)
{
	window.open('subinfo.php?sys_id='+sys_id+'&sub='+subid, sys_id, "height=400, width=500, scrollbars=YES, resize=NO, menubar=NO, status=NO");
}
function PopUp_Info ()
{
	window.open('popup_info.php', "", "height=300, width=400, scrollbars=NO, resize=NO, menubar=NO, status=NO");
}
function CatInfo (sys_id, catid)
{
	window.open('catinfo.php?sys_id='+sys_id+'&cat='+catid, sys_id, "height=400, width=500, scrollbars=YES, resize=NO, menubar=NO, status=NO");
}
function showdesc (the_id)
{
	window.open('desc.php?id='+the_id, the_id, "height=400, width=400, scrollbars=YES, resize=NO, menubar=NO, status=NO");
}
function popemail (art_id)
{
	window.open('forms/email.php?art_id='+art_id, art_id, "height=200, width=400, scrollbars=YES, resize=NO, menubar=NO, status=NO");
}
function showphoto (the_id)
{
	window.open('photo.php?id='+the_id, the_id, "height=400, width=400, scrollbars=NO, resize=NO, menubar=NO, status=NO");
}

	// popup generator
	var win = null;
	function NewWindow(mypage,myname,w,h,scroll) 
	{
		LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
		TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
		settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
		win = window.open(mypage,myname,settings)
		if(win.window.focus){win.window.focus();}
	}

function logout ()
{
	window.open("logout.php", "Logout", "height=150, width=300, scrollbars=AUTO, resize=NO, menubar=NO, status=NO");
}
 
 
function popup_faq(thefaq)
{        
	var faq = 'faq/loadfaq.php?num='+thefaq;

	window.open(faq , "",  "height=400, width=400, scrollbars=YES, resize=NO, menubar=NO, status=NO");
}


function Pop_Project(number)
{
	window.open("projects/"+number+".php", "Progetti & Soluzioni", "height=400, width=400, scrollbars=AUTO, resize=NO, menubar=NO, status=NO");
}

function Request_Info(path)
{
	window.open (path+"contattaci.php",  "", "height=600, width=400, scrollbars=YES, resize=NO, menubar=NO, status=NO");
}
function Request_Info_ICT(path)
{
	window.open (path+"modulo_ict.php",  "", "height=600, width=400, scrollbars=YES, resize=NO, menubar=NO, status=NO");
}

function myalert(text)
{
	alert(text);
}

function stampa (user, view)
{
	window.open ("stampa.php?user="+user+"&view="+view,  "", "height=400, width=650, scrollbars=AUTO, resize=NO, menubar=NO, status=NO");
}

function Pop_Prev(page)
{
	window.open (page , "", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,dependent,height=600,width=900,left=0,top=0");
}

function print_RMA(id)
{
	window.open ("stampa_rma.php?id="+id,  "", "height=700, width=800, scrollbars=AUTO, resize=NO, menubar=NO, status=NO");
}

function Graph_totale()
{
	window.open ("graph_totale.php",  "", "height=500, width=600, scrollbars=AUTO, resize=NO, menubar=NO, status=NO");
}