﻿function openPopup (src, w, h) {
	var p = 'toolbar=no,menubar=no,location=no,directories=no,scrollbars=yes,resizable=yes,status=yes,width=' + (w + 37) + ',height=' + (h + 47) + ',left=' + (screen.availWidth/2-520/2) + ',top=' + (screen.availHeight/2-520/2);
	var popup = window.open(src,'popupTarget',p);
	popup.focus();		
	return false;
	}
	
function ShowHide(controlID){		
	var prefix = controlID.substring(0, controlID.lastIndexOf('_')) + '_';
	if (getObj(prefix + 'tbody').className == 'invisible') {
		getObj(prefix + 'tbody').className = '';
		getObj(prefix + 'img').src = 'Design/Images/ExpandUp.gif';
		}
	else {
		getObj(prefix + 'tbody').className = 'invisible';
		getObj(prefix + 'img').src = 'Design/Images/ExpandDown.gif';
		}	
	}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)";
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShow.filters.blendTrans.Apply();    
   }
   document.images.SlideShow.src = preLoad[j].src;
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play();
   }
   j = j + 1;
   if (j > (p-1)) j=0;
   t = setTimeout('runSlideShow()', slideShowSpeed);
}

function getObj(x) {
	if (typeof x != 'string') return x;
	else if (Boolean(document.getElementById)) return document.getElementById(x);
		else return null;
	}
	
function showWeather(index)
{
    document.getElementById(index).className = 'hiddenWeather visible';
}
function hideWeather(index)
{
    document.getElementById(index).className = 'hiddenWeather';
}
