function yearFix(raw) {
 return(raw<1000)?raw+1900: raw;
}

function initArray() {
 this.length=initArray.arguments.length
 for (i=0;i<this.length;i++)
 this[i+1]=initArray.arguments[i]
}

DOWArray=new initArray("Sun","Mon","Tues","Wednes","Thurs","Fri","Satur");
MOYArray=new initArray("January","February","March","April","May","June","July","August","September","October","November","December");
YESTERArray=new initArray("Satur","Sun","Mon","Tues","Wednes","Thurs","Fri");

today=new Date();
DOW=DOWArray[(today.getDay()+1)];
MOY=MOYArray[(today.getMonth()+1)];
YR=yearFix(today.getYear());
YESTER=YESTERArray[(today.getDay()+1)];
month=today.getMonth()+1
day=today.getDay()
hour=today.getHours()
minutes=today.getMinutes()
if (today.getHours()>17) {TOD="Evening"} 
  else {if (today.getHours()>11) {TOD="Afternoon"} 
  else {TOD="Morning"}};

function securepopup(tprPage,howHi,howWide,scrol,Xpos,Ypos) {
 window.open("https://secure.nameservers.com/~texaspub/"+tprPage+".html","","height="+howHi+",width="+howWide+",status=yes,resizable=yes,scrollbars="+scrol+",toolbar=no,menubar=yes,location=no,left="+Xpos+",top="+Ypos);
}

function tprpopup(tprPage,howHi,howWide,scrol,Xpos,Ypos) {
 window.open("http://www.tpr.org/"+tprPage+".html","","height="+howHi+",width="+howWide+",status=yes,resizable=no,scrollbars="+scrol+",toolbar=no,menubar=no,location=no,left="+Xpos+",top="+Ypos);
}

function musicpopup(tprPage,howHi,howWide,scrol,Xpos,Ypos) {
 window.open("http://www.tpr.org/"+tprPage,"","height="+howHi+",width="+howWide+",status=yes,resizable=no,scrollbars="+scrol+",toolbar=no,menubar=no,location=no,left="+Xpos+",top="+Ypos);
}

window.station="KSTX_FM";
window.localize=true;
window.image=false;
window.title=false;

function sneakymail(edress) {
document.write('<a href='+'mail'+'to:'+edress+'@'+'tpr'+'.org>'+edress+'@tpr.org</a>');}

function mmLoadMenus() {
if(window.mm_menu_1026085450_0) return;
window.mm_menu_1026085450_0 = new Menu("root",150,18,"Arial, Helvetica, sans-serif",10,"#333333","#000000","#ffffff","#ffffff","left","middle",4,0,1000,-5,7,true,true,true,0,false,true);
  mm_menu_1026085450_0.addMenuItem("Newsroom","location='/programs/news.html'");
  mm_menu_1026085450_0.addMenuItem("Texas&nbsp;Matters","location='/programs/texasmatters.html'");
  mm_menu_1026085450_0.addMenuItem("The&nbsp;Newsmaker&nbsp;Hour","location='/programs/newsmakerhour.html'");
  mm_menu_1026085450_0.addMenuItem("Community&nbsp;Events&nbsp;Calendar","location='/programs/calendar.html#'+today.getDate()");
 
   mm_menu_1026085450_0.hideOnMouseOut=true;
   mm_menu_1026085450_0.bgColor='#999999';
   mm_menu_1026085450_0.menuBorder=1;
   mm_menu_1026085450_0.menuLiteBgColor='#ffffff';
   mm_menu_1026085450_0.menuBorderBgColor='#cccccc';
window.mm_menu_1026085713_1 = new Menu("root",161,18,"Arial, Helvetica, sans-serif",10,"#333333","#000000","#ffffff","#ffffff","left","middle",4,0,1000,-5,7,true,true,true,0,false,true);
  mm_menu_1026085713_1.addMenuItem("Classical&nbsp;Spotlight","location='/programs/classicalspotlight.html'");
  mm_menu_1026085713_1.addMenuItem("Listeners'&nbsp;Choice","location='/programs/listenerschoice.html'");
 mm_menu_1026085713_1.addMenuItem("World&nbsp;Music&nbsp;on&nbsp;KSTX","location='/programs/worldmusic.html'");
  mm_menu_1026085713_1.addMenuItem("Ritmos&nbsp;del&nbsp;Mundo","location='/programs/ritmosdelmundo.html'");
   mm_menu_1026085713_1.hideOnMouseOut=true;
   mm_menu_1026085713_1.bgColor='#999999';
   mm_menu_1026085713_1.menuBorder=1;
   mm_menu_1026085713_1.menuLiteBgColor='#ffffff';
   mm_menu_1026085713_1.menuBorderBgColor='#999999';
window.mm_menu_1026085921_2 = new Menu("root",163,18,"Arial, Helvetica, sans-serif",10,"#333333","#000000","#ffffff","#ffffff","left","middle",4,0,1000,-5,7,true,true,true,0,false,true);
  mm_menu_1026085921_2.addMenuItem("KSTX&nbsp;89.1&nbsp;FM&nbsp;San&nbsp;Antonio","location='/programs/kstx.html'");
  mm_menu_1026085921_2.addMenuItem("KPAC&nbsp;88.3&nbsp;FM&nbsp;San&nbsp;Antonio","location='/programs/kpac.html'");
  mm_menu_1026085921_2.addMenuItem("KTXI&nbsp;90.1&nbsp;FM&nbsp;in&nbsp;the&nbsp;Hill&nbsp;Country","location='/programs/ktxi.html'");
  mm_menu_1026085921_2.addMenuItem("Podcast Programs","location='/audio/podcasts.html'");
  mm_menu_1026085921_2.addMenuItem("TPR&nbsp;Air&nbsp;Personalities","location='/tpr/airstaff.html'");
   mm_menu_1026085921_2.hideOnMouseOut=true;
   mm_menu_1026085921_2.bgColor='#999999';
   mm_menu_1026085921_2.menuBorder=1;
   mm_menu_1026085921_2.menuLiteBgColor='#ffffff';
   mm_menu_1026085921_2.menuBorderBgColor='#999999';
window.mm_menu_1026090052_3 = new Menu("root",130,18,"Arial, Helvetica, sans-serif",10,"#333333","#000000","#ffffff","#ffffff","left","middle",4,0,1000,-5,7,true,true,true,0,false,true);
  mm_menu_1026090052_3.addMenuItem("Contribute&nbsp;Now","javascript:securepopup(\'pledge\'\,450\,375\,\'yes\'\,25\,25)");
  mm_menu_1026090052_3.addMenuItem("Member&nbsp;Benefits","location='/support/benefits.html'");
  mm_menu_1026090052_3.addMenuItem("The&nbsp;McClain&nbsp;Circle","location='/support/mcclain.html'");
  mm_menu_1026090052_3.addMenuItem("Legacy&nbsp;Giving","location='/support/legacyguild.html'");
  mm_menu_1026090052_3.addMenuItem("Corporate&nbsp;Support","location='/support/corporate.html'");
   mm_menu_1026090052_3.hideOnMouseOut=true;
   mm_menu_1026090052_3.bgColor='#999999';
   mm_menu_1026090052_3.menuBorder=1;
   mm_menu_1026090052_3.menuLiteBgColor='#ffffff';
   mm_menu_1026090052_3.menuBorderBgColor='#999999';
window.mm_menu_1026090612_4 = new Menu("root",125,18,"Arial, Helvetica, sans-serif",10,"#333333","#000000","#ffffff","#ffffff","left","middle",4,0,1000,-5,7,true,true,true,0,false,true);
  mm_menu_1026090612_4.addMenuItem("Newsletter","location='/tpr/newsletter.html'");
    mm_menu_1026090612_4.addMenuItem("History&nbsp;and&nbsp;Mission","location='/tpr/about.html'");
  mm_menu_1026090612_4.addMenuItem("Board&nbsp;of&nbsp;Directors","location='/tpr/board.html'");
  mm_menu_1026090612_4.addMenuItem("Financial&nbsp;Reports","location='/tpr/financial.html'");
  mm_menu_1026090612_4.addMenuItem("Contact&nbsp;Us","location='/tpr/contact.html'");
   mm_menu_1026090612_4.hideOnMouseOut=true;
   mm_menu_1026090612_4.bgColor='#999999';
   mm_menu_1026090612_4.menuBorder=1;
   mm_menu_1026090612_4.menuLiteBgColor='#ffffff';
   mm_menu_1026090612_4.menuBorderBgColor='#999999';

mm_menu_1026090612_4.writeMenus();
} // mmLoadMenus()
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

MM_reloadPage(true);

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

var theImages = new Array()

theImages[0] = '/navigation/mast_alamo.jpg'
theImages[1] = '/navigation/mast_bridge.jpg'
theImages[2] = '/navigation/mast_flag.jpg'
theImages[3] = '/navigation/mast_flowers.jpg'
theImages[4] = '/navigation/mast_hillcountry.jpg'
theImages[5] = '/navigation/mast_mission.jpg'
theImages[6] = '/navigation/mast_oldtown.jpg'
theImages[7] = '/navigation/mast_riverboat.jpg'
theImages[8] = '/navigation/mast_rivercenter.jpg'
theImages[9] = '/navigation/mast_sanjose.jpg'
theImages[10]= '/navigation/mast_skyline.jpg'
theImages[11]= '/navigation/mast_umbrellas.jpg'

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}

function setBgImage(element,imageFile) {
  element.style.backgroundImage="url("+imageFile+")";
  element.style.color="#000000"; }

function setBgImageOver(element,imageFile) {
  element.style.backgroundImage="url("+imageFile+")";
  element.style.color="#000000"; }

