		document.write('<SCRIPT language="JavaScript" src="sog_data.js"></SCRIPT>');
		var dec = 51;
		var hD="0123456789ABCDEF";
		var quoteNum = 99;
				
		function loaded(){
			while(quoteNum >= document.getElementById('quoteCell').childNodes.length){
				quoteNum = parseInt(Math.random() * 100);
			}
			setTimeout('switchDiv()',1000);
		}
		function d2h(d) {
			var h = hD.substr(d&15,1);
			while(d>15) {d>>=4;h=hD.substr(d&15,1)+h;}
			return h;
		}
		function fade(el){
			if(dec < 255){
				dec += 17;
				var nc = d2h(dec);
				el.style.color = nc+nc+nc;
				setTimeout('fade(el)', quoteFadeTime);
			}else{
				dec = 51;
				switchDiv();
			}
			
		}
		function switchDiv(){
			if(el = document.getElementById('quoteCell').childNodes[quoteNum]){
				el.style.display='none';
				el.style.top = document.getElementById('quoteCell').style.top-300;
			}
			quoteNum ++;
			if(quoteNum >= document.getElementById('quoteCell').childNodes.length)
				quoteNum = 0;
			el = document.getElementById('quoteCell').childNodes[quoteNum];
			el.style.display = '';
			el.style.top = document.getElementById('quoteCell').style.top-300;
			el.style.color = quoteFontColor;
			slide(el);
		}
		function slide(el){
			var pos = parseInt(el.style.top);
			if(pos < document.getElementById('quoteCell').style.top){
				el.style.top = pos+10;
				setTimeout('slide(el)',quoteSlideTime);
			}else{
				setTimeout('fade(el)', quoteDisplayTime);
			}
		}
		function nav(el,over){
			if(document.location.href.indexOf(el.href) == -1){
				if(over){
					el.style.color='#FFFFFF';
				}else{
					el.style.color='#CCCCEE';
				}
			}
		}
		function writeEmayle(nam,dom,ext,style){
			var m1 = "mail";
			var m2 = "to:";
			if(style == 'header')
				document.write('<a href="'+m1+m2+nam+'@'+dom+'.'+ext+'" style="text-decoration:underline;color:#339933;" onmouseover="this.style.color=\'#333366\'" onmouseout="this.style.color=\'#339933\'">Email</a>');
			else if(style == 'image')
				document.write('<a href="'+m1+m2+nam+'@'+dom+'.'+ext+'"><img src="images/emayle.gif" alt="" width="150" height="15" border="0" align="absbottom" onmouseover="this.src=\'images/emayle2.gif\'" onmouseout="this.src=\'images/emayle.gif\'"></a>');
			else if(style == 'rh')
				document.write('<a href="'+m1+m2+nam+'@'+dom+'.'+ext+'"><img src="images/emayleRH.gif" alt="" width="150" height="15" border="0" align="absbottom" onmouseover="this.src=\'images/emayle2.gif\'" onmouseout="this.src=\'images/emayleRH.gif\'"></a>');
			
		}
		function writeHead(){
			document.write('<div align="center"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr valign="bottom"> '+
			'<td rowspan="2" width="24"><img src="images/tpn.gif"  alt="" width="24" height="150" border="0"></td> '+
			'<td rowspan="2" width="300" align="center"> '+
				'<img src="images/soglog10.jpg" alt="" border="0" style="position:relative; top:-18;"><br> '+
				'<span style="color:339933;font-weight:bold;position:relative;top:0;">Call 1&middot;866&middot;SALES&middot;06&nbsp;or&nbsp;');
			writeEmayle('contactme','salesog','com','header');
			document.write('</span>&nbsp;<br><br></td><td rowspan="2"><img src="images/tpn.gif"  alt="" width="20" height="4" border="0"></td><td><img src="images/tpn.gif" alt="" width="'+quoteMinWidth+'" height="1" border="0"><br>');
			document.write('</td><td rowspan="2" width="320" style="background-image:url(\'images/headPhotonew.jpg\')"><img src="images/tpn.gif" alt="" border="0" height="4" width="100"></td></tr>');
			document.write('<tr><td ID="quoteCell" valign="bottom">');
			writeQuotes();
			document.write('</td></tr></table>');
		}
		function writeQuotes(){
			for(i=0;i<quote.length;i++){
            	document.write('<div class="quote" style="position:relative;top:0;display:none;">');
				document.write(quote[i]);
				document.write('<br><br></div>');
            }
		}
		
		function writeNav(noNav){
			if(noNav)
				document.write('<div class="mainMenuDiv" style="width:100%"></div>');
			else
				createNav();
		}
		function writeTitle(title,width,border){//add width value to limit width. add border value to temporarily display border for debug.
			document.write('<title>Sales Optimization Group - '+title+'</title>'+
			'<table class="mainTable" width="'+width+'" cellspacing="0" border="'+border+'" cellpadding="12"><tr valign="top"><td class="mainCopy" colspan="2"><div class="greenHead">'+title_extra+title+'</div><hr width="100%" color="#339933"><br>');
		}
		function writeDivider(){
			document.write('</td><td width="222"><br><TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD colspan=2 style="background-color:#339933;" valign="top"></TD><TD valign="bottom"><img src="images/shadowUR.png" alt="" width="7" height="9" border="0" style="margin-top:3px;"></TD></TR><TR><TD colspan=2 class="sidebar" valign="top">');
		}
		function writeCloser(hgt){
			document.write('</td><TD background="images/shadowS.png"></TD></TR><TR><TD width="1"> '+
			'<img src="images/shadowLL.png" alt="" width="10" height="8" border="0"></TD><TD width="99%" background="images/shadowB.png"> </TD><TD><img src="images/shadowLR.png" alt="" width="7" height="8" border="0"></TD></TR></TABLE> ');
			writeEnd();
		}
		function writeEnd(){
			var dt = new Date();
			document.write('</td></tr><tr><td align="center" colspan="22" style="color:999999;font-size:12px;">&copy; 2006-'+ dt.getFullYear() +' Sales Optimization Group LLC - All Rights Reserved</td></tr></table></div>');
		}
		
		
		// below is the stuff to make dynamic nav work
		window.onerror = null;
		var menuActive = 0;
		var menuOn = 0;
		var onLayer;
		var timeOn = null;
		var globalEl;
		var undef;
		
		function mainMenu(el,num){
			if(num != undef){
				if (timeOn != null) {
					clearTimeout(timeOn);
					hideLayer(onLayer);
				}
				if(num){
					var layerName = "Menu"+num;
					var shadCellName = "botShad"+num;
					var left =findPosX(el)-12;
					var top =findPosY(el)+menuHeight;
		
					if(document.getElementById){
						var elementRef = document.getElementById(layerName);
						if((elementRef.style) && (elementRef.style.display!=null)){
							elementRef.style.display = 'block';
							elementRef.style.left = left;
							elementRef.style.top = top;
						}
					}else if(document.all){
						var layers = eval('document.all["'+layerName+'"].style');
						layers.left = left;
						eval('document.all["'+layerName+'"].style.display="block"');
					}
					onLayer = layerName;
				}else{
					onLayer = 0;
					el.className="mainMenuHover";
				}
				//onLayer = layerName;
			}else{
				if(onLayer)
					timeOn = setTimeout("if(!menuActive)hideLayer(onLayer);",600);
				else
					el.className="mainMenu";
			}
		}
		
		function hideLayer(layerName){
			if(!menuActive && layerName){
				if(document.getElementById){
					var elementRef = document.getElementById(layerName);
					if((elementRef.style) && (elementRef.style.display!=null))
						elementRef.style.display = 'none';
				}else if(document.all){
					eval('document.all["'+layerName+'"].style.display="none"');
				}
			}
		}
		
		function subMenu(el,flag){
			if(flag){
				globalEl=el;
				el.className = "subMenuHover";
				clearTimeout(timeOn);
				menuActive = 1
			}else{
				if(globalEl)
					el.className = "subMenu";
				menuActive = 0;
				timeOn = setTimeout("hideLayer(onLayer)", 100);
			}
		}
		
		function findPosX(obj){
			var curleft = 0;
			if (obj.offsetParent){
				while(obj.offsetParent){
					curleft += obj.offsetLeft
					obj = obj.offsetParent;
				}
			}else if(obj.x){
				curleft += obj.x;
			}
			return curleft;
		}
		
		function findPosY(obj){
			var curtop = 0;
			if(obj.offsetParent){
				while(obj.offsetParent){
					curtop += obj.offsetTop
					obj = obj.offsetParent;
				}
			}else if(obj.y){
				curtop += obj.y;
			}
			return curtop;
		}
		// above is dynamic nav code, below is building nav code
	
		function createNav(){
			var shadWidth = 0;
			var splitNav;
			var hover;
			document.write('<div class="mainMenuDiv"><table class="mainMenu" cellpadding="0" cellspacing="0"><tr><td><img src="images/tpn.gif" alt="" width="20" height="5" border="0"><img src="images/nav_divider2.jpg" alt="" width="2" height="25" border="0" hspace="12"><br></td>');
			for(i=0;i<navMenu.length;i++){
		    	if(typeof(navMenu[i]) == "string"){
					hover = '';
					splitNav = navMenu[i].split("--");
					if(document.location.href.indexOf(splitNav[1]) != -1){
						document.write('<td nowrap class="mainMenuHover" align="center">'+splitNav[0]+'</td>');
					}else{
						document.write('<td nowrap'+hover+' align="center" onmouseover="mainMenu(this,0)" onmouseout="mainMenu(this)" onclick="document.location.href=\''+splitNav[1]+'\'">'+splitNav[0]+'</td>');
					}
				}else{
					document.write('<td nowrap align="center" onmouseover="mainMenu(this,'+(i+1)+')" onmouseout="mainMenu(this)">'+navMenu[i][0]+'</td>');
				}
				document.write('<td><img src="images/nav_divider2.jpg" alt="" width="2" height="25" border="0" hspace="12"><br></td>');
		    }
			document.write('</tr></table></div><div style="background-image:url(\'images/shadowB.png\')"><img src="images/tpn.gif" alt="" width="8" height="8" border="0"></div>');
			for(i=0;i<navMenu.length;i++){
				if(typeof(navMenu[i]) != "string"){
					document.write('<div id="Menu'+(i+1)+'" class="subMenuDiv"><TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD colspan="2" style="background-color:#262746;background-image:url(\'images/subMenuShad.gif\');"><img src="images/tpn.gif" alt="" width="1" height="6" border="0">');
					for(ii=1;ii<navMenu[i].length;ii++){
						splitNav = navMenu[i][ii].split("--");
						document.write('<div class="subMenu" onmouseover="subMenu(this,1)" onmouseout="subMenu(this,0)" onclick="document.location.href=\''+splitNav[1]+'\'">'+splitNav[0]+'</div>');
						if(splitNav[0].length > shadWidth)
							shadWidth = splitNav[0].length;
					}
					shadWidth *= shadWidthMultiplier;
					shadWidth += shadWidthMultiplier;
					document.write('</TD><TD background="images/shadowS.png"></TD></TR><TR>');
					document.write('<TD><img src="images/shadowLL.png" alt="" width="10" height="8" border="0"></TD>');
					document.write('<TD background="images/shadowB.png"><img src="images/tpn.gif" alt="" width="'+shadWidth+'" height="8" border="0"></TD>');
					document.write('<TD><img src="images/shadowLR.png" alt="" width="7" height="8" border="0"></TD>');
					document.write('</TR></TABLE></div>');
					shadWidth = 0;
				}
			}
		}