 var bodyHeight;
function popup(e) { var newsrc=this.href; if(newsrc.indexOf("#") < 0) newsrc +="#container"; document.getElementById("container").style.display="none"; document.getElementById("atheader").style.display="none";
var html='<iframe id="popups" src="' + newsrc + '" FRAMEBORDER=0 SCROLLING=NO style="background-color:black;scrolling=\'no\';"></iframe>'; $("body").prepend(html); bodyHeight=$("body").css("height"); $("body").css("height","100%"); $("html").css("overflow","auto"); return false; }
function attachPopup() { if (location && location.href && location.href.substring && location.href.indexOf) { var myHost=location.href.substring( 0, location.href.indexOf('/', 9) ); if (document.getElementsByTagName) { var anchors=document.getElementsByTagName("a"); if (anchors) { for (var i in anchors) { var anchor=anchors[i]; if ( anchor && anchor.target && anchor.target.toLowerCase()=="_blank" && anchor.href && anchor.href.length > 0 && anchor.href.substring(0, myHost.length)==myHost && anchor.href.indexOf("html")>0) { anchor.onclick=popup; } } } } } } attachPopup(); setTimeout("scrollToBookmark()","1000");
function hideIframe() { $("body").css("height", bodyHeight); $("html").css("overflow","scroll"); if(document.getElementById('popups')) { var ifr=document.getElementById('popups'); ifr.parentNode.removeChild(ifr); } else { window.close(); } contnd=document.getElementById("container"); contnd.style.display="block"; contnd=document.getElementById("atheader"); contnd.style.display="block"; }
function scrollToBookmark() { var id=getParamValue("scroll");
var scrollTo=pos(id)-pos("TitleAndImageContainer")-($("TitleAndImageContainer").height()); if(document.getElementById(id) !=null) $("div.scroll").attr("scrollTop", scrollTo-55); };
function getParamValue( name ) { name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS="[\\?&]"+name+"=([^&#]*)";
var regex=new RegExp( regexS );
var results=regex.exec( document.location.href ); if( results==null ) return ""; else return results[1]; };
function pos(obj) { objTop=0; if(document.getElementById(obj) !=null) { var temp=document.getElementById(obj); while (temp.offsetParent) { objTop +=temp.offsetTop; temp=temp.offsetParent } } return objTop; };

