
//=============================================
// rollover
//=============================================

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 == 'over') {
			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_on'+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('_on'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}
		}
	}
}

window.onload = initRollovers;


//=============================================
// open windows
//=============================================

function open5Risks(sUrl){
	var kyn_win = window.open(sUrl, "5risks_win", "width=972,height=640,menubar=0,toolbar=0,location=0,status=0,resizable=0,scrollbars=0");
}
function openKnowNumber(sUrl){
//	sUrl = "http://fidelity.vo.llnwd.net/o21/learn/knownumber/";   // comment this line to use local video
	var kyn_win = window.open(sUrl, "kyn_win", "width=960,height=650,menubar=0,toolbar=0,location=0,status=0,resizable=0,scrollbars=0");
}
function openIPlan(sUrl){
	var iplan_win = window.open(sUrl, "iplan_win", "width=794,height=520,menubar=0,toolbar=0,location=0,status=0,resizable=0,scrollbars=0");
}
function openDisclaimer(sUrl){
	var disclaimer_win = window.open(sUrl, "disclaimer_win", "width=620,height=732,menubar=0,toolbar=0,location=0,status=1,resizable=1,scrollbars=1");
}
function openVideo(sUrl){
	var videonews_win = window.open(sUrl, "video_win", "width=360,height=278,menubar=0,toolbar=0,location=0,status=0,resizable=0,scrollbars=0");
}
function openPrivacy(sUrl){
	var privacy_win = window.open(sUrl, "privacy_win", "width=630,height=600,menubar=0,toolbar=0,location=0,status=0,resizable=0,scrollbars=1");
}
function openDisclaimerFij(sUrl){
	var disclaimerfij_win = window.open(sUrl, "disclaimerfij_win", "width=550,height=500,menubar=0,toolbar=0,location=0,status=0,resizable=0,scrollbars=1");
}
