// JavaScript Document

		
	/*  ----------------------------------------------------------------
		NAV JS - Enables IE to work like Firefox
		--------------------------------------------------------------*/
			sfHover = function() {
				var sfEls = document.getElementById("nav").getElementsByTagName("LI");
				for (var i=0; i<sfEls.length; i++) {
					sfEls[i].onmouseover=function() {
						this.className+=" sfhover";
					}
					sfEls[i].onmouseout=function() {
						this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
					}
				}
			}
			if (window.attachEvent) window.attachEvent("onload", sfHover);
			
			/* Change class for parent links in the NAV (i.e. Products) */
			function changeClass(id, newClass)
				{
					if (document.getElementById(id))
					{
						var element = document.getElementById(id);
						element.className = newClass;
					}
				}
				
			/* disable section titles */
			function disableTitle() {
				document.getElementById('n1-title-broker').onclick=function(){return false;}
				document.getElementById('n1-title-corporate').onclick=function(){return false;}
			}
			if (window.attachEvent) window.attachEvent("onload", disableTitle);

	/*  ----------------------------------------------------------------
		Open/Close Div
		--------------------------------------------------------------*/
			function toggle(e) {
				if(e) {
					if (document.getElementById(e).style.display == "") {
						document.getElementById(e).style.display = "block";
					} else {
						document.getElementById(e).style.display = "";
					}
				}
			}
			function toggleOpen(e) {
				if(e) {
					document.getElementById(e).style.display = "block";
				}
			}
			function toggleClose(e) {
				if(e) {
					document.getElementById(e).style.display = "none";
				}
			}

	/*  ----------------------------------------------------------------
		New URL - within site
		--------------------------------------------------------------*/
			function goHere(url) {
				if(url) {
					document.location = url;
					return false;
				}
			}
			
/*  ----------------------------------------------------------------
		New Window
		--------------------------------------------------------------*/
			function newwinEzl(url) {
				if(url) {
					newwindow=window.open(url,'ezleads','toolbar=yes,location=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=700,height=500,top=15,left=15');
						if (window.focus) {
							newwindow.focus()
							}
						return false;
				}
			}
	
	/*  ----------------------------------------------------------------
		Prevents spiders from spamming email address.
		--------------------------------------------------------------*/
		function appendEmail(e,s,b) {
			if(e) {
				var e // email address
				var s // subject
				var b // body
				var goodAddress
					goodAddress = e.replace('NOSPAM','@'); // replaces NOSPAM with @
				if (s == 'noSubject' && b == 'noBody') {
					document.location.href = 'mailto:' + goodAddress;
					} else if (s != 'noSubject' && b == 'noBody') {
						document.location.href = 'mailto:' + goodAddress + '?subject=' + s;
					} else if (s == 'noSubject' && b != 'noBody') {
						document.location.href = 'mailto:' + goodAddress + '?body=' + b;
					} else {
						document.location.href = 'mailto:' + goodAddress + '?subject=' + s + '&body=' + b;
					}
				return false;
				}
			}


	/*  ----------------------------------------------------------------
		Footer Copyright Date
		--------------------------------------------------------------*/
			var copyright = new Date();
			var date = copyright.getDate();
			var year = copyright.getYear();
			//Y2K Fix
			if (year < 2000) year = year + 1900;
			

	/*  ----------------------------------------------------------------
		Preload Images For IE - Divup Box Images
		--------------------------------------------------------------*/
		function MM_preloadImages() { //v3.0
		  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
			var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
			if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
		}


