function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function topHeader() {
	
	var absoluteRoot = "/";
	
	if((""+location).indexOf("/download/") > 1)
		absoluteRoot = "../../../";
	else if((""+location).indexOf("/models/") > 1)
		absoluteRoot = "../../";
	else if(document.domain.indexOf("allseating.com") < 0 || document.domain.indexOf("file://") >= 0 || document.domain == "")
		absoluteRoot = "../";
	
	var strLoc = ""+top.location;
	var arrDir = new Array("about","environment","products","fabrics","support","contact");
	var arrImg = new Array("About|nav_about.gif|nav_about_on.gif","Environment|nav_environment.gif|nav_environment_on.gif","Products|nav_products.gif|nav_products_on.gif","Fabric|nav_fabric.gif|nav_fabric_on.gif","Support|nav_support.gif|nav_support_on.gif","Contact|nav_contact.gif|nav_contact_on.gif");
	var x = 0;
	
	document.writeln('<tr>');
	document.writeln('	<td>');
	
	document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
	document.writeln('			<tr>');
	document.writeln('				<td><a href="' + absoluteRoot + 'index.html"><img src="' + absoluteRoot + 'images/i_logo_allseating2.jpg" alt="allseating" width="580" height="83" border="0" /></a></td>');
	document.writeln('				<td valign="top"><form name="search" method="get" action="' + absoluteRoot + 'products/search.asp">');
	document.writeln('						<table border="0" cellspacing="0" cellpadding="2">');
	document.writeln('							<tr>');
	document.writeln('							  <td colspan="3" align="left" class="titleOrange"><img src="' + absoluteRoot + 'images/trans.gif" width="2" height="10" /></td>');
	document.writeln('						  </tr>');
	document.writeln('							<tr>');
	document.writeln('								<td align="left" class="titleOrange">Search products</td>');
	document.writeln('								<td>&nbsp;</td>');
	document.writeln('								<td>&nbsp;</td>');
	document.writeln('							</tr>');
	document.writeln('							<tr>');
	document.writeln('								<td align="left"><input name="search_pattern" type="text" class="inputbox" /></td>');
	document.writeln('								<td width="5">&nbsp;</td>');
	document.writeln('								<td><a href="#" onclick="document.forms[\'search\'].submit(); event.returnValue=false;"><img src="' + absoluteRoot + 'images/btn_go.gif" width="19" height="19" border="0" /></a></td>');
	document.writeln('							</tr>');
	document.writeln('						</table>');
	document.writeln('			  </form>					</td>');
	document.writeln('				<td width="238" align="center" valign="top"><table border="0" cellpadding="2" cellspacing="0">');
    document.writeln('                 <tr>');
    document.writeln('                   <td colspan="3" class="titleOrange"><img src="' + absoluteRoot + 'images/trans.gif" width="2" /></td>');
    document.writeln('                 </tr>');
    document.writeln('                 <tr>');
    document.writeln('                   <td colspan="3" ></td>');
    document.writeln('                  </tr>');
    document.writeln('                  <tr>');
    document.writeln('                   <td height="70" class="titleOrange">Get Social With Us</td>');
    document.writeln('                   <td ><a href="http://www.facebook.com/allseating" target="_blank"><img src="' + absoluteRoot + 'images/i_face.gif" name="face" width="23" height="24" border="0" id="face" onmouseover="MM_swapImage(\'face\',\'\',\'' + absoluteRoot + 'images/i_face_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
    document.writeln('                    <td ><a href="http://www.twitter.com/allseating" target="_blank"><img src="' + absoluteRoot + 'images/i_twitter.gif" name="twitter" width="23" height="24" border="0" id="twitter" onmouseover="MM_swapImage(\'twitter\',\'\',\'' + absoluteRoot + 'images/i_twitter_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
    document.writeln('                  </tr>');
    document.writeln('                </table></td>');
	document.writeln('			</tr>');
	document.writeln('		</table>');
	document.writeln('	</td>');
	document.writeln('</tr>');
	document.writeln('<tr>');
	document.writeln('	<td align="left">');
	document.writeln('		<table border="0" cellspacing="0" cellpadding="0">');
	document.writeln('			<tr>');
	document.writeln('				<td><a href="' + absoluteRoot + 'about/index.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'About\',\'\',\'' + absoluteRoot + 'images/nav_about_on.gif\',1)"><img src="' + absoluteRoot + 'images/nav_about.gif" name="About" width="97" height="35" border="0" id="About" /></a></td>');
	document.writeln('				<td><img src="' + absoluteRoot + 'images/nav_devider.gif" width="1" height="35" /></td>');
	document.writeln('				<td><a href="' + absoluteRoot + 'environment/index.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Environment\',\'\',\'' + absoluteRoot + 'images/nav_environment_on.gif\',1)"><img src="' + absoluteRoot + 'images/nav_environment_on.gif" name="Environment" width="122" height="35" border="0" id="Environment" /></a></td>');
	document.writeln('				<td><img src="' + absoluteRoot + 'images/nav_devider.gif" width="1" height="35" /></td>');
	document.writeln('<td><a href="' + absoluteRoot + 'products/index.asp" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Products\',\'\',\'' + absoluteRoot + 'images/nav_products_on.gif\',1)"><img src="' + absoluteRoot + 'images/nav_products_on.gif" name="Products" width="106" height="35" border="0" id="Products" /></a></td>');
	document.writeln('				<td><img src="' + absoluteRoot + 'images/nav_devider.gif" width="1" height="35" /></td>');
	document.writeln('				<td><a href="' + absoluteRoot + 'fabrics/index.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Fabric\',\'\',\'' + absoluteRoot + 'images/nav_fabric_on.gif\',1)"><img src="' + absoluteRoot + 'images/nav_fabric.gif" name="Fabric" width="88" height="35" border="0" id="Fabric" /></a></td>');
	document.writeln('				<td><img src="' + absoluteRoot + 'images/nav_devider.gif" width="1" height="35" /></td>');
	document.writeln('				<td><a href="' + absoluteRoot + 'support/index.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Support\',\'\',\'' + absoluteRoot + 'images/nav_support_on.gif\',1)"><img src="' + absoluteRoot + 'images/nav_support.gif" name="Support" width="99" height="35" border="0" id="Support" /></a></td>');
	document.writeln('				<td><img src="' + absoluteRoot + 'images/nav_devider.gif" width="1" height="35" /></td>');
	document.writeln('				<td><a href="' + absoluteRoot + 'contact/index.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Contact\',\'\',\'' + absoluteRoot + 'images/nav_contact_on.gif\',1)"><img src="' + absoluteRoot + 'images/nav_contact.gif" name="Contact" width="120" height="35" border="0" id="Contact" /></a></td>');
	document.writeln('				<td><img src="' + absoluteRoot + 'images/nav_end.gif" width="80" height="35" /></td>');
	document.writeln('				<td width="36">&nbsp;</td>');
	document.writeln('				<td>&nbsp;</td>');
	
	document.writeln('			</tr>');
	document.writeln('		</table>');
	document.writeln('	</td>');
	document.writeln('</tr>');
	
	for(x=0;x<arrDir.length;x++) {
		var arrVals = arrImg[x].split("|");

		MM_preloadImages(absoluteRoot + "images/"+arrVals[1], absoluteRoot + "images/"+arrVals[2]);

		if(strLoc.indexOf("/"+arrDir[x]+"/") > 0)
			document.images[arrVals[0]].src = absoluteRoot + "images/"+arrVals[2];
		else
			document.images[arrVals[0]].src = absoluteRoot + "images/"+arrVals[1];
	}
}

topHeader();