


function ValSearch() {
	if (document.searchform.Search.value == "" && document.searchform.Search2.value == "") {return}
	document.searchform.submit();
}

function ValSearch2() {
	if (document.phraseform.Search.value == "") {return}
	document.phraseform.results.value = document.searchform.results.options[document.searchform.results.selectedIndex].value;
	document.phraseform.submit();
}

function ValSearch3() {
	if (document.searchagain.Search.value == "") {return}
	document.searchagain.submit();
}




     NS4 = (document.layers);
     IE4 = (document.all);
    ver4 = (NS4 || IE4);
	 IE5 = (IE4 && navigator.appVersion.indexOf("5.")!=-1);
   isMac = (navigator.appVersion.indexOf("Mac") != -1);
  isMenu = (NS4 || (IE4 && !isMac) || (IE5 && isMac));
function popUp(){return};
function popDown(){return};
if (!ver4) event=null;




if (isMenu) {
menuVersion = 3;
menuWidth = 100;
childOverlap = 40;
childOffset = 5;
perCentOver = null;
secondsVisible = .5;
fntCol = "black";
fntSiz = "8";
fntBold = false;
fntItal = false;
fntFam = "Arial,sans-serif";
backCol = "#DECCCA";
overCol = "#F8E8A1";
overFnt = "purple";
borWid = 1;
borCol = "999999";
borSty = "solid";
itemPad = 3;
imgSrc = "tri.gif";
imgSiz = 10;
separator = 1;
separatorCol = "999999";
isFrames = false;
keepHilite = true; 
clickStart = false;
clickKill = true;
}




function book_onchange()
{
	if (document.searchform.book.value == 'None')
	{
		document.searchform.chapter.disabled=1;
		document.searchform.verse.disabled=1;
		//document.searchform.Search.focus();
		
	}
	else
	{
		document.searchform.chapter.disabled=0;
		document.searchform.verse.disabled=0;
		document.searchform.chapter.focus();
	}
}

function verify()
{
	
	var searchCriteria;
	var searchCriteria2 = "0";
	if(document.searchform.chapter.value == "" && document.searchform.verse.value == "")
	{
		searchCriteria = document.searchform.book[eval(document.searchform.book.options.selectedIndex)].value
	}
	else
	{
		if(document.searchform.verse.value != "" && document.searchform.chapter.value == "")
		{
			alert("You must choose a book chapter to view the verse.");
			return;
		}
		searchCriteria = document.searchform.book[eval(document.searchform.book.options.selectedIndex)].value 
		searchCriteria2 = document.searchform.chapter.value + ":" + document.searchform.verse.value;	
	}

	document.searchform.Search.value = searchCriteria;
	document.searchform.Search2.value = searchCriteria2;
	//alert(searchCriteria + "---" + searchCriteria2);
	document.searchform.submit();
}
function page(x)
{
	if(x == "b")
	{
		document.PageSearchBack.submit();
	}
	else
	{
		document.PageSearchForward.submit();
	}
}
function fncHelp(ID) {
	varStart = "<HTML><HEAD><TITLE>Help</TITLE><link rel='stylesheet' href='http://wacriswell.com/site.css' type='text/css'></HEAD><BODY BGCOLOR='#FFFFFF' onBlur='window.close();'><table cellpadding='0' cellspacing='0' border='0' width='100%'><tr><td>"
	varEnd = "</td></tr></table></BODY></HTML>"
	varHeadS = "<b>&raquo; <span class='BodyText'>"
	varHeadE = "</b></span>"
	varBodyS = ""
	varBodyE = ""
	
	switch (ID) {
		case 0 :
			str = varHeadS + "Help" + varHeadE + "<br><br>" + varBodyS + "<b>Online Help!</b><br><br>  If you have a question about a particular field, be sure to click the '?' icon for more details" + varBodyE;	break
		case 1 :
			str = varHeadS + "Online Help" + varHeadE + "<br><br>" + varBodyS + "<b>Tip</b><br><br>To find a selection in the list, select any option in the dropdown list, then press the first letter of the desired selection." + varBodyE; break
		case 2 :
			str = varHeadS + "Body" + varHeadE + "<br><br>" + varBodyS + "<b>Maximum Length: N/A</b><br><br>This is where the main text goes.  The text will retain your text formatting." + varBodyE; break
		default :
			str = varHeadS + "No Help Available" + varHeadE + "<br><br>" + varBodyS + "There is no currently no detailed help available for the item you selected." + varBodyE;	break
	} 
	varStr = varStart + str + varEnd
	fncWindow(varStr)
}
function fncWindow(str) {
	if (!newWindow || newWindow.closed) 
	{
		var newWindow;
		newWindow = window.open("","","height=200,width=300");
		if (!newWindow.opener) 
		{
			newWindow.opener = window
		}
		newWindow.document.write(str);
		newWindow.document.close();
		newWindow.focus();
	} 
	else {
		newWindow.close;
	}
}

function SetDays() {
	smonth = document.searchform.Smonth.options[document.searchform.Smonth.selectedIndex].value;
	syear = document.searchform.Syear.options[document.searchform.Syear.selectedIndex].value;
	sday = document.searchform.Sday.options[document.searchform.Sday.selectedIndex].value;
	
	emonth = document.searchform.Emonth.options[document.searchform.Emonth.selectedIndex].value;
	eyear = document.searchform.Eyear.options[document.searchform.Eyear.selectedIndex].value;
	eday = document.searchform.Eday.options[document.searchform.Eday.selectedIndex].value;;
	
	stotal = new Date(syear, smonth, 0 );
	etotal = new Date(eyear, emonth, 0 );
	s2day = stotal.getDate();
	e2day = etotal.getDate();
	
	if (sday > s2day) {document.searchform.Sday.options[document.searchform.Sday.selectedIndex].value = stotal.getDate();}
	
	if (eday > e2day) {document.searchform.Eday.options[document.searchform.Eday.selectedIndex].value = etotal.getDate();}
	
}
//-->

