$(document).ready(function() {
	
	var hover_timeout = undefined;
	
	$("#contentmenu > li").bind("mouseenter", function() {
		
		// anytime we roll over, make sure they all disappear
		$("#contentmenu > li").find("div:first").css("display:none;");
	
		if (hover_timeout != undefined) {
			clearTimeout(hover_timeout);
		}
		
		// gotta do this so we can access this
		var $this = this;
		
		// after 500ms, slide it down
		hover_timeout = setTimeout(function() {
			hover_timeout = undefined;
			//$($this).find("div").slideDown('fast');
			$($this).find("div:first").slideDown('fast');
			//alert('yes');
		}, 200);

	});

	$("#contentmenu > li").bind("mouseleave", function() {
		clearTimeout(hover_timeout);
		$(this).find("div:first").slideUp('fast');
	});
	
	
		var hover_timeout2 = undefined;
	
	$("#brandmenu > li").bind("mouseenter", function() {
		
		// anytime we roll over, make sure they all disappear
		$("#brandmenu > li").find("div:first").css("display:none;");
	
		if (hover_timeout2 != undefined) {
			clearTimeout(hover_timeout2);
		}
		
		// gotta do this so we can access this
		var $this = this;
		
		// after 500ms, slide it down
		hover_timeout2 = setTimeout(function() {
			hover_timeout2 = undefined;
			//$($this).find("div").slideDown('fast');
			$($this).find("div:first").fadeIn('fast');
			//alert('yes');
		}, 200);

	});

	$("#brandmenu > li").bind("mouseleave", function() {
		clearTimeout(hover_timeout2);
		$(this).find("div:first").fadeOut('fast');
	});
});

function showDivision(division) {
	document.getElementById(division).style.display = 'block';
}

function hideDivision(division) {
	document.getElementById(division).style.display = 'none';
}

function SetContent(curcont) {

	if (document.getElementById(curcont)) {
		curdiv = document.getElementById(curcont);
		curdiv.style.display = 'block';
	}

	return;

}

function SwitchContent(curcont, choice) {
	curdiv = document.getElementById(curcont);
	curdiv.style.display = 'none';
	newdiv = document.getElementById(choice);
	newdiv.style.display = 'block';
	curcont = choice;
	return;

}


function toggleDisplay(divToToggle){
	curdiv = document.getElementById(divToToggle);
	if(curdiv.style.display == 'none') curdiv.style.display = 'block';
		else curdiv.style.display = 'none';
	return;
}

function changePage(newLoc)
 {
 	var dd = document.salesform.country.selectedIndex;
	var ss = document.salesform.country[dd].text; 
 	if( ss == 'Other' ) {
 		nextPage = newLoc.options[newLoc.selectedIndex].value		
	    document.location.href = nextPage
 	} 
 }
 
 