function menushow(element) {
  var ulelement = element.lastChild;
	var aelement = element.firstChild;
  if (ulelement.tagName == 'UL') {
    var act = ulelement;
  }
  else {
    act = false;
  }
  
	if (act) {
		var classname = element.className;
		
		var instring = classname.search('active_sub');
		
		var active_sub = document.getElementById('active_sub');
						
		if (instring != -1) {
			aelement.style.backgroundPosition = '0 -100%';					
			element.lastChild.style.display = 'block';
			element.style.height = '20px';
		} else {
			act.style.display = 'block';
			
			if (active_sub) {
				active_sub.lastChild.style.display = 'none';
				active_sub.firstChild.style.backgroundPosition = '0 -200%';
			}
			
			aelement.style.backgroundPosition = '0 -100%';
			element.style.height = '20px';
		}
  }
}

function menuhide(element) {
  var ulelement = element.lastChild;
	var aelement = element.firstChild;
  if (ulelement) {
    if (ulelement.tagName == 'UL') {
      var act = ulelement;
    }
    else {
      act = false;
    }
    if (act) {
			var classname = element.className;
			
			var instring = classname.search('active_sub');
		
			var active_sub = document.getElementById('active_sub');
		
			if (instring != -1) {
				aelement.style.backgroundPosition = '0 -100%';
				element.style.height = '20px';
				element.lastChild.style.display = 'none';
			} else {
				aelement.style.backgroundPosition = '0 0';
				
				if (active_sub) {
					active_sub.lastChild.style.display = 'none';
					active_sub.firstChild.style.backgroundPosition = '0 -100%';
				}
				
				act.style.display='none';
				element.style.zIndex = '10';
				element.style.height = '20px';
			}
    }
  }
}




function menushowlang(element) {

  ulelement = element.lastChild;
  if (ulelement.tagName == 'UL') {
    act = ulelement;
  }else {
    act = false;
  }

    if (act) {
    act.style.display='block';  
  }
}



function menuhidelang(element) {
  ulelement = element.lastChild;
  if (ulelement) {
    if (ulelement.tagName == 'UL') {
      act = ulelement;
    }else {
      act = false;
    }
    if (act) {
      act.style.display='none';
    }
  }
}
