function Start(){
	
	var fadeInTime = 200; // in milliseconds
	var fadeOutTime = 200; // in milliseconds
	
	rightJavaNavigation();
	$('div.BVSiteMap ul li ul li:has(ul) > a').prepend('<span class="sub-indicator"> »</span>');
	$('ul#TopMenu li ul').attr('fadeState','none');
	$('ul#TopMenu li').hover(
		function() {
			if($(this.getElementsByTagName('ul')[0]).attr('fadeState') =='fadeOut') {
				$(this.getElementsByTagName('ul')[0]).stop(true,true);
				$(this.getElementsByTagName('ul')[0]).attr('fadeState','none')
			} 
		
			if ($(this.getElementsByTagName('ul')[0]).attr('fadeState') =='none') {
				$(this.getElementsByTagName('ul')[0]).attr('fadeState','fadeIn');
				$(this.getElementsByTagName('ul')[0]).fadeIn(fadeInTime, function(){
					$(this).attr('fadeState','none')
				});
			}
		},
		function() {
			if($(this.getElementsByTagName('ul')[0]).attr('fadeState') =='fadeIn') {
				$(this.getElementsByTagName('ul')[0]).stop(true,true)
				$(this.getElementsByTagName('ul')[0]).attr('fadeState','none');
			}
			
			if ($(this.getElementsByTagName('ul')[0]).attr('fadeState') =='none') {
				$(this.getElementsByTagName('ul')[0]).attr('fadeState','fadeOut');
				$(this.getElementsByTagName('ul')[0]).fadeOut(fadeOutTime, function(){
					$(this).attr('fadeState','none')
				});
			}
		}
	);
	$('div.BVSiteMap ul li ul').attr('fadeState','none');
	$('div.BVSiteMap ul li').hover(
		function() {
			if($(this.getElementsByTagName('ul')[0]).attr('fadeState') =='fadeOut') {
				$(this.getElementsByTagName('ul')[0]).stop(true,true);
				$(this.getElementsByTagName('ul')[0]).attr('fadeState','none')
			} 
		
			if ($(this.getElementsByTagName('ul')[0]).attr('fadeState') =='none') {
				$(this.getElementsByTagName('ul')[0]).attr('fadeState','fadeIn');
				$(this.getElementsByTagName('ul')[0]).fadeIn(fadeInTime, function(){
					$(this).attr('fadeState','none')
				});
			}
		},
		function() {
			if($(this.getElementsByTagName('ul')[0]).attr('fadeState') =='fadeIn') {
				$(this.getElementsByTagName('ul')[0]).stop(true,true)
				$(this.getElementsByTagName('ul')[0]).attr('fadeState','none');
			}
			
			if ($(this.getElementsByTagName('ul')[0]).attr('fadeState') =='none') {
				$(this.getElementsByTagName('ul')[0]).attr('fadeState','fadeOut');
				$(this.getElementsByTagName('ul')[0]).fadeOut(fadeOutTime, function(){
					$(this).attr('fadeState','none')
				});
			}
		}
	);
	
	divHeightStart();
}

function rightJavaNavigation(){
//	impact.renderSkin('[' + '[JavaNavigation]' + ']', function(html) {
//		document.getElementById('impactPanelNav').innerHTML = html;
		impactPanelStart();
//	});
}

$(document).ready(function() {
	pixelsilk.renderSkin('[' + '[Menu1]' + ']', function(html) {
		var sections;
		var menu = document.getElementById('TopMenu');
		document.getElementById('subNavigation').innerHTML = html;
		sections = document.getElementById('subNavigation').getElementsByTagName('div');
		var tempTopElements = menu.getElementsByTagName('li');
		var topElements = new Array();
		for (y = 0; y < tempTopElements.length; y++) {
			topElements[y] = tempTopElements[y];
		}
		for (z = 0; z < sections.length; z++) {
			//alert(topElements.length);
			var li = topElements[z];
			var lihtml = li.innerHTML;
			li.innerHTML = lihtml + sections[z].innerHTML;
		}
		Start();
	});
});
