//eclipse.js
// GLOBAL VARS
self.status = "Please Wait...";
menuPages = new Array(
"index",
"menu_mixers",
"contact",
"links",
"about",
"sitemap"
)
menuButtonNames = new Array(
"Home",
"Product Lines",
"Contact Us",
"Links",
"About",
"Site Map"
)

function buildHorizMenu(){
// Find Current Page 
var pageCnt = menuPages.length;
var url=location.href;
var lastSlash = url.lastIndexOf("/");
var activePage = url.substring(lastSlash+1,url.length);
var dot = activePage.indexOf(".");
var buttonName = '';
curPage = activePage.substring(0,dot);
	var s = '';
	s += '<table width="800" class="cMenu" cellspacing="0" cellpadding="0" border="0">';
	document.write(s);
	s = '';
	s += '<tr><td colspan="12"><img src="./images/spacer.gif" width="1" height="0" border="0" alt=""/></td></tr>';
	s += '<tr>';
	s += '<td><img src="./images/spacer.gif" width="60" height="1" border="0" alt=""/></td>';
	for(var i=0;i<pageCnt;i++) 
	{
		if(menuPages[i].length == 0)
			menuPages[i] = 'Index';
		if(curPage == menuPages[i]) 
			activeClass = 'cButton1';
		else
			activeClass = 'cButton0';
		buttonName = menuButtonNames[i];	// default
		if(menuPages[i] == 'contact')
			fileExtension = 'php?purpose=Other&amp;message=';
		else
			fileExtension = 'html';	//default file extension

		s+='<td align="center"><a href="' + menuPages[i] + '.' + fileExtension +'" onMouseover="this.className=\'cButton1\';" onmouseout="this.className=\'' + activeClass + '\';" class="' + activeClass + '">' + buttonName + '</a></td>';
	}
	s += '<td><img src="./images/spacer.gif" width="60" height="1" border="0" alt=""/></td>';
	s += '</tr>';
	s += '<tr><td><img src="./images/spacer.gif" width="1" height="3" border="0" alt=""/></td></tr>';
	s += '</table>';
	document.write(s);
}	//End buildHorizMenu
	
function doFootingA(userAgent)
{
	var sCopy = '' +
		'<table class="footerA" width="100%" border="0" cellpadding="0" cellspacing="0" summary="page footing">' +	
    '<tr><td  width="100%" align="center">' +
    '<tr><td align="center"><span class="footnote">For best viewing, always use the latest browsers.<br/>' +
    '<a class="footerA" href="http://www.upsdell.com/BrowserNews/find.htm" target="_blank">Click here for FREE browser upgrades</a>.<br/>' +
		'<span class="footnote">Please report any problems viewing this site to the ' +
		'<a class="footnote" href="mailto:webmaster&#64;' + g_CLIENTUSERID + '?subject=' + g_OWNER + ' Website Problem, U.A.=' + navigator.userAgent + '">Webmaster</a></span>' +
    '<br/><br/></td></tr></table>';
	document.write(sCopy);
}
function doFootingB(){
	var pLine = '';
	pLine +='<table width="100%" valign="top" cellpadding="0" cellspacing="0" border="0" summary="page footing">';
	pLine +='<tr><td colspan="2"><img class="botline" src="./images/spacer.gif" width="100%" height="2" border="0" alt=""/></td></tr>';
	pLine +='<tr><td align="left" valign="top"><img src="./images/spacer.gif" width="28" height="30" border="0" style="margin-right:2px;" alt="" /></td>';
	pLine +='<td class="footer" align="left" valign="top">&copy;&nbsp;' + g_COPYRIGHT + '.&nbsp;&nbsp;All rights reserved.';
	pLine +='<br/>Please report problems viewing this site as ';
	pLine +='<a class="footer" href="mailto:'+g_WEBMASTERMAILTO + '?subject=Re: Website - ' + g_CLIENTURL + ' , U.A.=' + navigator.userAgent + ', OS=' + window.navigator.platform + ', CPU=' + window.navigator.cpuClass;
	if ( window.screen ){
		pLine += ', ScreenRes='; 
		pLine += window.screen.width; 
		pLine += 'x'; 
		pLine += window.screen.height;
	}
	pLine +='">Comments to Webmaster</a><br/>';
/*
	var sLine= 'Site last modified ' + g_sLASTUPDATE + '&nbsp;by ';
	var sLine= 'Site last modified ' + g_sLASTUPDATE + '&nbsp;by ' +
		'<a class="footer" href="' + g_WEBMASTERURL + '" target="_blank">' + g_WEBMASTERNM + '</a>&nbsp; ' + g_WEBMASTERPH +	
		'<br/></td></tr></table>';

	pLine += sLine;
*/
	document.write(pLine);
}	//End doFootingB
function openRemote(url,winName,winWidth,winHeight)
{
	var winParms = "toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=" + winWidth + ",height=" + winHeight;
	
	var ran_unrounded=Math.random()*100;
	var ran_number=Math.round(ran_unrounded); 
	var randomName = winName+ran_number;

	var remote = window.open(url,randomName,winParms);
	if(remote.opener == null){
		remote.opener = window;
	}
	return;
}
function goBack(url){
	if(!window.opener){
		location.href = url;
		return;
	}else{
		window.close();
		return true;
	}
}
self.status='';