function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}


function getLongDay(intDay) {
	var dayArray = new Array("Sunday", "Monday", "Tuesday", "Wednesday",
				 "Thursday", "Friday", "Saturday");
	return dayArray[intDay];
}

function getLongMonth(intMonth) {
	var monthArray = new Array("January", "February", "March",
				   "April", "May", "June",
				   "July", "August", "September",
				   "October", "November", "December");
	return monthArray[intMonth];
}

function getTodaysDate() {
	var today = new Date();
	var ld = today.getDay();
	var dayofweek = getLongDay(ld);
	var d = today.getDate();
	var day = (d < 10) ? '0'+d : d;
	var m = today.getMonth();
	var month = getLongMonth(m);
	var yy = today.getYear();
	var year = (yy < 2000) ? yy + 1900 : yy;
	
	var todayStr = dayofweek +",&nbsp;" + month + " " + day + ", " + year;
	
	return todayStr;
}

function pfGetWeather(citycode)

/*  the puropse of this method is to redraw the weather magnet
    page based on the city selected.
    this method is called by the <SELECT> onChange event and the
    form button's onClick event.
*/
  
{
    URLtarget = "weather.asp?citytarget=";
    URLtarget += citycode;
    
    window.location.replace(URLtarget);
}

function fnJump2Page(form)
{
  if(form.quickselect.value != 'novalue')
  {
    top.contentarea.location = form.quickselect.value;
  }
}

function fnJump2Location(form)
{
  top.contentarea.location = form.jumpselect.value;
}

function fnJump2Weather(form)
{
  top.contentarea.location = form.weatherselect.value;
}

function fnJump2URL(URL)
{
  top.contentarea.location = URL;
}

var bWinPopup = "0";

function popup(URL, w, h, t, l){
  if(bWinPopup == 0){
  	hWinPopup = window.open(URL, 'hWinPopup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=' +w + ',height=' +h +',top=' +t +',left=' +l);
    bWinPopup = 1;
  }
  else{
    if(hWinPopup.closed){
      hWinPopup = window.open(URL, 'hWinPopup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=' +w + ',height=' +h +',top=' +t +',left=' +l);
    }
    else{
      hWinPopup.focus();
    }
  }
}

var bWinPopupSc = "0";

function popupSc(URL, w, h, t, l){
  if(bWinPopupSc == 0){
  	hWinPopupSc = window.open(URL, 'hWinPopupSc', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=' +w + ',height=' +h +',top=' +t +',left=' +l);
    bWinPopupSc = 1;
  }
  else{
    if(hWinPopupSc.closed){
      hWinPopupSc = window.open(URL, 'hWinPopupSc', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=' +w + ',height=' +h +',top=' +t +',left=' +l);
    }
    else{
      hWinPopupSc.focus();
    }
  }
}

var RLS;
RLS = 0 + (Math.round(10*Math.random()/1.0)%10);

var strRLSImage = new Array(10);
	
strRLSImage[0] = "<img src='images/L3.jpg'  width='325' height='085' border='0' alt='BEST WESTERN FLORIDA' />";
strRLSImage[1] = "<img src='images/L17.jpg' width='325' height='085' border='0' alt='BEST WESTERN FLORIDA' />";
strRLSImage[2] = "<img src='images/L18.jpg' width='325' height='085' border='0' alt='BEST WESTERN FLORIDA' />";
strRLSImage[3] = "<img src='images/L26.jpg' width='325' height='085' border='0' alt='BEST WESTERN FLORIDA' />";
strRLSImage[4] = "<img src='images/L76.jpg' width='325' height='085' border='0' alt='BEST WESTERN FLORIDA' />";
strRLSImage[5] = "<img src='images/L74.jpg' width='325' height='085' border='0' alt='BEST WESTERN FLORIDA' />";
strRLSImage[6] = "<img src='images/L76.jpg' width='325' height='085' border='0' alt='BEST WESTERN FLORIDA' />";
strRLSImage[7] = "<img src='images/L74.jpg' width='325' height='085' border='0' alt='BEST WESTERN FLORIDA' />";
strRLSImage[8] = "<img src='images/L75.jpg' width='325' height='085' border='0' alt='BEST WESTERN FLORIDA' />";
strRLSImage[9] = "<img src='images/L77.jpg' width='325' height='085' border='0' alt='BEST WESTERN FLORIDA' />";

function getRLSImage(){
  return strRLSImage[RLS];
}