function getAbsoluteTop(objectId) {
 // Get an object top position from the upper left viewport corner
 // Tested with relative and nested objects
 o = document.getElementById(objectId)
 oTop = o.offsetTop            // Get top position from the parent object
 while(o.offsetParent!=null) { // Parse the parent hierarchy up to the document element
  oParent = o.offsetParent  // Get parent object reference
  oTop += oParent.offsetTop // Add parent top position
  o = oParent
 }
 // Return top position
 return oTop
}

function setIframeHeight(IframeName, layerName){
	var pos = getAbsoluteTop(layerName);
	parent.document.getElementById(IframeName).style.height = pos+"px";
}


function showFlash(w,h,swf){
	embedStr = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + w + '" height="' + h + '" id="flashmovie" align="middle"><param name="scale" value="noscale" /><param name="salign" value="lt" /><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="' + swf + '" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><EMBED src="' + swf + '" quality=high bgcolor=#FFFFFF  WIDTH="' + w + '" HEIGHT="' + h + '" NAME="flashmovie" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" scale="noscale" salign="lt"><\/EMBED><\/OBJECT>';
	document.write(embedStr);
}