﻿<!--
var curX, curY;
var preloadFlag = false;

if (document.layers)
	document.captureEvents(Event.MOUSEMOVE); 

document.onmousemove = Move;

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = _rootPath + 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];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		LeftNav01 = newImage("/images/navigation/compare-plans-over.gif");
		LeftNav02 = newImage("/images/navigation/contact-us-over.gif");
		LeftNav07 = newImage("/images/navigation/blue-advantage-over.gif");
		LeftNav03 = newImage("/images/navigation/dental-insurance-over.gif");
		LeftNav04 = newImage("/images/navigation/home-over.gif");
		LeftNav05 = newImage("/images/navigation/short-term-health-insurance-out.gif");
		LeftNav06 = newImage("/images/navigation/patient-statements-over.gif");

		Rdm01 = newImage("/images/random/header/compare/compare-1.jpg");
		Rdm02 = newImage("/images/random/header/compare/compare-2.jpg");
		Rdm03 = newImage("/images/random/header/compare/compare-3.jpg");
		Rdm04 = newImage("/images/random/header/compare/compare-4.jpg");
		
		Rdm05 = newImage("/images/random/header/contact/contact-1.jpg");
		Rdm06 = newImage("/images/random/header/contact/contact-2.jpg");
		Rdm07 = newImage("/images/random/header/contact/contact-3.jpg");
		Rdm08 = newImage("/images/random/header/contact/contact-4.jpg");
		
		Rdm09 = newImage("/images/random/header/dental/dental-1.jpg");
		Rdm10 = newImage("/images/random/header/dental/dental-2.jpg");
		Rdm11 = newImage("/images/random/header/dental/dental-3.jpg");
		Rdm12 = newImage("/images/random/header/dental/dental-4.jpg");
		
		Rdm13 = newImage("/images/random/header/home/home-1.jpg");
		Rdm14 = newImage("/images/random/header/home/home-2.jpg");
		Rdm15 = newImage("/images/random/header/home/home-3.jpg");
		Rdm16 = newImage("/images/random/header/home/home-4.jpg");
		
		Rdm17 = newImage("/images/random/header/short-term/short-term-header.jpg");
		Rdm18 = newImage("/images/random/header/short-term/short-term-header-2.jpg");
		Rdm19 = newImage("/images/random/header/short-term/short-term-header-3.jpg");
		Rdm20 = newImage("/images/random/header/short-term/short-term-header-4.jpg");


		preloadFlag = true;
	}
}

var winLegal = null;
function goPrivacy() {
	var windowWidth = 500;
	var windowHeight = 500;
	var locX = (screen.width - windowWidth) / 2;
	var locY = (screen.height - windowHeight) / 2;
	var windowFeatures = 'width='+ windowWidth
										 + ',height=' + windowHeight
										 + ',screenX=' + locX
										 + ',screenY=' + locY
										 + ',left=' + locX
										 + ',top=' + locY
										 + ',scrollbars=1';
	
	if ((winLegal != null) && !winLegal.closed) {
		winLegal.close();
	};
	
	winLegal = open('privacy.aspx', 'winLegal', windowFeatures);
	winLegal.focus();
}

function goNotices() {
	var windowWidth = 500;
	var windowHeight = 500;
	var locX = (screen.width - windowWidth) / 2;
	var locY = (screen.height - windowHeight) / 2;
	var windowFeatures = 'width='+ windowWidth
										 + ',height=' + windowHeight
										 + ',screenX=' + locX
										 + ',screenY=' + locY
										 + ',left=' + locX
										 + ',top=' + locY
										 + ',scrollbars=1';
	
	if ((winLegal != null) && !winLegal.closed) {
		winLegal.close();
	};
	
	winLegal = open('notices.aspx', 'winLegal', windowFeatures);
	winLegal.focus();
}

var winRates = null;
function goPlans() {
	var windowWidth = 725;
	var windowHeight = 500;
	var locX = (screen.width - windowWidth) / 2;
	var locY = (screen.height - windowHeight) / 2;
	var windowFeatures = 'width='+ windowWidth
										 + ',height=' + windowHeight
										 + ',screenX=' + locX
										 + ',screenY=' + locY
										 + ',left=' + locX
										 + ',top=' + locY
										 + ',scrollbars=1';
	
	if ((winRates != null) && !winRates.closed) {
		winRates.close();
	};
	
	winRates = open('compare-plans.aspx', 'winRates', windowFeatures);
	winRates.focus();
}

function Move(evt) {
	var e = evt ? evt : event;
	
	curX = (screenLeft + e.x);
	curY = (screenTop + e.y);
}

function htmlEncode(s) {
	var str = new String(s);
	str = str.replace(/&/g, "&amp;");
	str = str.replace(/</g, "&lt;");
	str = str.replace(/>/g, "&gt;");
	str = str.replace(/"/g, "&quot;");

	return str;
}

function ToggleDisplay(id) {
	var elem = document.getElementById(id);
	if (elem) {
		if (elem.style.display != 'block') {
			elem.style.display = 'block';
			elem.style.visibility = 'visible';
		} else {
			elem.style.display = 'none';
			elem.style.visibility = 'hidden';
		}
	}
}
function ShowDisplay(id) {
	var elem = document.getElementById(id);
	if (elem) {
		elem.style.display = 'block';
		elem.style.visibility = 'visible';
	}
}
function HideDisplay(id) {
	var elem = document.getElementById(id);
	if (elem) {
		elem.style.display = 'none';
		elem.style.visibility = 'hidden';
	}
}
// -->