// Flash detection////////////
var swfTester = false;
var agt=navigator.userAgent.toLowerCase();
var ie  = (agt.indexOf("msie") != -1);
var ns  = (navigator.appName.indexOf("Netscape") != -1);
var win = ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));
var mac = (agt.indexOf("mac")!=-1);
if (ie && win) {pluginlist = detectIE("ShockwaveFlash.ShockwaveFlash.1","Shockwave Flash") ; }
if (ns || !win) {nse = ""; for (var i=0;i<navigator.mimeTypes.length;i++) nse += navigator.mimeTypes[i].type.toLowerCase();pluginlist = detectNS("application/x-shockwave-flash","Shockwave Flash");}
function detectIE(ClassID,name) {result = false;document.write('<SCRIPT LANGUAGE=VBScript>\n on error resume next \n result = IsObject(CreateObject("'+ClassID+'"))<\/SCRIPT>\n'); if (result){return name+',';}else{return '';}}
function detectNS(ClassID,name) { n = "";if (nse.indexOf(ClassID) != -1){if (navigator.mimeTypes[ClassID].enabledPlugin != null){n = name+",";}return n;}}
pluginlist += navigator.javaEnabled() ? "Java," : "";
if (pluginlist.length > 0) pluginlist = pluginlist.substring(0,pluginlist.length-1);
if (pluginlist.indexOf("Flash")!=-1){swfTester = true;}
/////////////////////////////
function shMv(theName,wdth,hght,theID){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" name="' + theID +'"width="'+ wdth + '"height="' + hght + '"id="' + theID +'">\n');
document.write('<param name="movie" value="' + theName +'">\n');
document.write('<param name="quality" value="high">\n');
document.write('<param name="menu" value="false">\n');
document.write('<embed src="' + theName +'"width="'+ wdth + '"height="' + hght + '"quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="' + theID +'"></embed>\n');
document.write('</object>\n')}
function shMvT(theName,wdth,hght,theID){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" name="' + theID +'"width="'+ wdth + '"height="' + hght + '"id="' + theID +'">\n');
document.write('<param name="movie" value="' + theName +'">\n');
document.write('<param name="quality" value="high">\n');
document.write('<param name="menu" value="false">\n');
document.write('<param name="wmode" value="transparent">\n');
document.write('<embed src="' + theName +'"width="'+ wdth + '"height="' + hght + '"wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="' + theID +'"></embed>\n');
document.write('</object>\n')}
function shMvFS(theName,wdth,hght,theID){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" name="' + theID +'"width="'+ wdth + '"height="' + hght + '"id="' + theID +'">\n');
document.write('<param name="movie" value="' + theName +'">\n');
document.write('<param name="quality" value="high">\n');
document.write('<param name="allowFullScreen" value="true">\n');
document.write('<param name="menu" value="false">\n');
document.write('<embed src="' + theName +'"width="'+ wdth + '"height="' + hght + '"quality="high" "allowFullScreen="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="' + theID +'"></embed>\n');
document.write('</object>\n')}
function player(theName,wdth,hght,theID){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" name="' + theID +'"width="'+ wdth + '"height="' + hght + '"id="' + theID +'">\n');
document.write('<param name="movie" value="' + theName +'">\n');
document.write('<param name="quality" value="high">\n');
document.write('<param name="allowFullScreen" value="true">\n');
document.write('<param name="menu" value="false">\n');
document.write('<embed src="' + theName +'"width="'+ wdth + '"height="' + hght + '"quality="high" "allowFullScreen="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="' + theID +'"></embed>\n');
document.write('</object>\n')}
function doAlert(msg){alert(msg);}
function getFile(url,settings){window.open(url,'',settings);}
function getContact(settings){
	if( navigator.appName == "Microsoft Internet Explorer"){
		url = "http://www.arewelivinginthelastdays.com/contact.cfm";
	}else{url = "http://www.arewelivinginthelastdays.com/contactm.cfm";}
	window.open(url,'',settings);}
function doAction(pg){
if(navigator.appName != "Netscape"){
	document.apromo.GotoFrame(2);
	}else{document.embeds["apromo"].GotoFrame(2);}
if(screen.height < 850){
	var theSettings = 'toolbar=no,location=no,status=no,menubar=no,resizable=no,scrollbars=no,width=980,height=' + screen.height;}
else{var theSettings = 'toolbar=no,location=no,status=no,menubar=no,resizable=no,scrollbars=no,width=980,height=760';}
getFile(pg,theSettings);}
function footer(){if(screen.height > 1000){document.write('<tr valign="bottom"><td height="20" background="imgs/pageFooterBG.gif"><div align="center"  style="font-family: Arial, Helvetica, sans-serif;font-size: 11px; color:#777777; letter-spacing:5px;">For the testimony of Jesus is the spirit of prophecy Rev.19:10</div></td></tr>');}}
function footerSub(){if(screen.height > 1000){document.write('<tr valign="bottom"><td height="20" background="../imgs/pageFooterBG.gif"><div align="center"  style="font-family: Arial, Helvetica, sans-serif;font-size: 11px; color:#777777; letter-spacing:5px;">For the testimony of Jesus is the spirit of prophecy Rev.19:10</div></td></tr>');}}
function footerSubII(){if(screen.height > 1000){document.write('<tr valign="bottom"><td height="20" background="../../imgs/pageFooterBG.gif"><div align="center"  style="font-family: Arial, Helvetica, sans-serif;font-size: 11px; color:#777777; letter-spacing:5px;">For the testimony of Jesus is the spirit of prophecy Rev.19:10</div></td></tr>');}}
function articalAlert(){
	var tester = true;
	var msg = "Please enter:\n";
	if(document.getElementById("fname").value == ""){tester = false; msg = msg + "First Name\n";}
	if(document.getElementById("lname").value == ""){tester = false; msg = msg + "Last Name\n";}
	if(document.getElementById("email").value == ""){tester = false; msg = msg + "Email Address\n";}
	if(tester){
		document.signup.fn.value = document.getElementById("fname").value;
		document.signup.ln.value = document.getElementById("lname").value;
		document.signup.em.value = document.getElementById("email").value;
		document.getElementById("fname").value = "";
		document.getElementById("lname").value = "";
		document.getElementById("email").value = "";
		document.signup.submit();
	}else{alert(msg);}
}
function dosize(){
if(document.documentElement.clientWidth != 980){
	if(screen.height < 850){window.parent.resizeTo(980, screen.height);}else{window.parent.resizeTo(980, 930);}
}
//var tt = "W: " + document.documentElement.clientWidth + " H: " + document.documentElement.clientHeight;
//alert(tt);
}
function dostring(url,settings){
	window.location.href = "default.htm";
	window.open(url,'',settings);
	}
function dos(){document.getElementById("fb").style.display = "block";}
function stringContact(){
	var tester = true;
	var msg = "Please enter:\n";
	if(document.getElementById("name").value == ""){tester = false; msg = msg + "Name\n";}
	if(document.getElementById("email").value == ""){tester = false; msg = msg + "Email Address\n";}
	if(tester){
		document.fb.submit();
		document.getElementById("fb").style.display = "none";
		document.getElementById("name").value = "";
		document.getElementById("email").value = "";
		document.getElementById("theUrl").value = "";
		document.getElementById("info").value = "";
	}else{alert(msg);}
}
function dotrey(){
if( navigator.appName == "Microsoft Internet Explorer"){
	document.write('<div id="theTrey" style="position:absolute; width:329px; height:750px; z-index:2; overflow:auto; padding-left:9px;">');
	}else{
		document.write('<div id="theTrey" style="position:absolute; width:320px; height:750px; z-index:2; overflow:auto; padding-left:9px;">');
	}
}
function stopPromo(){
	if(navigator.appName != "Netscape"){
	document.apromo.GotoFrame(2);
	}else{document.embeds["apromo"].GotoFrame(2);}
}