// Javascripts for FKA

//Image Rollover Script
if (document.images) {
	//On "mouse-over" images
	disabilityinsurance_on = new Image(); 
	disabilityinsurance_on.src ="images/disabilityinsurance_on.gif";
	lifeinsurance_on = new Image(); 
	lifeinsurance_on.src ="images/lifeinsurance_on.gif";
	generalinformation_on = new Image(); 
	generalinformation_on.src ="images/generalinformation_on.gif";
	ltcinsurance_on = new Image(); 
	ltcinsurance_on.src ="images/ltcinsurance_on.gif";
	homeheader_on = new Image();
	homeheader_on.src = "images/homeheader_on.gif";
	quoteheader_on = new Image();
	quoteheader_on.src = "images/quoteheader_on.gif";
	policysortheader_on = new Image();
	policysortheader_on.src = "images/policysortheader_on.gif";
	proposalviewheader_on = new Image();
	proposalviewheader_on.src = "images/proposalviewheader_on.gif";
	registerheader_on = new Image(); 
	registerheader_on.src ="images/registerheader_on.gif";
	formsheader_on = new Image();
	formsheader_on.src = "images/formsheader_on.gif";
	contactusheader_on = new Image(); 
	contactusheader_on.src ="images/contactusheader_on.gif";
	policyactive_on = new Image(); 
	policyactive_on.src ="images/policyactive_on.gif";
	policyedit_on = new Image(); 
	policyedit_on.src ="images/policyedit_on.gif";
	policyadd_on = new Image(); 
	policyadd_on.src ="images/policyadd_on.gif";
	proposaledit_on = new Image(); 
	proposaledit_on.src ="images/proposaledit_on.gif";
	proposaladd_on = new Image(); 
	proposaladd_on.src ="images/proposaladd_on.gif";
	agentedit_on = new Image(); 
	agentedit_on.src ="images/agentedit_on.gif";
	agentadd_on = new Image(); 
	agentadd_on.src ="images/agentadd_on.gif";
	downloadsadmin_on = new Image(); 
	downloadsadmin_on.src ="images/downloadsadmin_on.gif";
	sitemetrics_on = new Image(); 
	sitemetrics_on.src ="images/sitemetrics_on.gif";
	agentmail_on = new Image(); 
	agentmail_on.src ="images/agentmail_on.gif";
	requirementsnotsent_on = new Image(); 
	requirementsnotsent_on.src ="images/requirementsnotsent_on.gif";
	requirementsoverdue_on = new Image(); 
	requirementsoverdue_on.src ="images/requirementsoverdue_on.gif";
	averagetime_on = new Image(); 
	averagetime_on.src ="images/averagetime_on.gif";
	massmailpending_on = new Image(); 
	massmailpending_on.src ="images/massmailpending_on.gif";
	massmailissued_on = new Image(); 
	massmailissued_on.src ="images/massmailissued_on.gif";
	productiongroup_on = new Image(); 
	productiongroup_on.src ="images/productiongroup_on.gif";
	four12iplans_on = new Image(); 
	four12iplans_on.src ="images/bullet_on.gif";
	adobequestion_on = new Image(); 
	adobequestion_on.src ="images/adobequestion_on.gif";
	autoforward_on = new Image(); 
	autoforward_on.src ="images/autoforward_on.gif";
	proposalsoverdue_on = new Image(); 
	proposalsoverdue_on.src ="images/proposalsoverdue_on.gif";
	issuedmail_on = new Image(); 
	issuedmail_on.src ="images/issuedmail_on.gif";
	policyeditbase_on = new Image(); 
	policyeditbase_on.src ="images/policyeditbase_on.gif";
	policyeditreq_on = new Image(); 
	policyeditreq_on.src ="images/policyeditreq_on.gif";
	policyeditagent_on = new Image(); 
	policyeditagent_on.src ="images/policyeditagent_on.gif";
	unitlist_on = new Image(); 
	unitlist_on.src ="images/unitlist_on.gif";
	diuw01_on = new Image(); 
	diuw01_on.src ="images/diuw01_on.gif";
	diuw02_on = new Image(); 
	diuw02_on.src ="images/diuw02_on.gif";
	diuw03_on = new Image(); 
	diuw03_on.src ="images/diuw03_on.gif";
	diuw04_on = new Image(); 
	diuw04_on.src ="images/diuw04_on.gif";
	diuw05_on = new Image(); 
	diuw05_on.src ="images/diuw05_on.gif";
	diuw06_on = new Image(); 
	diuw06_on.src ="images/diuw06_on.gif";
	diuw07_on = new Image(); 
	diuw07_on.src ="images/diuw07_on.gif";
	diuw08_on = new Image(); 
	diuw08_on.src ="images/diuw08_on.gif";
	diuw09_on = new Image(); 
	diuw09_on.src ="images/diuw09_on.gif";
	gotolife_on = new Image(); 
	gotolife_on.src ="images/gotolife_on.gif";
	gotodi_on = new Image(); 
	gotodi_on.src ="images/gotodi_on.gif";
	gotoltc_on = new Image(); 
	gotoltc_on.src ="images/gotoltc_on.gif";
	diquoterequesta_on = new Image(); 
	diquoterequesta_on.src ="images/diquoterequesta_on.gif";
	diquoterequestb_on = new Image(); 
	diquoterequestb_on.src ="images/diquoterequestb_on.gif";
	diquoterequestc_on = new Image(); 
	diquoterequestc_on.src ="images/diquoterequestc_on.gif";
	diquoterequestd_on = new Image(); 
	diquoterequestd_on.src ="images/diquoterequestd_on.gif";
	diquoterequeste_on = new Image(); 
	diquoterequeste_on.src ="images/diquoterequeste_on.gif";
	diquoterequestf_on = new Image(); 
	diquoterequestf_on.src ="images/diquoterequestf_on.gif";
	diquoterequestg_on = new Image(); 
	diquoterequestg_on.src ="images/diquoterequestg_on.gif";
	diquoterequesth_on = new Image(); 
	diquoterequesth_on.src ="images/diquoterequesth_on.gif";
	lifequoterequesta_on = new Image(); 
	lifequoterequesta_on.src ="images/lifequoterequesta_on.gif";
	lifequoterequesta3a_on = new Image(); 
	lifequoterequesta3a_on.src ="images/lifequoterequesta3a_on.gif";
	lifequoterequesta3b_on = new Image();
	lifequoterequesta3b_on.src ="images/lifequoterequesta3b_on.gif";
	lifequoterequesta3c_on = new Image(); 
	lifequoterequesta3c_on.src ="images/lifequoterequesta3c_on.gif";
	lifequoterequesta3d_on = new Image(); 
	lifequoterequesta3d_on.src ="images/lifequoterequesta3d_on.gif";
	lifequoterequestb_on = new Image(); 
	lifequoterequestb_on.src ="images/lifequoterequestb_on.gif";
	lifequoterequestb3a_on = new Image(); 
	lifequoterequestb3a_on.src ="images/lifequoterequesta3b_on.gif";
	lifequoterequestb3b_on = new Image(); 
	lifequoterequestb3b_on.src ="images/lifequoterequesta3c_on.gif";
	continueguidedtour_on = new Image();
	continueguidedtour_on.src ="images/continueguidedtour_on.gif";
	reqdiquote_on = new Image(); 
	reqdiquote_on.src ="images/reqdiquote_on.gif";
	reqlifequote_on = new Image(); 
	reqlifequote_on.src ="images/reqlifequote_on.gif";
	reqltcquote_on = new Image(); 
	reqltcquote_on.src ="images/reqltcquote_on.gif";

	// Off "default" images
	disabilityinsurance_off = new Image(); 
	disabilityinsurance_off.src ="images/disabilityinsurance_off.gif";
	lifeinsurance_off = new Image(); 
	lifeinsurance_off.src ="images/lifeinsurance_off.gif";
	ltcinsurance_off = new Image(); 
	ltcinsurance_off.src ="images/ltcinsurance_off.gif";
	generalinformation_off = new Image(); 
	generalinformation_off.src ="images/generalinformation_off.gif";
	homeheader_off = new Image();
	homeheader_off.src = "images/homeheader_off.gif";
	quoteheader_off = new Image();
	quoteheader_off.src = "images/quoteheader_off.gif";
	policysortheader_off = new Image();
	policysortheader_off.src = "images/policysortheader_off.gif";
	proposalviewheader_off = new Image();
	proposalviewheader_off.src = "images/proposalviewheader_off.gif";
	registerheader_off = new Image(); 
	registerheader_off.src ="images/registerheader_off.gif";
	formsheader_off = new Image();
	formsheader_off.src = "images/formsheader_off.gif";
	contactusheader_off = new Image(); 
	contactusheader_off.src ="images/contactusheader_off.gif";
	policyactive_off = new Image(); 
	policyactive_off.src ="images/policyactive_off.gif";
	policyedit_off = new Image(); 
	policyedit_off.src ="images/policyedit_off.gif";
	policyadd_off = new Image(); 
	policyadd_off.src ="images/policyadd_off.gif";
	proposaledit_off = new Image(); 
	proposaledit_off.src ="images/proposaledit_off.gif";
	proposaladd_off = new Image(); 
	proposaladd_off.src ="images/proposaladd_off.gif";
	agentedit_off = new Image(); 
	agentedit_off.src ="images/agentedit_off.gif";
	agentadd_off = new Image(); 
	agentadd_off.src ="images/agentadd_off.gif";
	downloadsadmin_off = new Image(); 
	downloadsadmin_off.src ="images/downloadsadmin_off.gif";
	sitemetrics_off = new Image(); 
	sitemetrics_off.src ="images/sitemetrics_off.gif";
	agentmail_off = new Image(); 
	agentmail_off.src ="images/agentmail_off.gif";
	requirementsnotsent_off = new Image(); 
	requirementsnotsent_off.src ="images/requirementsnotsent_off.gif";
	requirementsoverdue_off = new Image(); 
	requirementsoverdue_off.src ="images/requirementsoverdue_off.gif";
	averagetime_off = new Image(); 
	averagetime_off.src ="images/averagetime_off.gif";
	massmailpending_off = new Image(); 
	massmailpending_off.src ="images/massmailpending_off.gif";
	massmailissued_off = new Image(); 
	massmailissued_off.src ="images/massmailissued_off.gif";
	productiongroup_off = new Image(); 
	productiongroup_off.src ="images/productiongroup_off.gif";
	four12iplans_off = new Image(); 
	four12iplans_off.src ="images/bullet_off.gif";
	adobequestion_off = new Image(); 
	adobequestion_off.src ="images/adobequestion_off.gif";
	autoforward_off = new Image(); 
	autoforward_off.src ="images/autoforward_off.gif";
	proposalsoverdue_off = new Image(); 
	proposalsoverdue_off.src ="images/proposalsoverdue_off.gif";
	issuedmail_off = new Image(); 
	issuedmail_off.src ="images/issuedmail_off.gif";
	policyeditbase_off = new Image(); 
	policyeditbase_off.src ="images/policyeditbase_off.gif";
	policyeditreq_off = new Image(); 
	policyeditreq_off.src ="images/policyeditreq_off.gif";
	policyeditagent_off = new Image(); 
	policyeditagent_off.src ="images/policyeditagent_off.gif";
	unitlist_off = new Image(); 
	unitlist_off.src ="images/unitlist_off.gif";
	diuw01_off = new Image(); 
	diuw01_off.src ="images/diuw01_off.gif";
	diuw02_off = new Image(); 
	diuw02_off.src ="images/diuw02_off.gif";
	diuw03_off = new Image(); 
	diuw03_off.src ="images/diuw03_off.gif";
	diuw04_off = new Image(); 
	diuw04_off.src ="images/diuw04_off.gif";
	diuw05_off = new Image(); 
	diuw05_off.src ="images/diuw05_off.gif";
	diuw06_off = new Image(); 
	diuw06_off.src ="images/diuw06_off.gif";
	diuw07_off = new Image(); 
	diuw07_off.src ="images/diuw07_off.gif";
	diuw08_off = new Image(); 
	diuw08_off.src ="images/diuw08_off.gif";
	diuw09_off = new Image(); 
	diuw09_off.src ="images/diuw09_off.gif";
	gotolife_off = new Image(); 
	gotolife_off.src ="images/gotolife_off.gif";
	gotodi_off = new Image(); 
	gotodi_off.src ="images/gotodi_off.gif";
	gotoltc_off = new Image(); 
	gotoltc_off.src ="images/gotoltc_off.gif";
	diquoterequesta_off = new Image(); 
	diquoterequesta_off.src ="images/diquoterequesta_off.gif";
	diquoterequestb_off = new Image(); 
	diquoterequestb_off.src ="images/diquoterequestb_off.gif";
	diquoterequestc_off = new Image(); 
	diquoterequestc_off.src ="images/diquoterequestc_off.gif";
	diquoterequestd_off = new Image(); 
	diquoterequestd_off.src ="images/diquoterequestd_off.gif";
	diquoterequeste_off = new Image(); 
	diquoterequeste_off.src ="images/diquoterequeste_off.gif";
	diquoterequestf_off = new Image(); 
	diquoterequestf_off.src ="images/diquoterequestf_off.gif";
	diquoterequestg_off = new Image(); 
	diquoterequestg_off.src ="images/diquoterequestg_off.gif";
	diquoterequesth_off = new Image(); 
	diquoterequesth_off.src ="images/diquoterequesth_off.gif";
	lifequoterequesta_off = new Image(); 
	lifequoterequesta_off.src ="images/lifequoterequesta_off.gif";
	lifequoterequesta3a_off = new Image(); 
	lifequoterequesta3a_off.src ="images/lifequoterequesta3a_off.gif";
	lifequoterequesta3b_off = new Image(); 
	lifequoterequesta3b_off.src ="images/lifequoterequesta3b_off.gif";
	lifequoterequesta3c_off = new Image(); 
	lifequoterequesta3c_off.src ="images/lifequoterequesta3c_off.gif";
	lifequoterequesta3d_off = new Image(); 
	lifequoterequesta3d_off.src ="images/lifequoterequesta3d_off.gif";
	lifequoterequestb_off = new Image(); 
	lifequoterequestb_off.src ="images/lifequoterequestb_off.gif";
	lifequoterequestb3a_off = new Image(); 
	lifequoterequestb3a_off.src ="images/lifequoterequesta3b_off.gif";
	lifequoterequestb3b_off = new Image(); 
	lifequoterequestb3b_off.src ="images/lifequoterequesta3c_off.gif";
	continueguidedtour_off = new Image(); 
	continueguidedtour_off.src ="images/continueguidedtour_off.gif";
	reqdiquote_off = new Image(); 
	reqdiquote_off.src ="images/reqdiquote_off.gif";
	reqlifequote_off = new Image(); 
	reqlifequote_off.src ="images/reqlifequote_off.gif";
	reqltcquote_off = new Image(); 
	reqltcquote_off.src ="images/reqltcquote_off.gif";
}

// Function to 'activate' images.
function imgOn(imgName) {
   if (document.images) {
	  document[imgName].src = eval(imgName + "_on.src");
   }
}

// Function to 'deactivate' images.
function imgOff(imgName) {
   if (document.images) {
	  document[imgName].src = eval(imgName + "_off.src");
   }
}

<!-- http://www.shiningstar.net -->
<!-- Begin
function checkNumeric(objName,minval, maxval,comma,period,hyphen)
{
	var numberfield = objName;
	if (chkNumeric(objName,minval,maxval,comma,period,hyphen) == false){
		numberfield.select();
		numberfield.focus();
		return false;
	}
	else	{
		return true;
	}
}

function chkNumeric(objName,minval,maxval,comma,period,hyphen) {
	// only allow 0-9 be entered, plus any values passed
	// (can be in any order, and don't have to be comma, period, or hyphen)
	// if all numbers allow commas, periods, hyphens or whatever,
	// just hard code it here and take out the passed parameters
	var checkOK = "0123456789." + comma + period + hyphen;
	var checkStr = objName;
	var allValid = true;
	var decPoints = 0;
	var allNum = "";

	for (i = 0;  i < checkStr.value.length;  i++)
	{
		ch = checkStr.value.charAt(i);
		for (j = 0;  j < checkOK.length;  j++) {
			if (ch == checkOK.charAt(j)) {
				break;
			}
		}
		if (j == checkOK.length) {
			allValid = false;
			break;
		}
		if (ch != ",") {
			allNum += ch;
		}
	}

	if (!allValid)
	{	
		alertsay = "Please enter only these values \""
		alertsay = alertsay + checkOK + "\" in the Sort field."
		alert(alertsay);
		return (false);
	}

	// set the minimum and maximum
	var chkVal = allNum;
	var prsVal = parseInt(allNum);
	if (chkVal != "" && !(prsVal >= minval && prsVal <= maxval)) {
		alertsay = "Please enter a value greater than or "
		alertsay = alertsay + "equal to \"" + minval + "\" and less than or "
		alertsay = alertsay + "equal to \"" + maxval + "\" in the \"" + checkStr.name + "\" field."
		alert(alertsay);
		return (false);
	}
}
//  End -->

// Validate Radio/Checkbox Functionality
function checkChoice(field, i) {
	if (i == 0) { 
		if (field[0].checked == true) {
			for (i = 1; i < field.length; i++) {
				field[i].checked = false;
			}
		} else {
			field[1].checked = true;
			field[0].checked = false; 
		}
	} else  {  
		if (field[i].checked == true) {
			field[0].checked = false;
		}
	}
}

// Function to "Check All/None" checkboxes in a list/table
function check(field) {
	var checkflag = "false";
	
	if (checkflag == "false") {
		for (i = 0; i < field.length; i++) {
			field[i].checked = true;
		}
		checkflag = "true";
		return "none"; 
	} else {
		for (i = 0; i < field.length; i++) {
		  field[i].checked = false; 
		}
		checkflag = "false";
		return "All"; }
	}
}
//  End -->

//Set Arrays for Dates / days, Months & Now
dayName = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
monName = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
now = new Date

// Setup Random Images
var img1 = "images/GSFrandom01.gif"
var img2 = "images/GSFrandom02.gif"
var img3 = "images/GSFrandom03.gif"
var img4 = "images/GSFrandom04.gif"
var img5 = "images/GSFrandom05.gif"
var img6 = "images/GSFrandom06.gif"
var img7 = "images/GSFrandom07.gif"
var img8 = "images/GSFrandom08.gif"
var img9 = "images/GSFrandom09.gif"
var img10 = "images/GSFrandom10.gif"

var randomize = Math.round(Math.random()*10)

if (randomize == 1){
newimg = img1
}else if (randomize == 2){
newimg = img2
}else if (randomize == 3){
newimg = img3
}else if (randomize == 4){
newimg = img4
}else if (randomize == 5){
newimg = img5
}else if (randomize == 6){
newimg = img6
}else if (randomize == 7){
newimg = img7
}else if (randomize == 8){
newimg = img8
}else if (randomize == 9){
newimg = img9
}else{
newimg = img10
}