var quote;
if(quote)
	quote=' OnClick="alert(\'This link will open in a new window so you do not lose any of the information you have entered.\')" target="_blank"';
else
	quote='';
	
function MM_preloadImages() 
{
	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_swapImgRestore() 
{
	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_findObj(n, d) 
{
	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);
	if(!x && d.getElementById) 
		x=d.getElementById(n); 
	return x;
}	
function MM_swapImage() 
{
	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];
		}
}
var dolphintabs=
{
	subcontainers:[],
	last_accessed_tab:null,
	revealsubmenu:function(curtabref)
	{
		curtabref.className="current"
	},
	init:function(menuId, selectedIndex)
	{
		var tabItems=document.getElementById(menuId).getElementsByTagName("a")
		for (var i=0; i<tabItems.length; i++)
		{
			tabItems[i].onmouseover=function()
			{
				dolphintabs.revealsubmenu(this)
			}
		}
	}
}
function main()
{
	document.write('<div style="position:absolute; left: 0px; top: 38px; width: 100%;">');
	if(navigator.appName=="Microsoft Internet Explorer")
		document.write('<center><img src="'+dir+'images/scherrs.png" style="margin-left:17px" /></center>');
	else
		document.write('<center><img src="'+dir+'images/scherrs.png" style="margin-left:25px" /></center>');
	document.write('</div>');
	if(dir=="")
	{
		document.write('<object width="800" height="300">');
		document.write('<param name="wmode" value="transparent" />');
		document.write('<embed src="flash/scherrs.swf" width="800" height="300" wmode="transparent">');
		document.write('</embed></object>');
	}
	else
	{
		var loc=self.location.href;
		if(loc.lastIndexOf("/doors/")!=-1)
		   	document.write('<a href="'+dir+'index.html"><img src="'+dir+'images/scherrs_doors.png" alt="Scherrs Cabinet and Doors" border=0></a>');
		else if(loc.lastIndexOf("/drawers/")!=-1)
		   	document.write('<a href="'+dir+'index.html"><img src="'+dir+'images/scherrs_drawers.png" alt="Scherrs Cabinet and Doors" border=0></a>');
		else if(loc.lastIndexOf("/cabinets/")!=-1)
		   	document.write('<a href="'+dir+'index.html"><img src="'+dir+'images/scherrs_cabinets.png" alt="Scherrs Cabinet and Doors" border=0></a>');
		else
			document.write('<a href="'+dir+'index.html"><img src="'+dir+'images/scherrs_main.png" alt="Scherrs Cabinet and Doors" border=0></a>');
	}


}
function titlebar()
{
	var loc=self.location.href;
	document.write('<div id="navigator"><ul>');
	if(dir!="")
		document.write('<li><a href="'+dir+'index.html"'+quote+'><span>Home</span></a></li>');
	document.write('<li><a href="'+dir+'why/index.html"'+quote+'><span>Why Scherr\'s</span></a></li>');
	document.write('<li><a href="'+dir+'catalog/index.html"'+quote+'><span>Catalog</span></a></li>');
	document.write('<li><a href="'+dir+'gallery/index.html"'+quote+'><span>Gallery</span></a></li>');
	document.write('<li><a href="'+dir+'quote/index.html"'+quote+'><span>Price Quote</span></a></li>');
	document.write('<li><a href="'+dir+'contact/index.html"'+quote+'><span>Contact Us</span></a></li>');
	document.write('</ul></div>');
	
		

	
	document.write('<div id="navigator2"><ul>');
	document.write('<li><a href="'+dir+'cabinets/index.html"'+quote+'><span>Frameless RTA Cabinets</span></a></li>');
	document.write('<li><a href="'+dir+'doors/index.html"'+quote+'><span>Door & Drawer Fronts</span></a></li>');
	document.write('<li><a href="'+dir+'drawers/index.html"'+quote+'><span>Drawer Boxes</span></a></li>');
	document.write('<li><a href="'+dir+'online_ordering/index.html"'+quote+'><span>Online Hardware Ordering</span></a></li>');

	document.write('</ul></div>');
	
	document.write('<script type="text/javascript">dolphintabs.init("navigator", 0)</script>')
	document.write('<script type="text/javascript">dolphintabs.init("navigator2", 0)</script>')
}
main();
titlebar();
