function calcHeight(beiframe) {
  //find the height of the internal page
  var the_height=document.getElementById(beiframe).contentWindow.document.body.scrollHeight;
  //change the height of the iframe	  	 
  document.getElementById(beiframe).height=the_height;
//alert(beiframe + the_height);
}

var isIE = (navigator.appName.indexOf("Microsoft")!=-1)?  true:false;
function GetDocument(frameName) {
	if( isIE ){
		return document.frames[frameName].document;
	} else {
		return document.getElementById(frameName).contentDocument;
	}
}

var tm_AutoHeightFrame = null;

function AutoHeightFrame(frameName) {
	AutoHeightFrame1(frameName);
	if( tm_AutoHeightFrame == null ) {
		tm_AutoHeightFrame = setInterval(function(){AutoHeightFrame1(frameName);}, 200);
	}          
}

function AutoHeightFrame1(frameName) {
	var frm = document.getElementById(frameName);    
	if( frm == null ) return;
	var frameBody = GetDocument(frameName).body;
	if( frameBody == null ) return;
	var _height = frameBody.scrollHeight+10;
	frm.height = _height;
}    

function IframeOnload(frameName) {	
	AutoHeightFrame(frameName);
}

function menualatt(beertek) {	
	var xdiv = document.getElementById("fomenualatt");
	xdiv.style.top=beertek;
	fomenualatt.style.top=beertek;
}


