function roll(img_name1, img_src1)
{	
	document[img_name1].src = img_src1;	
}
function selCat(scelta, pag, lng)
{
	document.location.replace("news.php?pag="+pag+"&tipo="+scelta+"&lng="+lng);
}

function modifica_press(id)
{
	document.location.replace("dettaglio_press.php?id_press="+id+"&ope=0");
}
function elimina_press(id)
{
	if(confirm("Vuoi eliminare la press?"))
		document.location.replace("gestione_press.php?id="+id+"&ope=1");		
}
function aggiungi_press(id)
{
	if(confirm("Vuoi eliminare la press?"))
		document.location.replace("gestione_press.php?id_press="+id+"&ope=2");		
}

function modifica_news(id,tipo)
{
	document.location.replace("dettaglio_news.php?id_news="+id+"&tipo="+tipo);
}

function elimina_news(id)
{
	if(confirm("Vuoi eliminare la news?"))
		document.location.replace("gestione_news.php?id="+id+"&ope=1");		
}

function aggiungi_img_news(id)
{
	window.open("phUploader_news.php?id="+id);
}
function aggiungi_img_product(id)
{
	window.open("phUploader_product.php?id="+id);
}
function aggiungi_img_slide(id)
{
	window.open("phUploader_slide.php?id="+id);
}
function aggiungi_img_slide_mini(id)
{
	window.open("phUploader_slide_mini.php?id="+id);
}


function login(val)
{
	document.location.replace("check_login.php?val="+val);		
}

function modifica_slide(id)
{
	document.location.replace("add_slide.php?id="+id);
}

function elimina_slide(id)
{
	if(confirm("Vuoi eliminare la SLIDE?"))
		document.location.replace("gestione_slide.php?id="+id+"&ope=1");		
}

function modifica_products(id, is_final)
{
	document.location.replace("add_products.php?id="+id+"&is_final="+is_final);
}

function elimina_products(id, is_final)
{
	if(confirm("Vuoi eliminare il PRODUCTS?"))
		document.location.replace("gestione_products.php?id="+id+"&ope=1&is_final="+is_final);		
}


function aggiungi_pegi(id)
{
	var w = window.open("add_pegi.php?id="+id+"&ope=1",'miaFinestra','width=400,height=400 ,toolbar=no, location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
}

function elimina_pegi(id)
{
	if(confirm("Vuoi eliminare il PEGI?"))
		window.open("gestione_pegi.php?id="+id+"&ope=0");		
}
