// File JScript
var iebody;
var dsoctop = 0;
var tblCont = null;
var videoname = "";

function scrollmondo() {
    return ;
    var myEl = document.getElementById('divmondo');
    if (myEl!=null)
    {
        //myEl.style.position = 'relative';
        if (document.compatMode && (document.compatMode != "BackCompat"))
        {
            iebody = document.documentElement;
        }
        else
        {
            iebody = document.body;
        }
        
        newY=document.all? iebody.scrollTop : pageYOffset;
        new Effect.Move('divmondo', { x: 0, y: newY, mode: 'absolute', duration: 4.0, transition: Effect.Transitions.spring });
    }
    setTimeout("scrollmondo()", 1000);
}

function swapcontact()
{
    var contvis = $('cf').style.display;
    if (contvis=='none')
    {
        //document.getElementById('cf').style.visibility='visible';
        //document.getElementById('cf').style.display='';  
        Effect.SlideDown('cf', { duration: 4.0 });
    }
    else
    {
        //document.getElementById('cf').style.visibility='hidden';
        //document.getElementById('cf').style.display='none'; 
        Effect.SlideUp('cf', { duration: 4.0 });     
    }
}
function showcf()
{
    var contvis = $('cf').style.display;
    if (contvis!='none')
    {
        $('cf').style.display = '';
    }
}
function swapcf(hlater)
{
    if (hlater)
    {
        $('tblscrivia').style.display = 'none';
    }
    var contvis = $('cf').style.display;
    if (contvis=='none')
    {
        Effect.Grow('cf', { direction: 'center', duration: 4.0 });
        var objScrollBox = $('dettcliente');
        if (objScrollBox)
        {
            objScrollBox.scrollTop = 0;//objScrollBox.scrollHeight;
        }
    }
    else   
    {
        Effect.Fold('cf', { duration: 3.0 });
    }
}
function swapvideo(fexists)
{
    //var vname="images/media/" + videoname + ".flv";
    //alert (videoname);
    //if ((!videoname) || (videoname==null) || (videoname==''))
    {
        var vqs = getqs('Id');
        videoname = "V-" + vqs;
    }

    var vname= videoname + ".flv";

    var contvideo = $('vid').style.display;
    if (contvideo=='none')
    {
        Effect.Fade('imgG', { duration: 2.0 });
        Effect.Appear('vid');
        if (fexists)
        {
            swfobject.embedSWF("media/player.swf?file=" + vname + "&bufferlength=5&autostart=true&controlbar=none&repeat=always","vid","500","333","9.0.0", null, null, null, null);//&icons=true
        }
        else
        {
            swfobject.embedSWF("media/no-video.swf","vid","500","333","9.0.0", null, null, null, null);
        }
    }
    else   
    {
        Effect.Fade('vid', { duration: 2.0 });
        Effect.Appear('imgG');
    }   
}

function swapvideoannunci(fexists)
{
    //var vname="images/media/" + videoname + ".flv";
    //alert (videoname);
    //if ((!videoname) || (videoname==null) || (videoname==''))
    {
        var vqs = getqs('Id');
        videoname = "A-" + vqs;
    }

    var vname= videoname + ".flv";

    var contvideo = $('vid').style.display;
    if (contvideo=='none')
    {
        Effect.Fade('imgG', { duration: 2.0 });
        Effect.Appear('vid');
        if (fexists)
        {
            swfobject.embedSWF("media/player.swf?file=" + vname + "&bufferlength=5&autostart=true&controlbar=none&repeat=always","vid","500","333","9.0.0", null, null, null, null);//&icons=true
        }
        else
        {
            swfobject.embedSWF("media/no-video.swf","vid","500","333","9.0.0", null, null, null, null);
        }
    }
    else   
    {
        Effect.Fade('vid', { duration: 2.0 });
        Effect.Appear('imgG');
    }   
}
/*
function sleep(milliseconds) {
  var start = new Date().getTime();
  for (var i = 0; i < 1e7; i++) {
    if ((new Date().getTime() - start) > milliseconds){
      break;
    }
  }
}
*/





