﻿function showhide(divshow, divhide)
{ 
    if(divshow!="")
        {
        divS = document.getElementById(divshow);
        divS.style.visibility = "visible";
        divS.style.display = "block";
        // alert(divS + " " + hide);
        }
    if(divhide!="")
        {
        divS = document.getElementById(divhide);
        divS.style.visibility = "hidden";
        divS.style.display = "none";
        //alert(divS + " " + hide);
        }
}
function menu()
{
    // hide all boxes if menu pressed
    var i=1;
    for (i=1;i<=4;i++)
    {
        showhide("", "c" + i);
    }
 showhide("mymenu", "");
}
function doPlayer(type)
{
    divP = document.getElementById("player");
    if(type=="win")
    {
    pstr = "<object id='mediaPlayer1' width='322' height='50' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'><param name='fileName' value='http://alienspeaking.com:666'><param name='animationatStart' value='true'><param name='transparentatStart' value='true'><param name='autoStart' value='true'><param name='showControls' value='true'><param name ='ShowAudioControls'value='true'><param name='ShowStatusBar' value='true'><param name='loop' value='false'><embed type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' bcolor='darkblue' showcontrols='true' showtracker='-1' showdisplay='0' showstatusbar='-1' videoborder3d='-1' width='322' height='50' src='http://alienspeaking.com:666' autostart='true' designtimesp='5311' loop='false'></embed></object>";
    }
    else
    {
    pstr = "<object type='audio/mpeg' data='http://www.alienspeaking.com/stream.pls' width='322' height='32' autoplay='true'></object>";
    }
    divP.innerHTML = pstr;

}
function doImage()
{
    var randomnumber=Math.floor(Math.random()*6169843);
    // set bg
    var camdiv = document.getElementById("camdiv");
    camdiv.style.background = "url('images/live/live.jpg?id=" + randomnumber + "')";
    callyoself();
}
function callyoself()
{
    setTimeout("doImage()", 20000);
}


