function abopenterm(inURL) {	var thefeatures = "scrollbars,resizable,width=425,height=300";	var mwin = window.open(inURL,"keyterm",thefeatures);	if (mwin != null) {		mwin.focus();	}	return false;}function abopenfootnote(inURL) {	var thefeatures = "scrollbars,resizable,width=425,height=300";	var mwin = window.open(inURL,"footnote",thefeatures);	if (mwin != null) {		mwin.focus();	}	return false;}function abopenpopup(inURL) {	var thefeatures = "scrollbars,resizable,width=600,height=500";	var mwin = window.open(inURL,"popup",thefeatures);	if (mwin != null) {		mwin.focus();	}	return false;}function abopenpopupWH(inURL,inW,inH) {	var thefeatures = "scrollbars,resizable,width=" + inW + ",height=" + inH;	var mwin = window.open(inURL,"popup",thefeatures);	if (mwin != null) {		mwin.focus();	}	return false;}function abopengeneric(inURL) {	var thefeatures = "scrollbars,resizable,width=600,height=500";	var mwin = window.open(inURL,"popup",thefeatures);	if (mwin != null) {		mwin.focus();	}	return false;}function abopensearch(inURL) {	var thefeatures = "scrollbars,menubar,toolbar,location,status,resizable,width=500,height=600";	var mwin = window.open(inURL,"searchwin",thefeatures);	if (mwin != null) {		mwin.focus();	}	return false;}function openwin(inURL) {	var thefeatures = "scrollbars,menubar,toolbar,location,status,resizable,width=650,height=400";	var mwin = window.open(inURL,"thewin",thefeatures);	if (mwin != null) {		mwin.focus();	}}function openwintitle(inURL,inTitle) {	var thefeatures = "scrollbars,menubar,toolbar,location,status,resizable,width=650,height=400";	var mwin = window.open(inURL,inTitle,thefeatures);	if (mwin != null) {		mwin.focus();	}}function openwintitleWH(inURL,inTitle,inW,inH) {	var thefeatures = "scrollbars,menubar,toolbar,location,status,resizable,width=" + inW +",height=" + inH;	var mwin = window.open(inURL,inTitle,thefeatures);	if (mwin != null) {		mwin.focus();	}}function openwinrand(inURL) {	var inTitle = "win" + Math.round(Math.random()*1000);	var thefeatures = "scrollbars,menubar,toolbar,location,status,resizable,width=650,height=400";	var mwin = window.open(inURL,inTitle,thefeatures);	if (mwin != null) {		mwin.focus();	}}function openwinrandWH(inURL,inW,inH, inOn) {	var inTitle = "win" + Math.round(Math.random()*1000);	var thefeatures;	if (inOn == null) inOn = 1;	if (inOn == 1) {		thefeatures = "scrollbars,menubar,toolbar,location,status,resizable,width=" + inW +",height=" + inH;	} else {		thefeatures = "scrollbars,resizable,width=" + inW +",height=" + inH;	}	var mwin = window.open(inURL,inTitle,thefeatures);	if (mwin != null) {		mwin.focus();	}}function jumptopage(invid, inbcid) {	var theurl = 'abpage.cfm?vbcid=' + inbcid + '&vid=' + invid;	if (opener != null) {		opener.location=theurl;	} else {		window.open(theurl,"","scrollbars,menubar,toolbar,location,status,resizable,width=800,height=600");	}	return false;}function jumptopagehash(invid, inbcid, inhash) {	var theurl = 'abpage.cfm?vbcid=' + inbcid + '&vid=' + invid + '#' + inhash;	if (opener != null) {		opener.location=theurl;	} else {		window.open(theurl,"","scrollbars,menubar,toolbar,location,status,resizable,width=800,height=600");	}	return false;}function ab2jumptopagehash(invid, inbcid, inhash) {	var theurl = 'ab2page.cfm?vbcid=' + inbcid + '&vid=' + invid + '#' + inhash;	if (opener != null) {		opener.location=theurl;	} else {		window.open(theurl,"","scrollbars,menubar,toolbar,location,status,resizable,width=800,height=600");	}	return false;}function ab2jumptopagehashfocus(invid, inbcid, inhash, infocus) {	var theurl = 'ab2page.cfm?vbcid=' + inbcid + '&vid=' + invid + '#' + inhash;	if (infocus == null) {		infocus = 1;	}	if (opener != null) {		opener.location=theurl;		if (infocus) {			opener.focus();		}	} else {		window.open(theurl,"","scrollbars,menubar,toolbar,location,status,resizable,width=800,height=600");	}	return false;}// this function goes to the hash if opener is the page otherwise it replaces opener// with the new page and moves to the hash. If opener is null it pops a new page.function ab2gotopagehash(inid, inbcid, inobjid, infocus) {	var thepage;	var thehash = "";	var theshash = "";	var thewin;	if (inid == null) {		inid = 0;	}	if (inbcid == null) {		inbcid = 0;	}	if ((inobjid == null) || (inobjid == 0)) {		inobjid = 0;	} else {		inobjid = parseInt(inobjid);		theshash = "oa" + inobjid;		thehash = "#oa" + inobjid;	}	if (infocus == null) {		infocus = 0;	}	if (opener) {		try {			var thepathname = opener.location.pathname;			var thesearch = opener.location.search;			var therepath = new RegExp("/ab2page.cfm");			var therevid = new RegExp("vid=([0-9]+)");			var therevbcid = new RegExp("vbcid=([0-9]+)");			if (therepath.test(thepathname)) {				var thevid = therevid.exec(thesearch);				var thevbcid = therevbcid.exec(thesearch);				if (thevid && thevbcid) {					if ((thevid[1] == inid) && (thevbcid[1] == inbcid)) {						opener.location.hash = theshash;						if (infocus) {							opener.focus();						}					} else {						thepage = "ab2page.cfm?vid=" + inid + "&vbcid=" + inbcid + thehash;						opener.location.href = thepage;						if (infocus) {							opener.focus();						}					}				} else {					thepage = "ab2page.cfm?vid=" + inid + "&vbcid=" + inbcid + thehash;					opener.location.href = thepage;					if (infocus) {						opener.focus();					}				}			} else {				thepage = "ab2page.cfm?vid=" + inid + "&vbcid=" + inbcid + thehash;				opener.location.href = thepage;				if (infocus) {					opener.focus();				}			}		} catch (e) {			//alert("In Catch: " + e);			thepage = "ab2page.cfm?vid=" + inid + "&vbcid=" + inbcid + thehash;			thewin = openwinrand(thepage);			if (infocus) {				thewin.focus();			}		}	} else {		thepage = "ab2page.cfm?vid=" + inid + "&vbcid=" + inbcid + thehash;		thewin = openwinrand(thepage);		if (infocus) {			thewin.focus();		}	}}// this function moves opener goes to the chapter. If opener is null it pops a new page.function ab2gotochapter(inbookid, inbcid, infocus) {	var thechapter;	var thewin;	if (inbookid == null) {		inid = 0;	}	if (inbcid == null) {		inbcid = 0;	}	if (infocus == null) {		infocus = 0;	}	if (opener) {		try {			var thepathname = opener.location.pathname;			if (thepathname) {				thepage = "ab2chapter.cfm?vbookid=" + inbookid + "&vbcid=" + inbcid;				opener.location.href = thepage;				if (infocus) {					opener.focus();				}			} else {				thepage = "ab2chapter.cfm?vbookid=" + inbookid + "&vbcid=" + inbcid;				thewin = openwinrand(thepage);				if (infocus) {					thewin.focus();				}			}		} catch (e) {			//alert("In Catch: " + e);			thepage = "ab2chapter.cfm?vbookid=" + inbookid + "&vbcid=" + inbcid;			thewin = openwinrand(thepage);			if (infocus) {				thewin.focus();			}		}	} else {		thepage = "ab2chapter.cfm?vbookid=" + inbookid + "&vbcid=" + inbcid;		thewin = openwinrand(thepage);		if (infocus) {			thewin.focus();		}	}}
