function ConfirmDelete(value,id,sezione) {
	if (confirm("Sei sicuro di voler cancellare il contenuto?"))
	{
	     window.location = "/suadalive/engine/sms/delete.php?id=" + id + "&value=" + value + "&sezione=" + sezione;
	}	
	else window.location = "index.php";
}
function ConfirmAbuso(type,id) {
	if (confirm("Ritieni che questo profilo o sms presenti contenuti offensivi e/o immagini porno e/o oscene, o è presente una violazione della privacy?"))
	{
	    if (type == 'profile') window.location = "index.php?option=profile&uid=" + id + "&module=abuso";
		else if (type == 'sms') window.location = "index.php?option=inbox&id=" + id + "&module=abuso";
	}	
	else
	{
		if (type == 'profile') window.location = "index.php?option=profile&uid=" + id;
		else if (type = 'sms') window.location = "index.php?option=inbox&id=" + id;
	}
}
function ConfirmDeletelista(module,id,sezione) {
	if (confirm("Sei sicuro di voler cancellare il contenuto?"))
	{
	     window.location = "/suadalive/engine/delete_lista.php?module=" + module + "&id=" + id + "&sezione=" + sezione;
	}	
	else window.location = "index.php";
}
function ConfirmAcceptlista(module,id,sezione) {
	window.location = "/suadalive/engine/delete_lista.php?module=" + module + "&id=" + id + "&sezione=" + sezione;	
}
function autoPopup(uid,id,tipo,sezione) {
   var stili = "top=0, left=0, width=657, height=566, status=no, menubar=no, toolbar=no, scrollbar=no";
   var testo = window.open("/suadalive/engine/mygallery/foto.php?uid=" + uid + "&value=" + id + "&module=" + tipo + "&sezione=" + sezione, "", stili);
}
function ModComment(module,id,sezione) {
   var stili = "top=0, left=0, width=357, height=150, status=no, menubar=no, toolbar=no, scrollbar=no";
   var testo = window.open("/suadalive/engine/fotogallery/modify.php?module=" + module + "&id=" + id + "&sezione=" + sezione, "", stili);
}
function fotoPopup(galleryid,id,sezione) {
   var u = galleryid;
   var stili = "top=0, left=0, width=657, height=546, status=no, menubar=no, toolbar=no, scrollbar=no";
   var testo = window.open("/suadalive/engine/fotogallery/foto.php?galleryid=" + u + "&value=" + id + "&sezione=" + sezione, "", stili);
}
function fotoPopupsponsor(galleryid,id) {
   var u = galleryid;
   var stili = "top=0, left=0, width=657, height=666, status=no, menubar=no, toolbar=no, scrollbar=no";
   var testo = window.open("/sponsor/foto.php?galleryid=" + u + "&value=" + id, "", stili);
}
function commentiPopup(sid,id,sezione) {
   var stili = "top=0, left=0, width=567, height=350, status=no, menubar=no, toolbar=no, resizable=yes, scrollbars=yes";
   var testo = window.open("/suadalive/engine/rubriche/commenti.php?sid=" + sid + "&rubrica=" + id + "&sezione=" + sezione, "", stili);
}
function smsPopup(sezione) {
   var stili = "top=0, left=0, width=450, height=300, status=no, menubar=no, toolbar=no, resizable=yes, scrollbars=no";
   var testo = window.open("/public/sms/aruba.php?sezione=" + sezione, "", stili);
}
function prenotazione() {
   var stili = "top=0, left=0, width=367, height=250, status=no, menubar=no, toolbar=no, resizable=yes, scrollbars=yes";
   var testo = window.open("/prenotazione.php", "", stili);
}
function info() {
   var stili = "top=0, left=0, width=367, height=250, status=no, menubar=no, toolbar=no, resizable=yes, scrollbars=yes";
   var testo = window.open("/info.php", "", stili);
}
function chat(sezione) {
   var stili = "top=0, left=0, width=925, height=510, status=no, menubar=no, toolbar=no, resizable=yes, scrollbars=no";
   var testo = window.open("/suadalive/chat.php?sezione=" + sezione, "", stili);
}
function contact(sezione) {
   var stili = "top=0, left=0, width=450, height=430, status=no, menubar=no, toolbar=no, resizable=yes, scrollbars=yes";
   var testo = window.open("/suadalive/engine/legal/contatti.php?sezione=" + sezione, "", stili);
}
// BANNER IN SOVRAIMPRESSIONE
function dis1() {
if(document.getElementById) document.getElementById("Pub2").style.visibility = "hidden";
}
function aff1() {
if(document.getElementById) document.getElementById("Pub2").style.visibility = "visible";
}
function dis2() {
if(document.getElementById) document.getElementById("Pub1").style.visibility = "hidden";
}

// SCREENSHOTS
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 Extlink(indirizzo){
if(confirm('Per visualizzare la pagina:\n'+indirizzo+'\ndevi essere collegato a Internet.\nPer proseguire premi OK! altrimenti Annulla.')){window.open(indirizzo)}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].display = iState ? "inline" : "none";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.display = iState ? "inline" : "none";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.display = iState ? "inline" : "none";
    }
}
