function initRollovers() {
	if (!document.getElementById) return
	
	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');

	for (var i = 0; i < aImages.length; i++) {		
		if (aImages[i].className == 'roImg') {
			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_over'+ftype);

			aImages[i].setAttribute('hsrc', hsrc);
			
			aPreLoad[i] = new Image();
			aPreLoad[i].src = hsrc;
			
			aImages[i].onmouseover = function() {
				sTempSrc = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('hsrc'));
			}	
			
			aImages[i].onmouseout = function() {
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_over'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}
		}
	}
}
window.onload = initRollovers;
setRaysHeight();
var defaultRayHeight = document.getElementById('shadow_main_content').clientHeight; //needed for height expansion for FAQ, Benefits, etc.

function setRaysHeight(){
	var setHeight = document.getElementById('shadow_main_content').clientHeight ;
	newHeight = setHeight;
	document.getElementById('leftBottomRays').style.height = setHeight +'px';
	document.getElementById('rightBottomRays').style.height = setHeight +'px';
}

function minusRaysHeight(){
	document.getElementById('leftBottomRays').style.height = defaultRayHeight +'px';
	document.getElementById('rightBottomRays').style.height = defaultRayHeight +'px';
}

function divLink(url) {
	document.location.href = url;
}

function expandCollapse(obj,btn){
	var items = document.getElementById(obj);
	var btn = document.getElementById(btn);
if ( items.style.display  != 'none'){
		items.style.display  = 'none';
		btn.style.background =  'url(images/faq/btn_plus.gif)';
		minusRaysHeight(); //clear back to default
		setRaysHeight(); //set it again
	} else {
		items.style.display  = 'inline';
		btn.style.background =  'url(images/faq/btn_minus.gif)';
		setRaysHeight(); //set the height as height expands
	}
}

function expandCollapse_benefit(obj,btn){
	var items = document.getElementById(obj);
	var btn = document.getElementById(btn);
if ( items.style.display  != 'none'){
		items.style.display  = 'none';
		btn.style.background =  'url(images/faq/btn_plus_benefit.gif)';
		minusRaysHeight(); //clear back to default
		setRaysHeight(); //set it again
	} else {
		items.style.display  = 'inline';
		btn.style.background =  'url(images/faq/btn_minus_benefitt.gif)';
		setRaysHeight(); //set the height as height expands
	}
}
function genericpopwin(windowURL, windowWidth, windowHeight, scrollBars, reSizable, windowName)	{
	
	if (scrollBars)	{
		//
	} else	{
		scrollBars = 'no'
	}
	
	if (reSizable)	{
		//
	} else	{
		reSizable = 'no'
	}
		
	var windowOptions = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + scrollBars + ",resizable=" + reSizable + ",width=" + windowWidth + ",height=" + windowHeight;
	
	var mywin = window.open(windowURL,windowName,windowOptions);
}

