
function showMenu(targetId,imgId){ 
  if (document.getElementById){ 
	var target = document.getElementById(targetId);
	var image = document.getElementById(imgId);
	var imgId= "greenArrow";
	//var on = document.getElementById(onStateId);
		if (target.style.display == "none"){ 
			target.style.display = "block";
			image.src = "../images/global/"+imgId+"_down.gif";
    	}	
		else{
			target.style.display = "none";	
			image.src = "../images/global/"+imgId+"_right.gif";
		}
	} 
}

get_element = document.all ?
function (s_id) { return document.all[s_id] } :
function (s_id) { return document.getElementById(s_id) };

function getHeight(name) {    
	var tmpElem = get_element(name);
	if(tmpElem.currentStyle) return tmpElem.offsetHeight;       
	else return parseInt(document.defaultView.getComputedStyle(tmpElem, "").getPropertyValue("height"));   
}

function setHeight(name) {
	var tmpElem = get_element(name);
	var height = getHeight(name);
	
	
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	  /*alert( 'Width = ' + myWidth );
	  alert( 'Height = ' + myHeight ); */
	
	if(height>=myHeight)
		tmpElem.style.height = height+"px";
	else tmpElem.style.height = myHeight+"px";
}

function clickButton(e, buttonid)
{ 
      var evt = e ? e : window.event;
      var bt = document.getElementById(buttonid);

      if (bt)
      { 
          if (evt.keyCode == 13)
          { 
                bt.click(); 
                return false; 
          } 
      } 
}


