//	Browser sniffer. Script will only be enabled in compliant browsers. Also used for sizing form fields.													

var isMac = (navigator.userAgent.indexOf("Macintosh") != -1);
var isWin = (navigator.userAgent.indexOf("Windows 95") != -1 || navigator.userAgent.indexOf("Windows NT") != -1);
var isNS =  (navigator.appName == "Netscape");
var isIE =  (navigator.userAgent.indexOf("MSIE") != -1);
var ieWin = (navigator.userAgent.indexOf("MSIE") != -1 && (navigator.userAgent.indexOf("Windows 95") != -1 || navigator.userAgent.indexOf("Windows NT") != -1));
var toolBarLoc = "";

browser = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )))
			
//	Event handling functions									

function mouseOver (buttonName) {
	if ( (browser) && (buttonName!=active) ) {
		document[buttonName].src=eval(buttonName+"_on.src");
	}       
}

function mouseOut (buttonName) {
	if ( (browser) && (buttonName!=active) && ((prodPage!="on") ? true : buttonName!="seven") ) {
		document[buttonName].src=eval(buttonName+"_off.src");
	} 
}

function mouseClick (buttonName) {
	active=buttonName;
	activeTop=buttonName;
	if (browser) {
		document[buttonName].src=eval(buttonName+"_active.src");
	}
}

/*function turnOn (but) {
	if (browser) {
		prodPage = "seven";
		alert(seven_active.src);
		document[prodPage].src=eval("seven_active.src");
		
	
	}
}*/

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	//alert('test');
	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) {
		SemReserv_over = newImage("images/SemReserv_over.jpg");
		contact_over = newImage("images/contact_over.jpg");
		clickbtn_contactus_on = newImage("images/clickbtn_contactus_on.gif");
		clickbtn_seminarreservations_on = newImage("images/clickbtn_seminarreservations_on.gif");
		preloadFlag = true;
	}
}	

// this goes in the body tag for onLoad
function pageLoad ( ) {
	preloadImages();
	if (browser) {
		if (active!= "") {
			document[active].src=eval(active+"_active.src");
		}
		if (prodPage=="on") {
			var pPage = "seven";
			document[pPage].src=eval("seven_active.src");
		
		}
	}
	
	//init();
}

/*
var menu;
	var theTop = 830;
	var old = theTop;		

*/
			
			
			
			function init() {
			menu = new getObj('cta_menu');
			//alert('second');
			movemenu();
			}
			
			function movemenu()	{
				
				if (window.innerHeight)
				{
					pos = window.pageYOffset
				}
				else if (document.documentElement && document.documentElement.scrollTop)
				{
					pos = document.documentElement.scrollTop
				}
				else if (document.body)
				{
					pos = document.body.scrollTop
				}
				if (pos < theTop) pos = theTop;
				else pos += 30;
				if (pos == old)
				{
					menu.style.top = pos;
				}
				old = pos;
				temp = setTimeout('movemenu()',100);
				//movemenu();
			}

		function getObj(name){
			if (document.getElementById)
			{
  				this.obj = document.getElementById(name);
				this.style = document.getElementById(name).style;
			}
			else if (document.all)
			{
				this.obj = document.all[name];
				this.style = document.all[name].style;
			}
			else if (document.layers)
			{
   				this.obj = document.layers[name];
   				this.style = document.layers[name];
			}
		}


// preload the rollover images

one_on = new Image; one_on.src="images/home_on.gif";
 one_off = new Image; one_off.src="images/home.gif";
 one_active = new Image; one_active.src="images/home_on.gif";

two_on = new Image; two_on.src="images/AboutUs_on.gif";
 two_off = new Image; two_off.src="images/AboutUs.gif";
 two_active = new Image; two_active.src="images/AboutUs_on.gif";

three_on = new Image; three_on.src="images/contactus_on.gif";
 three_off = new Image; three_off.src="images/contactus.gif";
 three_active = new Image; three_active.src="images/contactus_on.gif";

four_on = new Image; four_on.src="images/locations_on.gif";
 four_off = new Image; four_off.src="images/locations.gif";
 four_active = new Image; four_active.src="images/locations_on.gif";

five_on = new Image; five_on.src="images/upcomingevents_on.gif";
 five_off = new Image; five_off.src="images/upcomingevents.gif";
 five_active = new Image; five_active.src="images/upcomingevents_on.gif";

six_on = new Image; six_on.src="images/investmentseminars_on.gif";
 six_off = new Image; six_off.src="images/investmentseminars.gif";
 six_active = new Image; six_active.src="images/investmentseminars_on.gif";

seven_on = new Image; seven_on.src="images/products&services_on.gif";
 seven_off = new Image; seven_off.src="images/products&services.gif";
 seven_active = new Image; seven_active.src="images/products&services_on.gif";

eight_on = new Image; eight_on.src="images/realestateinvestmenttrusts_on.gif";
 eight_off = new Image; eight_off.src="images/realestateinvestmenttrusts.gif";
 eight_active = new Image; eight_active.src="images/realestateinvestmenttrusts_on.gif";

nine_on = new Image; nine_on.src="images/municipalbonds_on.gif";
 nine_off = new Image; nine_off.src="images/municipalbonds.gif";
 nine_active = new Image; nine_active.src="images/municipalbonds_on.gif";

ten_on = new Image; ten_on.src="images/strippedmunicipalbonds_on.gif";
 ten_off = new Image; ten_off.src="images/strippedmunicipalbonds.gif";
 ten_active = new Image; ten_active.src="images/strippedmunicipalbonds_on.gif";

eleven_on = new Image; eleven_on.src="images/zerocouponbonds_on.gif";
 eleven_off = new Image; eleven_off.src="images/zerocouponbonds.gif";
 eleven_active = new Image; eleven_active.src="images/zerocouponbonds_on.gif";

twelve_on = new Image; twelve_on.src="images/cmo_on.gif";
 twelve_off = new Image; twelve_off.src="images/cmo.gif";
 twelve_active = new Image; twelve_active.src="images/cmo_on.gif";

thirteen_on = new Image; thirteen_on.src="images/mutualfunds_on.gif";
 thirteen_off = new Image; thirteen_off.src="images/mutualfunds.gif";
 thirteen_active = new Image; thirteen_active.src="images/mutualfunds_on.gif";

fourteen_on = new Image; fourteen_on.src="images/annuities_on.gif";
 fourteen_off = new Image; fourteen_off.src="images/annuities.gif";
 fourteen_active = new Image; fourteen_active.src="images/annuities_on.gif";

fifteen_on = new Image; fifteen_on.src="images/retirementplans_on.gif";
 fifteen_off = new Image; fifteen_off.src="images/retirementplans.gif";
 fifteen_active = new Image; fifteen_active.src="images/retirementplans_on.gif";

sixteen_on = new Image; sixteen_on.src="images/lifeinsurance_on.gif";
 sixteen_off = new Image; sixteen_off.src="images/lifeinsurance.gif";
 sixteen_active = new Image; sixteen_active.src="images/lifeinsurance_on.gif";

seventeen_on = new Image; seventeen_on.src="images/municipalbonds_on.gif";
 seventeen_off = new Image; seventeen_off.src="images/municipalbonds.gif";
 seventeen_active = new Image; seventeen_active.src="images/municipalbonds.gif";

eighteen_on = new Image; eighteen_on.src="images/EstatePlanning_on.gif";
 eighteen_off = new Image; eighteen_off.src="images/EstatePlanning.gif";
 eighteen_active = new Image; eighteen_active.src="images/EstatePlanning_on.gif";

nineteen_on = new Image; nineteen_on.src="images/financialcalculators_on.gif";
 nineteen_off = new Image; nineteen_off.src="images/financialcalculators.gif";
 nineteen_active = new Image; nineteen_active.src="images/financialcalculators_on.gif";

twenty_on = new Image; twenty_on.src="images/look&listen_on.gif";
 twenty_off = new Image; twenty_off.src="images/look&listen.gif";
 twenty_active = new Image; twenty_active.src="images/look&listen_on.gif";

twentyone_on = new Image; twentyone_on.src="images/sitemap_on.gif";
 twentyone_off = new Image; twentyone_off.src="images/sitemap.gif";
 twentyone_active = new Image; twentyone_active.src="images/sitemap_on.gif";

twentytwo_on = new Image; twentytwo_on.src="images/investmentlinks_on.gif";
 twentytwo_off = new Image; twentytwo_off.src="images/investmentlinks.gif";
 twentytwo_active = new Image; twentytwo_active.src="images/investmentlinks_on.gif";

twentythree_on = new Image; twentythree_on.src="images/privacypolicy_on.gif";
 twentythree_off = new Image; twentythree_off.src="images/privacypolicy.gif";
 twentythree_active = new Image; twentythree_active.src="images/privacypolicy_on.gif";

twentyfour_on = new Image; twentyfour_on.src="images/disclosures_on.gif";
twentyfour_off = new Image; twentyfour_off.src="images/disclosures.gif";
twentyfour_active = new Image; twentyfour_active.src="images/disclosures_on.gif";

twentyfive_on = new Image; twentyfive_on.src="images/financialnewsletter_on.gif";
twentyfive_off = new Image; twentyfive_off.src="images/financialnewsletter.gif";
twentyfive_active = new Image; twentyfive_active.src="images/financialnewsletter_on.gif";

twentysix_on = new Image; twentysix_on.src="images/employment_on.gif";
twentysix_off = new Image; twentysix_off.src="images/employment.gif";
twentysix_active = new Image; twentysix_active.src="images/employment_on.gif";

twentyseven_on = new Image; twentyseven_on.src="images/DLNews_01-over.gif";
twentyseven_off = new Image; twentyseven_off.src="images/DLNews_01.gif";
twentyseven_active = new Image; twentyseven_active.src="images/DLNews_01-over.gif";



	
	
	
	
	
	
