    function changeUnit($measure) {
        $allps=document.getElementsByTagName('p');
        for ($i=0;$i<$allps.length;$i++) {
        $parag=$allps[$i];
        
        
            if ($parag.className=='metric') {
                if($measure=='metric') {
                    $parag.style.display='';
                }
                else {
                    $parag.style.display='none';
                }
            }
            if ($parag.className=='american') {
                if($measure=='american') {
                    $parag.style.display='';
                }
                else {
                    $parag.style.display='none';
                }
            }
        }
    }



function ReSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    $myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    $myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    $myHeight = document.body.clientHeight;
  }

    $mainh=document.getElementById('allcontent').offsetHeight;

    if ($mainh < $myHeight) {
        $footer=document.getElementById('footer').offsetHeight;
        $offset=$myHeight-$mainh;
        $newheight=$footer+$offset;
        document.getElementById('footer').style.height=$newheight+'px';
        document.getElementById('leftbottom').style.bottom=$newheight+'px';
    }
}


    function ChangeUrl($id) {
        $element=document.getElementById($id);
        if ($element.value!='') {
            window.location=$element.value;
        }
    }



    function showlangsel() {
        $element=document.getElementById('langsel');
        
        if ($element.style.display=='block') {
            $element.style.display="none";
        }
        else {
            $element.style.display="block";
        }
        return false;
    }


function hideAll($i) {
	var $j=1;

	while($j<=$i) {
		document.getElementById('info'+$j).style.display='none';
		$j++;
	}
}

function fixLeftBottom() {
	if (typeof document.body.style.maxHeight != "undefined") {
	  // IE 7, mozilla, safari, opera 9
	} 
	else {
	  document.getElementById('leftbottom').style.bottom='85px';
	}
}

// fixLeftBottom(); 
// ReSize();
changeUnit('metric');
