
// popup window for realplayer (new media window)
function newMediaWindow(url,customFeatures) {
    windowFeatures ='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=210,height=340,screenX=100,screenY=100,top=100,left=100';
    if ((customFeatures) && customfeatures != '') {
	windowFeatures = customFeatures;
    }

    nw(url,windowFeatures,'mediawin');
}
// popup window for clip transcripts/info (new info window)

function newInfoWindow(url,customFeatures) {
    windowFeatures = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=400,height=340,screenX=320,screenY=100,top=100,left=320';
    if ((customFeatures) && customfeatures != '') {
	windowFeatures = customFeatures;
    }

    nw(url,windowFeatures,'infowin');
}


function nw(url,windowFeatures,windowName) {


//Browser Detection
var browser = "";
var browsername = navigator.appName;
var browserversion = parseInt(navigator.appVersion);
var browserplatform = navigator.userAgent;
if (browsername == "Netscape") {
    browser = "ns" + browserversion;
} else {
    if (browsername == "Microsoft Internet Explorer") {
        if (browserversion >= 4) {
            browser = "ie" + browserversion;
        } else {
            browser = "ie3";
        }
    }
}

if (url.indexOf(".rm",(url.length-10)) != -1) {
	if (browser != 'ie3') {
		hasplugin = 'false';
		if ( (browserplatform.indexOf('Mac') !=-1) && ( browsername != "Netscape") )  {
			numPlugins = 0;
			for (i = 0; i < numPlugins; i++) {
				plugin = navigator.embeds[i];
				if (plugin.name.substring(0,10)=="RealPlayer") {
					hasplugin = 'true';
				}
			}
		} else {
			numPlugins = navigator.plugins.length;
			for (i = 0; i < numPlugins; i++) {
				plugin = navigator.plugins[i];
				if (plugin.name.substring(0,10)=="RealPlayer") {
					hasplugin = 'true';
				}
			}
		}
		if (browser.substring(0,2) == 'ie') {
			hasplugin = 'true';
		}
		if (hasplugin == 'true') {
			Win = window.open (url , windowName, windowFeatures);
		        Win.focus();
  		 	Win.document.close();		
		} else {
		stream = url.substring(0,(url.length-5));
		location.href=stream + '.ram';
		}
	} else {
		Win = window.open (url , windowName, windowFeatures);
	        Win.focus();
   		Win.document.close();			
	}		
} else {
	Win = window.open (url , windowName, windowFeatures);
        Win.focus();
        Win.document.close();
}
}

function dropdownGo(urlData) { 
//     var urlData = document.linkform.linkselect.options[document.linkform.linkselect.selectedIndex].value; 

     if (urlData.indexOf(",") != -1) {
          var urlComma=urlData.indexOf(",");

          self.location.href = urlData.substring(urlComma+1);
     } else {
          self.location.href = urlData;
     }
}

function dropdownStatusUpdate(urlData) {
//     var urlData = document.linkform.linkselect.options[document.linkform.linkselect.selectedIndex].value; 

     if (urlData.indexOf(",") != -1) {

          var urlComma=urlData.indexOf(",");

          self.status = urlData.substring(0,urlComma);
     } 
}
//now make sure you escape the line breaks...
var profileData = '\
<TR><TD bgcolor="#00379D">\
<A HREF="/archive/profindex.html"><IMG SRC="/bimage/lom-profilepulldown-top.gif" WIDTH=140 HEIGHT=32 BORDER=0 ALT=""></A></TD></TR>\
<TR><TD bgcolor="#00379D" align="center" valign="middle">\
<SPAN CLASS="dropdown"> \
<FORM NAME="linkform"> \
<SELECT NAME="linkselect"  onChange="dropdownStatusUpdate(document.linkform.linkselect.options[document.linkform.linkselect.selectedIndex].value)"> \
<OPTION VALUE="(home),/home.html" SELECTED>Select</OPTION>\
<OPTION VALUE="American Life League,/archive/american_life_league/">ALL</OPTION> \
<OPTION VALUE="Acquire the Fire/Teen Mania,/archive/teen_mania/">ATF</OPTION> \
<OPTION VALUE="Center for Bioethical Reform,/archive/bioethical_reform/" >CBR</OPTION> \
<OPTION VALUE="Center for Reclaiming America,/archive/reclaiming_america/">CFRA</OPTION> \
<OPTION VALUE="Focus on the Family,/archive/focus_on_the_family/">FOTF</OPTION> \
<OPTION VALUE="Family Research Council,/archive/family_research_council/">FRC</OPTION> \
<OPTION VALUE="Human Life International,/archive/human_life_international/">HLI</OPTION> \
<OPTION VALUE="Operation Rescue National,/archive/operation_rescue_national/">ORN</OPTION> \
<OPTION VALUE="More People and Organizations,/archive/">More</OPTION>  \
</SELECT> \
<INPUT TYPE="button" VALUE="Go" Name="LinkButton" onClick="dropdownGo(document.linkform.linkselect.options[document.linkform.linkselect.selectedIndex].value)"> \
<BR><A HREF="/archive/profindex.html"><IMG SRC="/bimage/lom-profilepulldown-bottom.gif" WIDTH=140 HEIGHT=20 BORDER=0 ALT=""></A>\
</FORM></SPAN></TD></TR>';

var recentEditionData = '\
<TR><TD bgcolor="#000000" align="center" valign="middle">\
<SPAN CLASS="dropdown"> \
<FORM NAME="pastform"> \
<SELECT NAME="pastselect"  onChange="dropdownStatusUpdate(document.pastform.pastselect.options[document.pastform.pastselect.selectedIndex].value)"> \
<OPTION VALUE="(home),/home.html" SELECTED>Select</OPTION>\
<OPTION VALUE="Four Themes of Biblical America,/0090/">0.9</OPTION> \
<OPTION VALUE="The Legitimization of the Inquisition,/0080/">0.8</OPTION> \
<OPTION VALUE="Choice: An Obsolete Strategy,/0070/">0.7</OPTION> \
<OPTION VALUE="Promise Keepers and the Process of Extremism,/0060/">0.6</OPTION> \
<OPTION VALUE="The Extremist in Rutherford\'s Closet,/0050/">0.5</OPTION> \
<OPTION VALUE="The Twisted Ethics of Bernard Nathanson,/0040/">0.4</OPTION> \
</SELECT> \
<INPUT TYPE="button" VALUE="Go" Name="LinkButton" onClick="dropdownGo(document.pastform.pastselect.options[document.pastform.pastselect.selectedIndex].value)"> \
</FORM></SPAN></TD></TR>'


