var browser=navigator.appName;
var arVersion = navigator.appVersion.split("MSIE");
var version = parseFloat(arVersion[1]);

function ShowDropDown(Obj, MenuObj) {

	sname = document.getElementById(MenuObj+'_link').innerHTML;
  document.getElementById(Obj+'_name').innerHTML = sname;
	
	// Position setup
	
	if (browser == 'Microsoft Internet Explorer') { 
		
		if (version == 8) { // there are some differences between ie8 and other browsers in terms of positioning
			wxpos = -7;	
			wypos = 10;
		}
	
		if (version == 7) { // there are some differences between ie7 and other browsers in terms of positioning
			wxpos = parseInt(document.getElementById("WebSite").offsetLeft)+9;	
			
			wypos = parseInt(document.getElementById("Header").offsetHeight)+5;
	
		}
	}	
	else { // some adjusmets for drop downs position
		wxpos = -6;	
		wypos = 9;
	}
	
	if (document.getElementById(MenuObj).className == 'first') {
		wxpos = wxpos-15;
	}
	
	xpos = parseInt(document.getElementById(MenuObj).offsetLeft)+wxpos;
	ypos = parseInt(document.getElementById(MenuObj).offsetTop)+wypos;

	document.getElementById(Obj).style.left = xpos+'px';
	document.getElementById(Obj).style.top = ypos+'px';

	// end position setup
	
	document.getElementById(Obj).style.display='block';
	
	document.getElementById(Obj+'_name').onclick = function() {
		window.location=document.getElementById(MenuObj+'_link').href;
	}
	
}

function HideDropDown(Obj) {
	
	document.getElementById(Obj).style.display = 'none';
	
}


