/***********   LMA Javascript File   ***********/

<!------------- Preload Scripts ------------->
<!--
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = 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) {
		btn_geninfo_over = newImage("images/btn-general-on.gif");
		
		btn_diins_over = newImage("images/btn-disability-on.gif");
		btn_ltc_over = newImage("images/btn-ltc-on.gif");
		btn_life_over = newImage("images/btn-life-on.gif");
		btn_policy_over = newImage("images/btn-policy-on.gif");
		btn_home_over = newImage("images/btn-home-on.gif");
		adobebig_over = newImage("images/adobebig-over.jpg");
		preloadFlag = true;
	}
}
// -->
<!------------- End Preload Scripts ------------->

<!--------------- LMA Menu Scripts -------------->
var mmOpenContainer = null;
var mmOpenMenus = null;
var mmHideMenuTimer = null;

function LMA_menuStartTimeout(hideTimeout) {
	mmHideMenuTimer = setTimeout("LMA_menuHideMenus()", hideTimeout);	
}

function LMA_menuHideMenus() {
	LMA_menuResetTimeout();
	if(mmOpenContainer) {
		var c = document.getElementById(mmOpenContainer);
		c.style.visibility = "inherit";
		mmOpenContainer = null;
	}
	if( mmOpenMenus ) {
		for(var i in mmOpenMenus) {
			var m = document.getElementById(mmOpenMenus[i]);
			m.style.visibility = "hidden";			
		}
		mmOpenMenus = null;
	}
}

function LMA_menuHideSubmenus(menuName) {
	if( mmOpenMenus ) {
		var h = false;
		var c = 0;
		for(var i in mmOpenMenus) {
			if( h ) {
				var m = document.getElementById(mmOpenMenus[i]);
				m.style.visibility = "hidden";
			} else if( mmOpenMenus[i] == menuName ) {
				h = true;
			} else {
				c++;
			}
		}
		mmOpenMenus.length = c+1;
	}
}

function LMA_menuOverMenuItem(menuName, subMenuSuffix) {
	LMA_menuResetTimeout();
	LMA_menuHideSubmenus(menuName);
	if( subMenuSuffix ) {
		var subMenuName = "" + menuName + "_" + subMenuSuffix;
		LMA_menuShowSubMenu(subMenuName);
	}
}

function LMA_menuShowSubMenu(subMenuName) {
	LMA_menuResetTimeout();
	var e = document.getElementById(subMenuName);
	e.style.visibility = "inherit";
	if( !mmOpenMenus ) {
		mmOpenMenus = new Array;
	}
	mmOpenMenus[mmOpenMenus.length] = "" + subMenuName;
}

function LMA_menuResetTimeout() {
	if (mmHideMenuTimer) clearTimeout(mmHideMenuTimer);
	mmHideMenuTimer = null;
}

function LMA_menuShowMenu(containName, menuName, xOffset, yOffset, triggerName) {
	LMA_menuHideMenus();
	LMA_menuResetTimeout();
	LMA_menuShowMenuContainer(containName, xOffset, yOffset, triggerName);
	LMA_menuShowSubMenu(menuName);
}

function LMA_menuShowMenuContainer(containName, x, y, triggerName) {	
	var c = document.getElementById(containName);
	var s = c.style;
	s.visibility = "inherit";
	
	mmOpenContainer = "" + containName;
}
<!-------------- End Menu Scripts --------------->

<!------------- Check Numeric Input ------------->
<!-- http://www.shiningstar.net -->
<!-- 
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 Check Numeric ------------->


<!------------- Check Choice Script ------------->
<!-- 
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;
      }
   }
}
// -->
<!------------- End Check Choice ------------->


<!----------- GO TO URL FUNCTION ------------->
<!--
function goToURL(URL) { 
	window.location = URL;
}
// -->

<!-------- Description Popup Window ---------->
<!--
function description_window(url) {
	if(navigator.userAgent.indexOf("MSIE") == -1) {
      newwindow = window.open(url,'description','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=450,height=375');
      newwindow.focus();
    } else {
      window.open(url,'description','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=450,height=375');
    }
}
//-->
<!------ End Description Popup Window --------->

<!------------- IMAGE ROLLOVER SCRIPTS ------------->
<!--
if (document.images) {
	disabilityinsurance_on = new Image(); 
	disabilityinsurance_on.src ="images/disabilityinsurance_on.gif";
	lifeinsurance_on = new Image(); 
	lifeinsurance_on.src ="images/lifeinsurance_on.gif";
	ltcinsurance_on = new Image(); 
	ltcinsurance_on.src ="images/ltcinsurance_on.gif";
	generalinformation_on = new Image(); 
	generalinformation_on.src ="images/generalinformation_on.gif";
	policystatus_on = new Image(); 
	policystatus_on.src ="images/policystatus_on.gif";
	home_on = new Image(); 
	home_on.src ="images/home_on.gif";
	employeehome_on = new Image(); 
	employeehome_on.src ="images/bullet_on.gif";
	agenthome_on = new Image(); 
	agenthome_on.src ="images/bullet_on.gif";
	agentadd_on = new Image(); 
	agentadd_on.src ="images/bullet_on.gif";
	agentsort_on = new Image(); 
	agentsort_on.src ="images/bullet_on.gif";
	agentmail_on = new Image(); 
	agentmail_on.src ="images/bullet_on.gif";
	preferred_on = new Image(); 
	preferred_on.src ="images/bullet_on.gif";
	downloadsadmin_on = new Image(); 
	downloadsadmin_on.src ="images/bullet_on.gif";
	licensing_on = new Image(); 
	licensing_on.src ="images/bullet_on.gif";
	faq_on = new Image(); 
	faq_on.src ="images/bullet_on.gif";
	welcome_on = new Image(); 
	welcome_on.src ="images/bullet_on.gif";
	strength_on = new Image(); 
	strength_on.src ="images/bullet_on.gif";
	casehistory_on = new Image(); 
	casehistory_on.src ="images/bullet_on.gif";
	career_on = new Image(); 
	career_on.src ="images/bullet_on.gif";
	whatsnew_on = new Image(); 
	whatsnew_on.src ="images/bullet_on.gif";
	contactus_on = new Image(); 
	contactus_on.src ="images/bullet_on.gif";
	employeemail_on = new Image(); 
	employeemail_on.src ="images/bullet_on.gif";
	policyadd_on = new Image(); 
	policyadd_on.src ="images/bullet_on.gif";
	policysort_on = new Image(); 
	policysort_on.src ="images/bullet_on.gif";
	diquoterequest_on = new Image(); 
	diquoterequest_on.src ="images/bullet_on.gif";
	dipolicyservice_on = new Image(); 
	dipolicyservice_on.src ="images/bullet_on.gif";
	diuwrequirements_on = new Image(); 
	diuwrequirements_on.src ="images/bullet_on.gif";
	dicompetition_on = new Image(); 
	dicompetition_on.src ="images/bullet_on.gif";
	diproductlist_on = new Image(); 
	diproductlist_on.src ="images/bullet_on.gif";
	disupplies_on = new Image(); 
	disupplies_on.src ="images/bullet_on.gif";
	diforms_on = new Image(); 
	diforms_on.src ="images/bullet_on.gif";
	ltcquoterequest_on = new Image();
	ltcquoterequest_on.src ="images/bullet_on.gif";	
	ltcproductlist_on = new Image();
	ltcproductlist_on.src ="images/bullet_on.gif";
	ltcpolicyservice_on = new Image();
	ltcpolicyservice_on.src ="images/bullet_on.gif";
	ltcforms_on = new Image();
	ltcforms_on.src ="images/bullet_on.gif";
	lifequoterequest_on = new Image(); 
	lifequoterequest_on.src ="images/bullet_on.gif";
	lifepolicyservice_on = new Image(); 
	lifepolicyservice_on.src ="images/bullet_on.gif";
	lifeuwrequirements_on = new Image(); 
	lifeuwrequirements_on.src ="images/bullet_on.gif";
	lifemedical_on = new Image(); 
	lifemedical_on.src ="images/bullet_on.gif";
	lifeproductlist_on = new Image(); 
	lifeproductlist_on.src ="images/bullet_on.gif";
	lifesupplies_on = new Image(); 
	lifesupplies_on.src ="images/bullet_on.gif";
	lifeforms_on = new Image(); 
	lifeforms_on.src ="images/bullet_on.gif";
	faq1_on = new Image(); 
	faq1_on.src ="images/bullet2_on.gif";
	faq2_on = new Image(); 
	faq2_on.src ="images/bullet2_on.gif";
	faq3_on = new Image(); 
	faq3_on.src ="images/bullet2_on.gif";
	faq4_on = new Image(); 
	faq4_on.src ="images/bullet2_on.gif";
	faq5_on = new Image(); 
	faq5_on.src ="images/bullet2_on.gif";
	faq6_on = new Image(); 
	faq6_on.src ="images/bullet2_on.gif";
	faq7_on = new Image(); 
	faq7_on.src ="images/bullet2_on.gif";
	faq8_on = new Image(); 
	faq8_on.src ="images/bullet2_on.gif";			
	faq9_on = new Image(); 
	faq9_on.src ="images/bullet2_on.gif";
	faq10_on = new Image(); 
	faq10_on.src ="images/bullet2_on.gif";
	faq11_on = new Image(); 
	faq11_on.src ="images/bullet2_on.gif";
	faq12_on = new Image(); 
	faq12_on.src ="images/bullet2_on.gif";
	faq13_on = new Image(); 
	faq13_on.src ="images/bullet2_on.gif";			
	faq14_on = new Image(); 
	faq14_on.src ="images/bullet2_on.gif";
	faq15_on = new Image(); 
	faq15_on.src ="images/bullet2_on.gif";
	faq16_on = new Image(); 
	faq16_on.src ="images/bullet2_on.gif";
	adobe_on = new Image(); 
	adobe_on.src ="images/bullet2_on.gif";
	adobequestion_on = new Image(); 
	adobequestion_on.src ="images/adobequestion_on.gif";
	lifequoterequesta_on = new Image(); 
	lifequoterequesta_on.src ="images/lifequoterequesta_on.gif";
	lifequoterequestb_on = new Image(); 
	lifequoterequestb_on.src ="images/lifequoterequestb_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";
	visitors_on = new Image(); 
	visitors_on.src ="images/visitors_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";
	lifequoterequestb3a_on = new Image(); 
	lifequoterequestb3a_on.src ="images/lifequoterequesta3b_on.gif";
	lifequoterequestb3b_on = new Image(); 
	lifequoterequestb3b_on.src ="images/lifequoterequesta3c_on.gif";

	lifequoterequestb3a_off = new Image(); 
	lifequoterequestb3a_off.src ="images/lifequoterequesta3b_off.gif";
	lifequoterequestb3b_off = new Image(); 
	lifequoterequestb3b_off.src ="images/lifequoterequesta3c_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";
	visitors_off = new Image(); 
	visitors_off.src ="images/visitors_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";
	lifequoterequesta_off = new Image(); 
	lifequoterequesta_off.src ="images/lifequoterequesta_off.gif";
	lifequoterequestb_off = new Image(); 
	lifequoterequestb_off.src ="images/lifequoterequestb_off.gif";
	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";
	policystatus_off = new Image(); 
	policystatus_off.src ="images/policystatus_off.gif";
	home_off = new Image(); 
	home_off.src ="images/home_off.gif";
	employeehome_off = new Image(); 
	employeehome_off.src ="images/bullet_off.gif";
	agenthome_off = new Image(); 
	agenthome_off.src ="images/bullet_off.gif";
	agentadd_off = new Image(); 
	agentadd_off.src ="images/bullet_off.gif";
	agentsort_off = new Image(); 
	agentsort_off.src ="images/bullet_off.gif";
	agentmail_off = new Image(); 
	agentmail_off.src ="images/bullet_off.gif";
	preferred_off = new Image(); 
	preferred_off.src ="images/bullet_off.gif";
	downloadsadmin_off = new Image(); 
	downloadsadmin_off.src ="images/bullet_off.gif";
	licensing_off = new Image(); 
	licensing_off.src ="images/bullet_off.gif";
	faq_off = new Image(); 
	faq_off.src ="images/bullet_off.gif";
	welcome_off = new Image(); 
	welcome_off.src ="images/bullet_off.gif";
	strength_off = new Image(); 
	strength_off.src ="images/bullet_off.gif";
	casehistory_off = new Image(); 
	casehistory_off.src ="images/bullet_off.gif";
	career_off = new Image(); 
	career_off.src ="images/bullet_off.gif";
	whatsnew_off = new Image(); 
	whatsnew_off.src ="images/bullet_off.gif";
	contactus_off = new Image(); 
	contactus_off.src ="images/bullet_off.gif";
	employeemail_off = new Image(); 
	employeemail_off.src ="images/bullet_off.gif";
	policyadd_off = new Image(); 
	policyadd_off.src ="images/bullet_off.gif";
	policysort_off = new Image(); 
	policysort_off.src ="images/bullet_off.gif";
	diquoterequest_off = new Image(); 
	diquoterequest_off.src ="images/bullet_off.gif";
	dipolicyservice_off = new Image(); 
	dipolicyservice_off.src ="images/bullet_off.gif";
	diuwrequirements_off = new Image(); 
	diuwrequirements_off.src ="images/bullet_off.gif";
	dicompetition_off = new Image(); 
	dicompetition_off.src ="images/bullet_off.gif";
	diproductlist_off = new Image(); 
	diproductlist_off.src ="images/bullet_off.gif";
	disupplies_off = new Image(); 
	disupplies_off.src ="images/bullet_off.gif";
	diforms_off = new Image(); 
	diforms_off.src ="images/bullet_off.gif";
	ltcquoterequest_off = new Image();
	ltcquoterequest_off.src  ="images/bullet_off.gif";
	ltcproductlist_off = new Image();
	ltcproductlist_off.src  ="images/bullet_off.gif";
	ltcpolicyservice_off = new Image();
	ltcpolicyservice_off.src ="images/bullet_off.gif";
	ltcforms_off = new Image();
	ltcforms_off.src ="images/bullet_off.gif";
	lifequoterequest_off = new Image(); 
	lifequoterequest_off.src ="images/bullet_off.gif";
	lifepolicyservice_off = new Image(); 
	lifepolicyservice_off.src ="images/bullet_off.gif";
	lifeuwrequirements_off = new Image(); 
	lifeuwrequirements_off.src ="images/bullet_off.gif";
	lifemedical_off = new Image(); 
	lifemedical_off.src ="images/bullet_off.gif";
	lifeproductlist_off = new Image(); 
	lifeproductlist_off.src ="images/bullet_off.gif";
	lifeforms_off = new Image(); 
	lifeforms_off.src ="images/bullet_off.gif";
	faq1_off = new Image(); 
	faq1_off.src ="images/bullet2_off.gif";
	faq2_off = new Image(); 
	faq2_off.src ="images/bullet2_off.gif";
	faq3_off = new Image(); 
	faq3_off.src ="images/bullet2_off.gif";
	faq4_off = new Image(); 
	faq4_off.src ="images/bullet2_off.gif";
	faq5_off = new Image(); 
	faq5_off.src ="images/bullet2_off.gif";
	faq6_off = new Image(); 
	faq6_off.src ="images/bullet2_off.gif";
	faq7_off = new Image(); 
	faq7_off.src ="images/bullet2_off.gif";
	faq8_off = new Image(); 
	faq8_off.src ="images/bullet2_off.gif";			
	faq9_off = new Image(); 
	faq9_off.src ="images/bullet2_off.gif";
	faq10_off = new Image(); 
	faq10_off.src ="images/bullet2_off.gif";
	faq11_off = new Image(); 
	faq11_off.src ="images/bullet2_off.gif";
	faq12_off = new Image(); 
	faq12_off.src ="images/bullet2_off.gif";
	faq13_off = new Image(); 
	faq13_off.src ="images/bullet2_off.gif";			
	faq14_off = new Image(); 
	faq14_off.src ="images/bullet2_off.gif";
	faq15_off = new Image(); 
	faq15_off.src ="images/bullet2_off.gif";
	faq16_off = new Image(); 
	faq16_off.src ="images/bullet2_off.gif";
	adobe_off = new Image(); 
	adobe_off.src ="images/bullet2_off.gif";
	adobequestion_off = new Image(); 
	adobequestion_off.src ="images/adobequestion_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");
        }
}
// -->

<!--
function openLBS() {
window.open('http://livingbalancesheet.com/client/Lucido-Morris_Web/Clients_Series6_webHi.htm','newWin','toolbar=no,scrollbars=no,width=1010,height=640')
}
//  End -->
<!------------- End Rollover Script ------------->