
function shoBrands()
{
	if(navigator)
	{
		if(navigator.userAgent.indexOf(" MSIE 6") > -1 
			|| navigator.userAgent.indexOf(" MSIE 7") > -1)
		{
			allbrands.style.left='160';
			allbrands.style.offsetTop=event.srcElement.style.offsetTop;
			allbrands.style.display= (allbrands.style.display=='') ? 'none' : '';
		}
		
		if(navigator.userAgent.indexOf("Firefox") > -1 
		  || navigator.userAgent.indexOf("Safari") > -1 )
		{
			var obj = document.getElementById("allbrands");
			document.getElementById("allbrands").style.left='160';
			//obj.style.offsetTop=event.srcElement.style.offsetTop;
			document.getElementById("allbrands").style.display= (allbrands.style.display=='') ? 'none' : '';
			
			//alert(navigator.userAgent);
			//document.location.href = "/mb/brands.asp";
		}

		if(navigator.userAgent.indexOf("Netscape") > -1 )
		{
			top.status = navigator.userAgent;
			//alert(navigator.userAgent);
			document.location.href = "/mb/brands.asp";
		}

	}
	else
	{
	//	alert("Browser not compatible");
	}
}

function flip(obj)
{
	if(navigator)
	{
		if(navigator.userAgent.indexOf("Netscape/7") > -1
			|| navigator.userAgent.indexOf(" MSIE 6") > -1)
		{

				switch(obj.className)
				{
					case 'MenuLvl2' : obj.className = 'MenuLvl2hi';
							break;
					case 'MenuLvl2hi' : obj.className = 'MenuLvl2';
							break;
					case 'mopar' : obj.className = 'moparhi';
							obj.children(0).className = 'molinkhi';
							break;
					case 'molink' : obj.className = 'molinkhi';
							break;
					case 'molinkhi' : obj.className = 'molink';
							break;
					case 'moparhi' : obj.className = 'mopar';
							obj.children(0).className = 'molink';
							break;
				}
						
		}
	}
}

function go2(obj)
{
		if(String(obj.children(0).tagName).toLowerCase() == 'a')
		{
			location.href=obj.children(0).href;
		}
}

var activeMenu = "";
var tikr;


function showMenu(mnu)
{
	
	if(mnu.style)
	{
		var oC = window.event.srcElement;
		var mTop;
	
		
		mTop = oC.style.top;
		top.status = mTop;
		var wB = document.body.scrollTop + document.body.clientHeight;
	
		//mnu.style.top = mTop;
		mnu.style.position='absolute';
		//mnu.style.display = '';
		//mnu.style.top = oC.style.top;

		var mB = mTop + mnu.clientHeight;

		if(mB > wB )
		{ 
			//mnu.style.top = wB - (mnu.clientHeight + 10);
			mnu.style.top = wB - (mnu.clientHeight);
		}
		else
		{
			mnu.style.top =  oC.offsetTop +120;
			
		}
		if(oC.className == 'molist') mnu.style.left = "400";
		mnu.style.display = '';
		
	}
	
}


function showMenuAt(mnu,yco)
{
	if(mnu.style)
	{
		var oC = window.event.srcElement;
		var mTop;
		if(oC.tagName == "A")
		{
			//oC = oC.parentElement;
			mTop = oC.parentElement.style.top + 380;
		}
		else
		{
			mTop = oC.offsetTop + 420;
		}

		
		mTop = oC.style.top;
		top.status = mTop;
		var wB = document.body.scrollTop + document.body.clientHeight;
	
		mnu.style.position='absolute';

		var mB = oC.style.top + mnu.clientHeight;

		if(mB > wB )
		{ 
			mnu.style.top = wB - (mnu.clientHeight + 10);
			//mnu.style.top = oC.style.top + 560 + oC.offset.top;
			top.status += "mB";
			mnu.style.border = "thin solid blue";
		}
		else
		{
		//	mnu.style.top = document.body.scrollTop + oC.offsetTop;
			//mnu.style.top =  oC.offsetTop;
			//u.style.top = String(parseInt(oC.parentElement.style.top) + window.event.clientY); //+ oC.offsetY;
			mnu.style.top = String(document.body.scrollTop + window.event.clientY); //+ oC.offsetY;
			//mnu.style.top = oC.clientY;
			top.status += "wB";
			mnu.style.border = "thin solid yellow";
	
		}
		mnu.style.display = '';
		if(mnu.className=="ml2")
		{
			mnu.style.left = "160";
		}
		else
		{
			mnu.style.left = "420";
			if(String(oC.parentElement.style.left).indexOf("420")>-1) mnu.style.left= "600";
			
			
		}
		
		
	}
}




function reeval(mnu)
{
	try{
	
	if(!mnu.contains(window.event.toElement))
	{
		mnu.style.display = 'none';
	}	
	
	}
	catch(ex)
	{
	}
}

function reprieve(mnu)
{
	window.clearTimeout(tikr);
}


function getFreeShipDeadline()
{
	var deadline = "";
	
	var Months =  new Array("Jan","Feb","March","April","May","June","July","Aug","Sept","Oct","Nov","Dec");
	var lasts =  new Array("31st","28th","31st","30th","31st","30th","31st","31st","30th","31st","30th","31st");
	var today = new Date();
	var dt = today.getDate();
	var mo = today.getMonth();
	var yr = today.getFullYear();
	
	if(dt < 21)
	{
		if(dt < 11)
		{
			deadline = Months[mo] + " 10th!";
		}
		else
		{
			deadline = Months[mo] + " 20th!";
		}
	}
	else
	{
		deadline = Months[mo] + lasts[mo];
		
	}
	
	//deadline = " Aug 16th!";
	
	top.status = deadline;

	return(deadline);
}


var idno = 0;
try
{
	document.getElementById("Span1").innerText = "199";
	document.getElementById("Span2").innerText = getFreeShipDeadline() ;
}
catch(ex)
{
}
//document.getElementById("Span2").innerText = "End of Month!"
if(navigator)
{
	if(navigator.userAgent.indexOf("Netscape/7") > -1
		|| navigator.userAgent.indexOf(" MSIE 6") > -1)
	{

		//window.setTimeout("nextMsg()",1500);
	}
}	

function nextMsg()
{
	document.getElementById("bnr" + idno).style.display = 'none';
	idno++;
	if(idno > 3) idno = 0;
//op.status= idno;
	document.getElementById("bnr" + idno).style.display = 'block';
//op.status = idno;
	window.setTimeout("nextMsg()",1500);
}

function showBrowserInfo()
{
	if(navigator)
	{
		try
		{
			window.top.status = navigator.appName + ":" + navigator.appVersion;
			if(navigator.appMinorVersion)
			{
				window.top.status += ":" + navigator.appMinorVersion;
			}
		}
		catch(ex)
		{
			//
		}
	}
}

function hideShow(obj)
{
	//if(obj.visibility)
	//{
	//		obj.visibility = (obj.visibility=='show') ? 'hide' : 'show';
	//}

	if(obj.style)
	{
		obj.style.display = (obj.style.display == 'none') ? 'block' : 'none';
	}
	else
	{
		if(obj.visibility)
		{
			 obj.visibility = (obj.visibility=='visible') ? 'hidden' : 'visible';
		}
	}
	showBrowserInfo();
}
//-->

