// DRE Version 01 - Release February 23, 2000
//

var popupURL;
top.window.name="BHcontent";

function removeHost(u) {
        var res = u;
        var str = ""+u;
        if(str.substring(0,7) == "http://") {
                var i;
                var len = str.length;
                for(i = 8;i < len;i++) {
                        if(str.substring(i,i+1) == "/") {
                                break;
                        }
                }
        res = str.substring(i,len);
        }
        return res;
}

function DreShowPopup() {
        var file = document.location.pathname;
        popupURL = "http://63.93.34.22/Scripts/bhsearch.exe?method=mainSuggests&docref=http://www.bostonherald.com"+file+"&db2=BHLocal";
        if( navigator.appName.substring(0,8) == "Netscape" ) {
                popup = window.open(popupURL,"DrePopup",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=480,height=170');
                setTimeout("popup.close();",1500);
                setTimeout("window.open(popupURL,'DrePopup','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=480,height=170');",2000);
        }
}

function DreShowPopup2() {
	page = document.location;
	var file = "?" + removeHost(page);
 	popupURL = "http://63.93.34.22/Scripts/bhsearch.exe?method=mainSuggests&docref="+page+"&db2=BHLocal";
	if(( navigator.userAgent.indexOf("MSIE") !=-1 ) || (navigator.userAgent == "")) {
		document.write('<TR><TD colspan=2>');
		document.write('<IFRAME NAME="floating" frameborder=0 width=460 height=140 SRC="' + popupURL + '"> </IFRAME>');
		document.write('</TD></TR>');
	}
}

