var winStreamPop = null;
var winRadio = null;
var winMessageBoard = null;
var strLastCall = '';

/*
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
<a href="#" onclick="MM_openBrWindow('viewer.html?bangLg_Prog001.flv','viewerWindow','width=650,height=500,left=20,top=20,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No')">3.Band Large, progressive</a>

*/
function closeRadio() {
         if (winRadio) {
            if (!winRadio.closed) { winRadio.close(); }
         }
}

function closeVideo() {
         if (winStreamPop) {
            if (!winStreamPop.closed) { winStreamPop.close(); }
         }
}


function focusRadio() {
         if (winRadio) {
            if (!winRadio.closed) { winRadio.focus(); }
         }
}

function focusVideo() {
         if (winStreamPop) {
            if (!winStreamPop.closed) { winStreamPop.focus(); }
         }
}

function openVideo(strVideo) {

         closeRadio();

        if (navigator.appName == 'Microsoft Internet Explorer') {
          varSync = window.magazine.GetVariable("varSync");
                }
        else {
          varSync = window.document["magazine"].GetVariable("varSync");
                }


 
        if (strVideo == 'pageBroadcast') { strOpenPage = '../movies_flv/viewer.html?broadcast' }
            else {
		 strOpenPage = '../movies_flv/viewer.html?' + strVideo ;

            }

        if (navigator.appName == 'Microsoft Internet Explorer')
               {
				stringOpen = 'width=570,height=490,left=20,top=20,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No';
			}
         else {
              
                stringOpen = 'width=570,height=490,left=20,top=20,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'; }

        if (!winStreamPop) {
           winStreamPop = window.open(strOpenPage,'pop', stringOpen)
           winStreamPop.focus();
           }
        else {
          if (winStreamPop.closed) {
             winStreamPop = window.open(strOpenPage,'pop', stringOpen);
             winStreamPop.focus();
             }
          else {
             if (strVideo != strLastCall)  {
                        winStreamPop.location = strOpenPage;
                       }
               winStreamPop.focus();
               }
        }

 strLastCall = strVideo;

}

function openBroadcast(strSegment) {

         closeRadio();


         if (strSegment == 'broadcast') { strOpenPage = '../movies_flv/viewer.html?broadcast' }
            else {
//              strOpenPage = '../pages/pageBroadcastSegment.html?' + strSegment;
				 strOpenPage = '../movies_flv/viewer.html?broadcast'; 
           }

        if (navigator.appName == 'Microsoft Internet Explorer')
               { 
                stringOpen = 'width=570,height=490,left=20,top=20,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'; }
         else {
               
                stringOpen = 'width=570,height=490,left=20,top=20,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'; }

        if (!winStreamPop) {
           winStreamPop = window.open(strOpenPage,'pop', stringOpen)
           winStreamPop.focus();
           }
        else {
          if (winStreamPop.closed) {
             winStreamPop = window.open(strOpenPage,'pop', stringOpen);
             winStreamPop.focus();
             }
          else {
             if (strSegment != strLastSegmentCall)  {
                        winStreamPop.location = strOpenPage;
                       }
               winStreamPop.focus();
               }
        }

 strLastSegmentCall = strSegment;

}



function closePopup() {

if (winStreamPop) {
   if (!winStreamPop.closed) { winStreamPop.close(); }
}

if (winRadio) {
   if (!winRadio.closed) { winRadio.close(); }
}

}

function setWindowSync(varSync) {

if (winStreamPop) {
   if (!winStreamPop.closed) {

     if (navigator.appName == 'Microsoft Internet Explorer') {
           winStreamPop.info.SetVariable("varSync",varSync);
           winStreamPop.info.TGotoFrame("_level0/instOnOff",6);
           window.magazine.SetVariable("varSync",varSync);
            }
     else if (navigator.appName == 'Netscape') {
           winStreamPop.document["info"].SetVariable("varSync",varSync);
           winStreamPop.document["info"].TGotoFrame("_level0/instOnOff",6);
           window.document["magazine"].SetVariable("varSync",varSync);
     }


   }
}

}

function openEarCandy() {

if (winStreamPop) {
   if (!winStreamPop.closed) { winStreamPop.close(); }
}

        if (navigator.appName == 'Microsoft Internet Explorer')
               { 
                stringOpen = 'width=300,height=205,left=20,top=20,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'; }
         else {
                stringOpen = 'width=300,height=205,left=20,top=20,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'; }

        if (!winRadio) {

           winRadio = window.open('../flash/radio/radio.html','radiopop', stringOpen)
           winRadio.focus();

           }
        else {
          if (winRadio.closed) {

             winRadio = window.open('../flash/radio/radio.html','radiopop', stringOpen);
             winRadio.focus();

             }
          else {

           winRadio.focus(); }

        }
}

function openMessageBoard() {

        if (navigator.appName == 'Microsoft Internet Explorer')
               { scw=500;
                sch=400;
                stringOpen = 'scrollbars=no,left=0,top=0,width='+scw+',height='+sch; }
         else {
                scw=500;
                sch=400;
                stringOpen = 'scrollbars=no,screenX=0,screenY=0,outerWidth='+scw+',outerHeight='+sch; }

        if (!winMessageBoard) {
           winMessageBoard = window.open('../pages/pageMessageBoard.html','messageboard', stringOpen)
           }
        else {
          if (winMessageBoard.closed) {
             winMessageBoard = window.open('../pages/pageMessageBoard.html','messageboard', stringOpen);
             winMessageBoard.focus();
             }
          else { winMessageBoard.focus(); }
        }
}

function openBuyWindow(MusicID) {
            winBuy = window.open('../pages/comingSoon.html',"comingSoon", 'width=290,height=137,left=20,top=20,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');
            winBuy.focus()
}
