			// Startup functions
			ie4 = (document.all)? true:false;			
			ns4 = (document.layers)? true:false;
			byid = (document.getElementById)? true:false;
			browser = navigator.userAgent;

			var ns4i=true;
			if(ns4){
				// NN Versions that don't crash with the dropdown.  If more are discovered, add them here
				var ns4w=new Array();
				  ns4w[0]='4.72';
				  ns4w[1]='4.73';
				  ns4w[2]='4.74';
				  ns4w[3]='4.75';
				  ns4w[4]='4.76';
				for(var j=0;j<ns4w.length;j++) if(navigator.appVersion.indexOf(ns4w[j])!=-1) ns4i = false;
			}

			var thisWidth = "100%";
			if (ns4||byid && !ie4) thisWidth = window.innerWidth;
			if (byid && !ie4) thisWidth -= 15;
			
			if ((browser.indexOf("U;") >=0) && ns4) ns4 = false;
			if (!(ie4||ns4||byid)) {
				MB.Background="#999999";
				MB.Highlight="#cccccc";
				MB.Border="#000000"
			}
			function reDo(){
				window.location.reload()
			}
			if (ns4 && (browser.indexOf("4.0") == -1)) {window.onresize = reDo;}
			function hideAll() {
				for(x=1; x<MB.length; x++) {
					if (ie4) {
						button = eval("MB" + x);
						button.style.backgroundColor = MB.Background;
						target = eval("Promo" + x); 
						target.style.visibility = "hidden";
					} else if (ns4) {
						button = "MB" + x;
						document.layers[button].bgColor = MB.Background;
						target = "Promo" + x;
						document.layers[target].visibility = "hide";
					} else if (byid) {
						buttonName = "MB" + x;
						button = document.getElementById(buttonName);
						button.style.backgroundColor = MB.Background;
						dropName = "Promo" + x;
						drop = document.getElementById(dropName);
						drop.style.visibility = "hidden";
					}
				}
			}
			
			function showPromo2(t) { return false; }
			
			function showPromo(target) {
				if (ie4) {
					drop = eval(target);;
					drop.style.visibility = "visible";
				}
				else if (byid){
					 drop = document.getElementById(target);
					 drop.style.visibility = "visible";
				}
				else if (ns4){ document.layers[target].visibility = "show";}
			}
			
			function MBhighlight(target){
				if (byid || ie4) target.style.backgroundColor = MB.Highlight;
			}
			function magicBar() {
				var buttonLength = (((MB.length-1) * 109)+1);
				navbar = '';
				if (ie4 || ns4 || byid) navbar += '<div name="MBbkg" style="position : absolute; left : 0px; top : 0px; z-index:3;"><table width="' + thisWidth + '" height="31" bgcolor="' + MB.RightBackground + '" border="0" cellpadding="0" cellspacing="0"><tr><td>&nbsp;</td></tr></table></div>';
				if (ns4) navbar += '<layer left="0" top="0" z-index="2" width="' + thisWidth + '" height="31" bgcolor="' + MB.RightBackground + '" onmouseout="hideAll();"></layer>';
				if (ns4) navbar += '<layer left="25" top="0" z-index="3" width="' + buttonLength + '" height="31" bgcolor="' + MB.Border + '" onmouseout="hideAll();"></layer>';
				if (!(ns4 || ie4 || byid)) navbar = '<table cellpadding="0" cellspacing="0" border="0"><tr><td bgcolor="' + MB.Border + '"><table cellpadding="3" cellspacing="1" border="0" bgcolor="' + MB.Background + '"><tr>';
				if (ie4 || byid) navbar += '<div id="MBleft" style="height : 28px; position : absolute; left : 0; top : 0; z-index : 5; border : 1px ' + MB.Border + ' solid; background : ' + MB.LeftBackground + '"><img src="' + MB.SiteDomain + '/magic/magicbar_left.gif" width="25" height="25" border="0" alt="" vspace="2"></div>';
				if (ns4) navbar +='<layer z-index="2" width="25" height="31" left="0" top="0" bgcolor="' + MB.Border + '"></layer>';
				if (ns4) navbar +='<layer z-index="3" width="25" height="30" left="0" top="0" bgcolor="' + MB.LeftBackground + '"><img src="' + MB.SiteDomain + '/magic/magicbar_left.gif" width="25" height="25" border="0" alt="" vspace="2"></layer>';
				for (b=1; b<MB.length; b++) {
					AdCode='';
					if (MB[b].BarAdID != '') AdCode='http://x.ibsys.com/event.ng/Type=click&AdID=' + MB[b].BarAdID + '&Redirect=';
					if (ie4 || byid) pxleft = (((b-1) * 110)+26);
					if (ns4) pxleft = (((b-1) * 109)+26);
					if (ie4 || byid) {
						navbar += '<div align="center" id="MB' + b + '" style="background : ' + MB.Background + '; width : 110px; height : 29px; position : absolute; left : ' + pxleft + '; top : 0; z-index : 10; border : 1px ' + MB.Border + ' solid;" onmouseover="hideAll(); MBhighlight(this); showPromo(\'Promo'  + b + '\');" onmouseout=""><a href="' + AdCode + MB[b].url + '" style="text-align : center; margin : 0px; width : 110px; font : bold 10px/25px Verdana; text-decoration : none; color : ' + MB.ButtonColor + '; padding : 2px; background : transparent; border-bottom : 0px black solid;">' + MB[b].button + '</a></div>';
					} else if (ns4) {
						navbar +='<layer z-index="4" height="30" width="108" bgcolor="' + MB.Background + '" left="' + pxleft + '" top="0" name="MB' + b + '" onmouseover=" hideAll(); bgColor=\'' + MB.Highlight + '\'; showPromo(\'Promo' + b + '\');" onmouseout=""><img src="' + MB.SiteDomain + '/sh/images/structures/misc/spacer.gif" width="1" height="2" vspace="8" border="0" alt=""><a href="' + AdCode + MB[b].url + '" style="text-align : center; font : bold 11px/11px Verdana; text-decoration : none; color : ' + MB.ButtonColor + '; background : transparent;">' + MB[b].button + '</a></layer>';
					} else {
						navbar +='<td><font size="2" face="Verdana"><b>&nbsp;<a href="' + AdCode + MB[b].url + '">' + MB[b].button + '</a>&nbsp;</b></font></td>';
					}
				}
				if (ie4) { // Write DIV code for DHTML
					for (b=1; b<MB.length; b++) {
					if (b < 5) {pxleft = (((b-1) * 110)+22);} else {pxleft=(((b-1)*110)-110);}
						if (MB[b].drop != '') {
							/* replace the MB drop code with the MB non-drop code for now */
							navbar +='<div id="Promo' + b + '" style="position : absolute; left : ' + (((b-1)*110)+26) + 'px; top : 22px; visibility : hidden; width : 110px; height : 20px; padding : 0px; z-index : 10;" onmouseover="MBhighlight(MB' + b + '); this.style.visibility=\'visible\'" onmouseout="this.style.visibility=\'hidden\'; MB' + b + '.style.backgroundColor=\'' + MB.Background + '\';">';
							navbar +='<img src="' + MB.SiteDomain + '/sh/images/spacer.gif" width="110" height="20" alt=""></div>';
							
							//navbar +='<div id="Promo' + b + '" style="position : absolute; left : ' + pxleft + 'px; top : 22px; visibility : hidden; width : 300px; height : 75px; padding : 10px; z-index : 20;" onmouseover="MBhighlight(MB' + b + '); this.style.visibility=\'visible\'" onmouseout="this.style.visibility=\'hidden\'; MB' + b + '.style.backgroundColor=\'' + MB.Background + '\';">';
							//navbar +='<div style="position : absolute; width : 242px; height : 79px; left : 0px; top : 0px; margin-left : 5px; padding:2px; background-color:' + MB.Highlight + '"><iframe src="' + MB[b].drop + '?adid=' + MB[b].BarAdID + '" scrolling="No" width="238" height="75" marginwidth="0" marginheight="0" style="position : absolute;" frameborder="0" onmouseover="MB' + b + '.style.backgroundColor=\'' + MB.Highlight + '\';" onmouseout="MB' + b + '.style.backgroundColor=\'' + MB.Background + '\';"></iframe></div>';
							//navbar +='</div>';
						} else {
							navbar +='<div id="Promo' + b + '" style="position : absolute; left : ' + (((b-1)*110)+26) + 'px; top : 22px; visibility : hidden; width : 110px; height : 20px; padding : 0px; z-index : 10;" onmouseover="MBhighlight(MB' + b + '); this.style.visibility=\'visible\'" onmouseout="this.style.visibility=\'hidden\'; MB' + b + '.style.backgroundColor=\'' + MB.Background + '\';">';
							navbar +='<img src="' + MB.SiteDomain + '/sh/images/spacer.gif" width="110" height="20" alt=""></div>';
						}
					}
				} else if (ns4) { // Write LAYER code for DHTML
					for (b=1; b<MB.length; b++) {
					if (b < 5) {pxleft = (((b-1) * 109)+26);} else {pxleft=(((b-1)*109)-108);}
						if ((MB[b].drop != '')&&(!ns4i)) {
							navbar +='<layer z-index="10" visibility="hide" width="250" height="10" id="Promo' + b + '" left="' + pxleft + '" top="29" onmouseover="visibility=\'show\';" onmouseout="hideAll();" class="MBPromo">';
							navbar +='</layer>';

							//navbar +='<layer z-index="10" bgcolor="' + MB.Highlight + '" visibility="hide" width="242" height="79" id="Promo' + b + '" left="' + pxleft + '" top="22" onmouseover="visibility=\'show\';" onmouseout="hideAll();" class="MBPromo">';
							//navbar +='<layer id="content" src="' + MB[b].drop + '" width="238" height="75" left="2" top="2" marginwidth="3"></layer>';
							//navbar +='</layer>';
						} else {
							navbar +='<layer z-index="10" visibility="hide" width="250" height="10" id="Promo' + b + '" left="' + pxleft + '" top="29" onmouseover="visibility=\'show\';" onmouseout="hideAll();" class="MBPromo">';
							navbar +='</layer>';
						}
					}
				} else if (byid && !ie4) { // Write DIV code for Netscape 6
					for (b=1; b<MB.length; b++) {
					if (b < 5) {pxleft = (((b-1) * 110)+22);} else {pxleft=(((b-1)*110)-110);}
						if (MB[b].drop != '') {
							navbar +='<div id="Promo' + b + '" style="position : absolute; left : ' + pxleft + 'px; top : 30px; visibility : hidden; width : 1px; height : 1px; padding : 10px; z-index : 10;" onmouseover="MB' + b + '.style.backgroundColor=\'' + MB.Highlight + '\'; this.style.visibility=\'visible\'" onmouseout="this.style.visibility=\'hidden\'; MB' + b + '.style.backgroundColor=\'' + MB.Background + '\';">';
							navbar +='</div>';

							//navbar +='<div id="Promo' + b + '" style="position : absolute; visibility : hidden; width : 242px; height : 79px; left : ' + pxleft + 'px; top : 22px; margin-left : 5px; z-index:10; background-color:' + MB.Highlight + ' "onmouseout="this.style.visibility=\'hidden\'; MB' + b + '.style.backgroundColor=\'' + MB.Background + '\';"><iframe src="' + MB[b].drop + '?adid=' + MB[b].BarAdID + '" scrolling="No" width="238" height="75" marginwidth="0" marginheight="0" style="position : absolute; left:2px; top:2px;" frameborder="0" onmouseover="MB' + b + '.style.backgroundColor=\'' + MB.Highlight + '\';" onmouseout="MB' + b + '.style.backgroundColor=\'' + MB.Background + '\';"></iframe></div>';
						} else {
							navbar +='<div id="Promo' + b + '" style="position : absolute; left : ' + pxleft + 'px; top : 30px; visibility : hidden; width : 1px; height : 1px; padding : 10px; z-index : 10;" onmouseover="MB' + b + '.style.backgroundColor=\'' + MB.Highlight + '\'; this.style.visibility=\'visible\'" onmouseout="this.style.visibility=\'hidden\'; MB' + b + '.style.backgroundColor=\'' + MB.Background + '\';">';
							navbar +='</div>';
						}
					}
				}
				if (!(ns4 || ie4||byid)) navbar += '<td width="100%">&nbsp;</td></tr></table></td></tr></table><br>';
				return navbar;
			}
			
			function magicBox() {
				box='';
				box += '<table width="120" cellpadding="1" cellspacing="0" border="0"><tr><td bgcolor="#000000">\n';
				if (ie4||ns4||byid) box += '<div class="MagicBox">\n';
				box += '<table width="118" cellpadding="3" cellspacing="0" border="0">\n';
				for (b=1; b<MB.length; b++) {
				AdCode='';
				if (MB[b].BoxAdID != '') AdCode='http://x.ibsys.com/event.ng/Type=click&AdID=' + MB[b].BoxAdID + '&Redirect=';
					box+= '<tr><th class="section" align="center" bgcolor="' + MB.Background + '"><font face="Verdana" size="1"><a href="' + AdCode + MB[b].url + '">' + MB[b].button + '</a></font></th></tr>\n\n';
					box+= '<tr><td class="teaser" align="center" bgcolor="' + MB.Highlight + '"><font face="Verdana" size="1"><a href="' + AdCode + MB[b].teaserurl + '">' + MB[b].teaser + '</a></font></td></tr>\n\n';
				}
				box+= '</table>\n';
				if (ie4||ns4||byid) box += '</div>\n';
				box += '</td></tr></table>\n';
				return box;
			}