﻿// File JScript

function Preferiti() {
     var url    = "http://www.sexyguidaitalia.com";
     var titolo = "Sexyguidaitalia.com";
     window.external.AddFavorite(url, titolo);
}
function popup(nomeCartella,ID_foto,ide,fotoStart){
    URL_res ='../annunci-personali-erotici/popup.aspx?nomeCartella='+nomeCartella+'&ID_foto='+ID_foto+'&fotoStart='+fotoStart+"&ide="+escape(ide);
    var w = 860;
    var h = 660;
    var l = Math.floor((screen.width-w)/2);
    var t = Math.floor((screen.height-h)/2);
    window.open(URL_res,"","height="+h+",width="+w+",menubar=0,resizable=1,scrollbars=yes,status=0,titlebar=0,toolbar=0,left="+l+",top="+t+"+");
    return;
}
function popupRiviste(nomeCartella,ID_foto,ide){
    URL_res ='../popup.aspx?nomeCartella='+nomeCartella+'&ID_foto='+ID_foto+"&ide="+escape(ide);
    var w = 860;
    var h = 660;
    var l = Math.floor((screen.width-w)/2);
    var t = Math.floor((screen.height-h)/2);
    window.open(URL_res,"","height="+h+",width="+w+",menubar=0,resizable=1,scrollbars=yes,status=0,titlebar=0,toolbar=0,left="+l+",top="+t+"+");
    return;
}
function popupUtenti(){
    URL_res ='../reserved/popupUtenti.aspx';
    var w = 860;
    var h = 660;
    var l = Math.floor((screen.width-w)/2);
    var t = Math.floor((screen.height-h)/2);
    window.open(URL_res,"","height="+h+",width="+w+",menubar=0,resizable=1,scrollbars=yes,status=0,channelmode=1,titlebar=0,toolbar=0,left="+l+",top="+t+"+");
    return;
}

function clickButton(e,buttonid)
{ 
    var bt=document.getElementById(buttonid);
    if(typeof bt=='object')
    {
    if(navigator.appName.indexOf("Netscape")>(-1))
    {
    if(e.keyCode == 13)
    {
    if (bt && typeof(bt.click) == 'undefined')
    {
    bt.click = addClickFunction1(bt)
    }
    }
    }
    if(navigator.appName.indexOf("Microsoft Internet Explorer")>(-1))
    {
    if(event.keyCode == 13)
    {
    bt.click();
    return false;
    }
    }
    }   
}
function addClickFunction1(bt)
{
    var result = true;
    if (bt.onclick) result = bt.onclick();
    if (typeof(result) == 'undefined' || result)
    {
    eval(bt.href);
    }
}

