var iframeName;var iframeWindowElement;var iframeWindowDiv;var progressBarDiv;var fadingDiv;function init(){goTo('top');iframeName="iframeWindow";iframeWindowElement=document.getElementById(iframeName);iframeWindowDiv=document.getElementById(iframeName+"Div");progressBarDiv=document.getElementById('progressBarDiv');fadingDiv=document.getElementById('fadingDiv');iframeWindowDiv.style.left=parseInt(getAbsolutePosition(document.getElementById('border')).x)+7+'px';iframeWindowDiv.style.top=parseInt(getAbsolutePosition(document.getElementById('border')).y)+'px';}
var showIframeDiv=function(){progressBarDiv.style.display="none";progressBarDiv.style.height=0+"px";fadingDiv.style.display="block";iframeWindowDiv.style.display="block";var iframeWindowDocument=window.frames[iframeName].document;iframeWindowElement.style.height=getDocHeight(iframeWindowDocument)+50+"px";fadingDiv.style.height=Math.max(getDocumentSize(document).height,parseInt(iframeWindowElement.style.height)+getAbsolutePosition(iframeWindowDiv).y+40)+20+"px";}
function getDocHeight(doc){var docHt=0,sh,oh;if(doc.height)docHt=doc.height;else if(doc.body){if(doc.body.scrollHeight)docHt=sh=doc.body.scrollHeight;if(doc.body.offsetHeight)docHt=oh=doc.body.offsetHeight;if(sh&&oh)docHt=Math.max(sh,oh);}
return parseInt(docHt);}
function hideUrlFrame(){fadingDiv.style.display="none";iframeWindowDiv.style.display="none";fadingDiv.style.height=0+"px";}
function openUrlFrame(){init();var url=openUrlFrame.arguments[0];progressBarDiv.style.height=getDocumentSize(document).height+"px";progressBarDiv.style.display="block";iframeWindowElement.src=url;if(iframeWindowElement.addEventListener){iframeWindowElement.addEventListener("load",showIframeDiv,false);}else{iframeWindowElement.attachEvent("onload",showIframeDiv);}}
