﻿// JScript File

function loadRandom ()
{
   // document.getElementById('rndPic').src="rndCel.asp";
}

function LateLoading ()
{
    loadRandom();
}


// Sherutim Be'Click Sub Cat Open
function showSubCategors(id){if(document.getElementById(id).style.display=='block')document.getElementById(id).style.display='none';elsedocument.getElementById(id).style.display='block';}function popUpPlayer()
{
	window.open('../Player/Slider/Radio.asp','','resizable=no,width=270,height=300,scrollbars=no');
}

function popUpPlayer1015()
{
    window.open('../Player/Slider/1015.asp','','resizable=no,width=270,height=300,scrollbars=no');
}
function sendHP()  // Make Home Page
{ 
	document.sndHP.shp.value = "yes";	
	document.sndHP.submit();		
}

function HomePageLoad ()
{
    document.getElementById('frmMessages').src='/SIP/ForumItems.asp';
    document.getElementById('frmMessages').style.visibility = 'visible';
//    fillSelects(1,0);
//    document.getElementById('frmGoogle').src='sendGoogle.asp';
//    document.getElementById('frmGoogle').style.visibility='visible';
}

function HandlePageLoad () 
{
    loadRandom();
    var FreshFrame = document.getElementById('frmFresh');
    
    FreshFrame.src = 'http://www.mivzakon.co.il/news/ticker_om.aspx?f_tr_m=1&f_tr_t=1&f_t=1&heightMq=225&widthMq=135&RequrlRss=news&numMivz=12&delay=60&amount=1';
  //  var GoogleFrame = document.getElementById('frmGoogle');
  //  GoogleFrame.src='sendGoogle.asp'
}

function pageWidth() {return window.innerWidth != null? window.innerWidth: document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth:document.body != null? document.body.clientWidth:null;}

        
// *************************************************
// Show I show side banners
// *************************************************

function show_side_banners(secure)
{
    if (secure==0)
    {
        if(screen.width>1023)
        {
            if (pageWidth()>1000)
            {
                var gap_from_border = (((screen.width-780) / 2) - 100) / 2;
                return 1;
//                var banner_left = document.getElementById('left_banner');
//                banner_left.innerHTML = '<iframe width="100" height="520" src="/controls/show_banner.aspx?banner_page_id=4&banner_type=5" style="z-index:0;" frameborder="0" scrolling="no"></iframe>';
//                banner_left.style.left= gap_from_border +'px';
//                var banner_right = document.getElementById('right_banner_iframe')
//               banner_right.innerHTML = '<iframe width="100" height="520" src="/controls/show_banner.aspx?banner_page_id=4&banner_type=6" style="z-index:0" frameborder="0" scrolling="no"></iframe>';
//                banner_right.style.right= (gap_from_border + 15) +'px';
            }
        }
    }
    return 0;
}

function HideStations()
{
    document.getElementById('tblStations').style.visibility='hidden';            
}
function HideStations2()
{
    document.getElementById('tblStations2').style.visibility='hidden';            
}
function ShowStations()
{
    document.getElementById('tblStations').style.visibility='visible';
    document.getElementById('tblStations').border = '1';
    document.getElementById('tblStations').borderColor = "#20A1FB";
}
function ShowStations2()
{
    document.getElementById('tblStations2').style.visibility='visible';
    document.getElementById('tblStations2').border = '1';
    document.getElementById('tblStations2').borderColor = '#20A1FB';
}
