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


var AFFID;


/* General Pop-Up Functions
====================================================================================================================================================== */

function technofm_player(CHANNEL,AFFID) {

       id         = 'technofm_player';
       // player_url = 'http://techno.fm/radio/player.php';
       player_url = 'http://techno.fm/radio';

          // if(AFFID == null){ URL   = player_url+"?channelID="+CHANNEL;                   }
          // else{              URL   = player_url+"?channelID="+CHANNEL+"&affID="+AFFID;   }

          if(AFFID == null){ URL   = player_url+"/"+CHANNEL+"/";                   }
          else{              URL   = player_url+"/"+CHANNEL+"/?affID="+AFFID;   }

              window.open(URL, id, 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,addressbar=0,width=740,height=350');

} // Closes Function...


function technofm_player_raw(URL) {
       id  = 'technofm_player';
       eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=753,height=400');");
} // Closes Function...

/* ====================================================================================================================================================== */





/* Channel Listing Function...
/* ====================================================================================================================================================== */
function technofm_channels( INPUT ) {

  if(INPUT==null) var INPUT  = [];

    if(INPUT['affID']  == null){                INPUT['affID']  = 'guest';                                   }


    if(INPUT['font_family']   == null){         INPUT['font_family']   = 'verdana, arial, sans-serif';       }
    if(INPUT['font_size']     == null){         INPUT['font_size']     = '10px';                             }

    if(INPUT['bg_colour']     == null){         INPUT['bg_colour']     = '#ffffff';                          }
    if(INPUT['font_colour']   == null){         INPUT['font_colour']   = '#000000';                          }
    if(INPUT['link_colour']   == null){         INPUT['link_colour']   = '#437290';                          }

    if(INPUT['title_text']    == null){         INPUT['title_text']    = 'Tune In to Techno.FM';             }
    if(INPUT['title_size']    == null){         INPUT['title_size']    = '12px';                             }
    if(INPUT['title_colour']  == null){         INPUT['title_colour']  = '#aa0000';                          }


       document.write("<table bgcolor='"+INPUT['bg_colour']+"' cellpadding='0' cellspacing='0' border='0'>");

          document.write("<tr><td colspan='8' align='center' valign='top'>");
             document.write("<a href='http://techno.fm/'>");
             document.write("<font style=\" font-weight: bold; font-family: "+INPUT['font_family']+"; color: "+INPUT['title_colour']+"; font-size: "+INPUT['title_size']+"; \">"+INPUT['title_text']+"</font>");
             document.write("</a>");
          document.write("</td></tr>");


          document.write("<tr>");
             document.write("<td valign='top'><font style=\"color: "+INPUT['font_colour']+"; font-size: "+INPUT['font_size']+"; \">&nbsp;</font></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">&nbsp;</font></td>");

             document.write("<td valign='top'><font style=\"font-weight: bold; font-family: "+INPUT['font_family']+"; color: "+INPUT['font_colour']+"; font-size: "+INPUT['font_size']+"; \">MP3&nbsp;</font></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\"> | </font></td>");

             document.write("<td valign='top'><font style=\"font-weight: bold; font-family: "+INPUT['font_family']+"; color: "+INPUT['font_colour']+"; font-size: "+INPUT['font_size']+"; \">AAC&nbsp;</font></td>");
//             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\"> | </font></td>");

//             document.write("<td valign='top'><font style=\"font-weight: bold; font-family: "+INPUT['font_family']+"; color: "+INPUT['font_colour']+"; font-size: "+INPUT['font_size']+"; \">MP3</font></td>");
          document.write("</tr>");


          document.write("<tr>");
             document.write("<td valign='top'><font style=\"font-family: verdana, arial, sans-serif; color: "+INPUT['font_colour']+"; font-size: "+INPUT['font_size']+"; \">LIVE</font></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">&nbsp;</font></td>");

             document.write("<td valign='top'><a onClick=\"javascript:technofm_player('live','"+INPUT['affID']+"')\" href='#'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

             document.write("<td valign='top'><a href='http://aac.live.techno.fm/?type=m3u'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">64k</font></a></td>");
//             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

//             document.write("<td valign='top'><a href='http://mp3.live.techno.fm/'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
          document.write("</tr>");


          document.write("<tr>");
             document.write("<td valign='top'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['font_colour']+"; font-size: "+INPUT['font_size']+"; \">TECHNO</font></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">&nbsp;</font></td>");

             document.write("<td valign='top'><a onClick=\"javascript:technofm_player('techno','"+INPUT['affID']+"')\" href='#'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

             document.write("<td valign='top'><a href='http://aac.techno.techno.fm/?type=m3u'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">64k</font></a></td>");
//             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

//             document.write("<td valign='top'><a href='http://mp3.techno.techno.fm/'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
          document.write("</tr>");


          document.write("<tr>");
             document.write("<td valign='top'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['font_colour']+"; font-size: "+INPUT['font_size']+"; \">TRANCE</font></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">&nbsp;</font></td>");

             document.write("<td valign='top'><a onClick=\"javascript:technofm_player('trance','"+INPUT['affID']+"')\" href='#'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

             document.write("<td valign='top'><a href='http://aac.trance.techno.fm/?type=m3u'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">64k</font></a></td>");
//             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

//             document.write("<td valign='top'><a href='http://mp3.trance.techno.fm/'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
          document.write("</tr>");


          document.write("<tr>");
             document.write("<td valign='top'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['font_colour']+"; font-size: "+INPUT['font_size']+"; \">HOUSE</font></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">&nbsp;</font></td>");

             document.write("<td valign='top'><a onClick=\"javascript:technofm_player('house','"+INPUT['affID']+"')\" href='#'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

             document.write("<td valign='top'><a href='http://aac.house.techno.fm/?type=m3u'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">64k</font></a></td>");
//             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

//             document.write("<td valign='top'><a href='http://mp3.house.techno.fm/'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
          document.write("</tr>");

/*
          document.write("<tr>");
             document.write("<td valign='top'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['font_colour']+"; font-size: "+INPUT['font_size']+"; \">ELECTRO</font></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">&nbsp;</font></td>");

             document.write("<td valign='top'><a onClick=\"javascript:technofm_player('electro','"+INPUT['affID']+"')\" href='#'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

             document.write("<td valign='top'><a href='http://aac.electro.techno.fm/?type=m3u'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">64k</font></a></td>");
//             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

//             document.write("<td valign='top'><a href='http://mp3.electro.techno.fm/'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
          document.write("</tr>");
*/

          document.write("<tr>");
             document.write("<td valign='top'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['font_colour']+"; font-size: "+INPUT['font_size']+"; \">PROG</font></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">&nbsp;</font></td>");

             document.write("<td valign='top'><a onClick=\"javascript:technofm_player('prog','"+INPUT['affID']+"')\" href='#'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

             document.write("<td valign='top'><a href='http://aac.prog.techno.fm/?type=m3u'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">64k</font></a></td>");
//             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

//             document.write("<td valign='top'><a href='http://mp3.prog.techno.fm/'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
          document.write("</tr>");


          document.write("<tr>");
             document.write("<td valign='top'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['font_colour']+"; font-size: "+INPUT['font_size']+"; \">PSY</font></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">&nbsp;</font></td>");

             document.write("<td valign='top'><a onClick=\"javascript:technofm_player('psy','"+INPUT['affID']+"')\" href='#'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

             document.write("<td valign='top'><a href='http://aac.psy.techno.fm/?type=m3u'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">64k</font></a></td>");
//             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

//             document.write("<td valign='top'><a href='http://mp3.psy.techno.fm/'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
          document.write("</tr>");


          document.write("<tr>");
             document.write("<td valign='top'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['font_colour']+"; font-size: "+INPUT['font_size']+"; \">DNB</font></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">&nbsp;</font></td>");

             document.write("<td valign='top'><a onClick=\"javascript:technofm_player('dnb','"+INPUT['affID']+"')\" href='#'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

             document.write("<td valign='top'><a href='http://aac.dnb.techno.fm/?type=m3u'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">64k</font></a></td>");
//             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

//             document.write("<td valign='top'><a href='http://mp3.dnb.techno.fm/'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
          document.write("</tr>");


          document.write("<tr>");
             document.write("<td valign='top'><a target=\"_new\" href=\"http://piknicelectronik.com/\"><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['font_colour']+"; font-size: "+INPUT['font_size']+"; \">PIKNIC</font></a></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">&nbsp;</font></td>");

             document.write("<td valign='top'><a onClick=\"javascript:technofm_player('piknic','"+INPUT['affID']+"')\" href='#'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

             document.write("<td valign='top'><a href='http://aac.piknic.techno.fm/?type=m3u'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">64k</font></a></td>");
//             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

//             document.write("<td valign='top'><a href='http://mp3.piknic.techno.fm/'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
          document.write("</tr>");

// Urban.FM...
//          document.write("<tr>");
//             document.write("<td valign='top'><a target=\"_new\" href=\"http://urban.fm/\"><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['font_colour']+"; font-size: "+INPUT['font_size']+"; \">Urban.FM</font></a></td>");
//             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">&nbsp;</font></td>");

//             document.write("<td valign='top'><a onClick=\"javascript:technofm_player('urban','"+INPUT['affID']+"')\" href='#'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
//             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

//             document.write("<td valign='top'><a href='http://aac.radio.urban.fm/'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">64k</font></a></td>");
//             document.write("<td valign='top' width='8'><font style=\"font-size: "+INPUT['font_size']+"\">|</font></td>");

//             document.write("<td valign='top'><a href='http://mp3.radio.urban.fm/'><font style=\"font-family: "+INPUT['font_family']+"; color: "+INPUT['link_colour']+"; font-size: "+INPUT['font_size']+"; \">128k</font></a></td>");
//          document.write("</tr>");


       document.write("</table>");

} // Closes Function...
/* ====================================================================================================================================================== */






/* Channel Listing SELECT-Function...
/* ====================================================================================================================================================== */
function technofm_channels_select( AFFID ){

     if(INPUT==null){ var INPUT  = []; }
     if(AFFID==null){ var AFFID  = "guest"; }
     // document.write("SELECT: "+AFFID+"<br/>");

        document.write("<form name=\"tfm_nav\">");

           document.write("<select style=\"margin-top:0px;\" name=\"tfm_SelectChannel\" onchange=\"do_select(AFFID, document.tfm_nav.tfm_SelectChannel.options[document.tfm_nav.tfm_SelectChannel.selectedIndex].value);\">");

                document.write("<option value=\"\" selected=\"selected\"><b>Techno.FM</b></option>");
                document.write("<option value=\"visit_tfm\"><b>visit www.Techno.FM</b></option>");
                document.write("<option value=\"\">--- ---</option>");

                document.write("<option value=\"mp3.live\">Live - 128k MP3</option>");
                document.write("<option value=\"aac.live\">Live - 64k AAC</option>");

                document.write("<option value=\"mp3.techno\">Techno - 128k MP3</option>");
                document.write("<option value=\"aac.techno\">Techno - 64k AAC</option>");

                document.write("<option value=\"mp3.trance\">Trance - 128k MP3</option>");
                document.write("<option value=\"aac.trance\">Trance - 64k AAC</option>");

                document.write("<option value=\"mp3.house\">House - 128k MP3</option>");
                document.write("<option value=\"aac.house\">House - 64k AAC</option>");

                // document.write("<option value=\"mp3.electro\">Electro - 128k MP3</option>");
                // document.write("<option value=\"aac.electro\">Electro - 64k AAC</option>");

                document.write("<option value=\"mp3.psy\">Psy - 128k MP3</option>");
                document.write("<option value=\"aac.psy\">Psy - 64k AAC</option>");

                document.write("<option value=\"mp3.prog\">Progressive - 128k MP3</option>");

                document.write("<option value=\"mp3.dnb\">DNB - 128k MP3</option>");

                document.write("<option value=\"mp3.piknic\">PIKNIC - 128k MP3</option>");
                document.write("<option value=\"aac.piknic\">PIKNIC - 64k AAC</option>");


                // document.write("<option value=\"mp3.urban\">Urban.FM - 128k MP3</option>");
                // document.write("<option value=\"aac.urban\">Urban.FM - 64k AAC</option>");

                document.write("<option value=\"\">-- --</option>");
                document.write("<option value=\"visit_tfm\"><b>visit www.Techno.FM</b></option>");
                document.write("<option value=\"add_radio\">Add to your site?</option>");

           document.write("</select>");
        document.write("</form>");


} // Closes Function...
/* ====================================================================================================================================================== */






/* Channel Listing SELECT-Function...
/* ====================================================================================================================================================== */
function do_select(AFFID, INPUT){

   if(AFFID==null){ AFFID  = "guest"; }
   // document.write("AFFID: "+AFFID+"<br/>");
   // document.write("INPUT: "+INPUT+"<br/>");

       if(INPUT == 'mp3.live'){          technofm_player("live", AFFID);    }
       else if(INPUT == 'aac.live'){     document.location.href = "http://aac.live.techno.fm/?affID="+AFFID; }
       else if(INPUT == 'mp3.techno'){   technofm_player("techno",AFFID);   }
       else if(INPUT == 'aac.techno'){   document.location.href   = "http://aac.techno.techno.fm/?affID="+AFFID;   }
       else if(INPUT == 'mp3.trance'){   technofm_player("trance",AFFID);   }
       else if(INPUT == 'aac.trance'){   document.location.href   = "http://aac.trance.techno.fm/?affID="+AFFID;   }
       // else if(INPUT == 'mp3.electro'){  technofm_player("electro",AFFID);   }
       // else if(INPUT == 'aac.electro'){  document.location.href   = "http://aac.electro.techno.fm/?affID="+AFFID;   }
       else if(INPUT == 'mp3.house'){    technofm_player("house",AFFID);   }
       else if(INPUT == 'aac.house'){    document.location.href   = "http://aac.house.techno.fm/?affID="+AFFID;   }
       else if(INPUT == 'mp3.prog'){     technofm_player("prog",AFFID);   }
       else if(INPUT == 'mp3.psy'){      technofm_player("psy",AFFID);   }
       else if(INPUT == 'aac.psy'){      document.location.href   = "http://aac.psy.techno.fm/?affID="+AFFID;   }
       else if(INPUT == 'mp3.dnb'){      technofm_player("dnb",AFFID);   }
       else if(INPUT == 'mp3.piknic'){   technofm_player("piknic",AFFID);   }
       else if(INPUT == 'aac.piknic'){   document.location.href   = "http://aac.piknic.techno.fm/?affID="+AFFID;   }
       // else if(INPUT == 'mp3.urban'){    technofm_player("urban",AFFID);   }
       // else if(INPUT == 'aac.urban'){    document.location.href   = "http://aac.radio.urban.fm/?affID="+AFFID;   }

       else if(INPUT == 'visit_tfm'){    document.location.href   = "http://techno.fm/";   }
       else if(INPUT == 'add_radio'){    document.location.href   = "http://techno.fm/radio.php";   }

       else  { alert("Invalid Channel Parameters Passed!\n"); }

} // Closes Function...
/* ====================================================================================================================================================== */
