window.onload = function() {
	var out = '';
	$$('#anzeaMainNav ul li a').each(function(e) {
		if (e.href == window.location.href) {
			e.addClassName('current');
			var path_parts = e.href.split('/');
			for(var i=1;i<path_parts.length;i++) {
			  var path = path_parts[i].replace('.html','');
			  if ($(path)) $(path).show();
			}
			return true;
		}
		
  });
	$$('#anzeaBotNav ul li a').each(function(e) {
		if (e.href == window.location.href) {
			e.addClassName('current');
			var path_parts = e.href.split('/');
			for(var i=1;i<path_parts.length;i++) {
			  var path = path_parts[i].replace('.html','');
			  if ($(path)) $(path).show();
			}
			return true;
		}
		
  });
	//home page tabs
	$$('#tabBoxList a').each(function(e) {
	  e.onmouseover = function() { 
		  [1,2,3,4].each( function(i) { 
				 Element.hide('tabBoxContent0' + i);
			});
			$$('#tabBoxList a').each(function(a) { Element.removeClassName($(a),'active');});
	    Element.show($(this.rel));
			Element.addClassName($(e),'active');
		}
	});
}
var app = {
	validateSearch : function(el) {
		var n = el ? el : 'n';
		if ($F(n).match(/\d{4}/)) {
			return true;
		}
		alert('Please enter a 4 digit number');
		return false;
	}
}