/* Written by Deric D. Davis of www.Techno.FM */
/* ************************************************************************************************************************ */


function setRegion(){

      PageIndex2=document.regions.regionID.selectedIndex;

        if (document.regions.regionID.options[PageIndex2].value != "none"){
            location = document.regions.regionID.options[PageIndex2].value;
        }

} // Closes GoToPage page navigation function...
function setLang(){

      PageIndex2=document.langs.langs.selectedIndex;

        if (document.langs.langs.options[PageIndex2].value != "none"){
            location = document.langs.langs.options[PageIndex2].value;
        }

} // Closes GoToPage page navigation function...
function setTimeZone(){

      PageIndex2=document.timezone.timezone.selectedIndex;

        if (document.timezone.timezone.options[PageIndex2].value != "none"){
            location = document.timezone.timezone.options[PageIndex2].value;
        }

} // Closes GoToPage page navigation function...
function setContentLang(){

      PageIndex2=document.content_langs.content_langs.selectedIndex;

        if (document.content_langs.content_langs.options[PageIndex2].value != "none"){
            location = document.langs.langs.options[PageIndex2].value;
        }

} // Closes GoToPage page navigation function...


// LOGIN FORM FOCUS
// ==============================================================================================================================================

var formInUse = false;

   function setLoginFocus(){
      if(!formInUse) {
        document.loginform.user.focus();
      }
   } // Closes Function
   function setPasswordFocus(){
      if(!formInUse) {
        document.loginform.password.focus();
      }
   } // Closes Function
// ==============================================================================================================================================



// JQUERY TITLE REFRESH...
// ==============================================================================================================================================


// Allows AJAX Requests for titles...
function loadHomePageChannelTitle(elementSelector, channelID) {
        if(channelID == ''){ var channelID  = 'live'; }
        $(""+elementSelector+"").load("/ajax/working_img_tag.txt"); // Display "working" image until new data has arrived...
        $(""+elementSelector+"").load("/ajax/title/"+channelID+".html");

} // Closes Function...

function loadPlayerChannelTitle(elementSelector, channelID) {
       if(channelID == ''){ var channelID  = 'live'; }
       $(""+elementSelector+"").load("/ajax/title_simple/"+channelID+".html");
} // Closes Function...

function loadPlayerAllTitles(elementSelector, channelID) {
       if(channelID == ''){ var channelID  = 'live'; }
       $(""+elementSelector+"").load("/ajax/loading_img_tag.txt");
       $(""+elementSelector+"").load("/ajax/all_titles/?current_channel="+channelID);
} // Closes Function...

function loadPlayerAllTitlesiPhone(elementSelector, channelID) {
       if(channelID == ''){ var channelID  = 'live'; }
       $(""+elementSelector+"").load("/ajax/empty_iphone_menu.txt");
       $(""+elementSelector+"").load("/ajax/all_titles_iphone/?current_channel="+channelID);
} // Closes Function...

// ==============================================================================================================================================







// PopUP New Window with News image...
function popup_news_image(URL){
     window.open(URL, 'technofm_image', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=700,height=700');
} // Closes Function...


/* ************************************************************************************************************************ */
