document.write('<script language="JavaScript" src="jsloader.php?Script=anchorposition"></script>');
document.write('<script language="JavaScript" src="jsloader.php?Script=layers"></script>');
document.write('<script language="JavaScript" src="jsloader.php?Script=menu_lib"></script>');

var MaxLevels = 5;

function f_GenerateMenuContent(Level, Identity)
{
	var ReturnString = '';
	var x = 1;

	window.status = Level + ' - ' + Identity;
	
	if(Level > MaxLevels)
	{
		return '';
	}

	ReturnString += '';
	
	if(Identity == -1)
	{
		
		ReturnString += '<table class="BaseMenuTable" width="100%" cellpadding="1" cellspacing="0" border="0"><tr><td>';
			 ReturnString += '<form action="index.php" method="get" name="SearchForm"><input type="hidden" name="Page" value="serve" /><input type="hidden" name="PageNumber" value="6" />';			 ReturnString += '<table width="100%" border="0"><tr><td>';			 ReturnString += '<input type="text" name="QuickSearch" id="QuickSearch" value="product name or number" onFocus="selectAllText(\'QuickSearch\');" onMouseUp="return false;" style="width: 100%;" />';			 ReturnString += '</td></tr><tr><td align="right">';			 ReturnString += '<input type="submit" value="Search">';			 ReturnString += '</td></tr></table>';			 ReturnString += '</form>';
		ReturnString += '</td></tr></table>';
	}
	if(Identity == 1)
	{
		var TheParameters = window.location.search.substring(1,255);
		var LogoutURL = '';
		var LoginURL = '';
		if(TheParameters != ''){
			TheParametersArray = TheParameters.split("&");
			for (i= 0 ; i < TheParametersArray.length; i++) {
				if(unescape(TheParametersArray[i]).indexOf('PrePage') == -1 && unescape(TheParametersArray[i]).indexOf('UserName') == -1 && unescape(TheParametersArray[i]).indexOf('Password') == -1){
					if(LogoutURL == ''){
						LogoutURL += '?';
					}
					else{
						LogoutURL += '&';
					}
					LogoutURL += unescape(TheParametersArray[i]);
					if(LoginURL == ''){
						LoginURL += '?';
					}
					else{
						LoginURL += '&';
					}
					LoginURL += unescape(TheParametersArray[i]);
				}
			}
			LogoutURL += '&PrePage=Login&UserName=&Password=';
		}
		else{
			LogoutURL += '?PrePage=Login&UserName=&Password=';
		}
		
		
		ReturnString += '<table class="BaseMenuTable" border="0" width="100%" cellpadding="1" cellspacing="0"><tr><td>';
			 ReturnString += f_MakeMenuItemContent('Forgot your password?', '?Page=serve&PageNumber=44', 0, Level, x++);			 ReturnString += '<hr size="1" width="100%" style="padding: 1px;" />';		if(navigator.appVersion.indexOf("Mac")!=-1)
		{
			ReturnString += f_MakeMenuItemContent('Log in', '?Page=login', 0, Level, x++);
		}
		else
		{
			/*
			ReturnString += '<form action="index.php' + LoginURL + '" method="post" name="LoginForm"><input type="hidden" name="PrePage" value="Login">';
			ReturnString += 'Username:<br /><input type="text" name="UserName" value="Guest" onFocus="keepMenu=true;setTimeout(\\'this.select()\\', 100);" style="font-size:9pt;width:100%;background-color: ffffff;color: 000000;border-bottom:solid 1px;border-left:solid 1px;border-right:solid 1px;border-top:solid 1px;"><br />';
			ReturnString += 'Password:<br /><input type="password" NAME="Password" value="" onFocus="keepMenu=true;" style="font-size:9pt;width:100%;background-color: ffffff;color: 000000;border-bottom:solid 1px;border-left:solid 1px;border-right:solid 1px;border-top:solid 1px;"><br />';
			ReturnString += '<input type="checkbox" name="LoginSave" checked />&nbsp;Save<br /><input type="submit" VALUE="Login" style="font-size:9pt;width:75px;background-color: 999999;color: 000000;border-bottom:solid 1px;border-left:solid 1px;border-right:solid 1px;border-top:solid 1px;" onmouseover="this.style.color=\'#ffffff\'" onmouseout="this.style.color=\'#000000\'"><br />';
			ReturnString += '</form>';
			*/

			ReturnString += '<table width="100%" border="0">';
			ReturnString += '<form action="index.php' + LoginURL + '" method="post" name="LoginForm"><input type="hidden" name="PrePage" value="Login" />';
			ReturnString += '<tr><td width="40%" colspan="2">';
			ReturnString += 'Username:';
			ReturnString += '</td><td width="60%">';
			ReturnString += '<input type="text" name="UserName" value="Guest" onFocus="this.select();" style="font-size:9pt;width:100%;background-color: ffffff;color: 000000;border-bottom:solid 1px;border-left:solid 1px;border-right:solid 1px;border-top:solid 1px;" />';
			ReturnString += '</td></tr>';
			ReturnString += '<tr><td width="40%" colspan="2">';
			ReturnString += 'Password:';
			ReturnString += '</td><td width="60%">';
			ReturnString += '<input type="password" NAME="Password" value="" style="font-size:9pt;width:100%;background-color: ffffff;color: 000000;border-bottom:solid 1px;border-left:solid 1px;border-right:solid 1px;border-top:solid 1px;" />';
			ReturnString += '</td></tr>';
			ReturnString += '<tr><td width="10%">';
			ReturnString += '<input type="checkbox" name="LoginSave" checked /></td><td width="30%">Save';
			ReturnString += '</td><td width="60%" align="right">';
			ReturnString += '<input type="submit" VALUE="Login" style="font-size:9pt;width:75px;background-color: 999999;color: 000000;border-bottom:solid 1px;border-left:solid 1px;border-right:solid 1px;border-top:solid 1px;" onmouseover="this.style.color=\'#ffffff\'" onmouseout="this.style.color=\'#000000\'">';
			ReturnString += '</td></tr>';
			ReturnString += '</form>';
			ReturnString += '</table>';

			/*
			ReturnString += '<br><center><table width="100%" border="0" cellpadding="4" cellspacing="0">';
			ReturnString += '<tr><td colspan="2"><font color="#000000">Username:</font></td></tr><tr><td colspan="2"><form action="index.php' + LoginURL + '" method="post" name="LoginForm"><input type="hidden" name="PrePage" value="Login"><input type="text" name="UserName" value="Guest" onFocus="this.select();" style="font-size:9pt;width:100%;background-color: ffffff;color: 000000;border-bottom:solid 1px;border-left:solid 1px;border-right:solid 1px;border-top:solid 1px;"></td></tr>';
			ReturnString += '<tr><td colspan="2"><font color="#000000">Password:</font></td></tr><tr><td colspan="2"><input type="password" NAME="Password" value="" style="font-size:9pt;width:100%;background-color: ffffff;color: 000000;border-bottom:solid 1px;border-left:solid 1px;border-right:solid 1px;border-top:solid 1px;"></td></tr>';
			ReturnString += '<tr><td><input type="checkbox" name="LoginSave" checked />&nbsp;<font color="#000000">Save</font></td><td align="right"><input type="submit" VALUE="Login" style="font-size:9pt;width:75px;background-color: 999999;color: 000000;border-bottom:solid 1px;border-left:solid 1px;border-right:solid 1px;border-top:solid 1px;" onmouseover="this.style.color=\'#ffffff\'" onmouseout="this.style.color=\'#000000\'"></form></td></tr>';
			ReturnString += '</table></center>';
			*/
			//alert(ReturnString);
			
		}
		
		ReturnString += '</td></tr></table>';

	}
		else{
	
	}
	return ReturnString;
}
var L1;
var L2;
var L3;
var L4;
document.write('<a class="MenuHeaderItem" id="menu1" href="?Page=serve&PageNumber=3" onMouseOver="f_CleanUp(\'M1\');f_HideHigherThan(0);">About us</a><a class="MenuHeaderItem" id="menu2" href="?Page=login" onMouseOver="f_ShowMenu(this, 0, 25, 1, 1, this);">Login</a>');