/*-------------------------------------------------------------------------
(c) Evangelical Lutheran Church in America

1.) function topic
	definition: instantiates topics that appear in the dropdown menu.

	args[]:	(2) passed from makeTopic

2.) function makeTopic
	definition: puts selectedTopics array into plain english, and
	takes the burden off the author of having to type in the array
	count (stored as topicCount)

	args[]:	topic_name, name of topic to appear in dropdown list
		topic_url, url to be accessed on dropdown select
-------------------------------------------------------------------------*/

var selectedTopics = new Array();
var bulletin = new Array();
var topicCount = 0;

function topic( topic_name, topic_url ) {
	this.name = topic_name;
	this.url = topic_url;
}

function makeTopic( topic_name, topic_url ) {
	selectedTopics[topicCount++] = new topic( topic_name, topic_url );
}







/*-------------------------------------------------------------------------
To insert a new topic into the dropdown menu:

makeTopic( "[TEXT TO APPEAR IN SELECT INPUT]", "[URL TO BE ACCESSED]" );

Important: Use the escape character ("\") before any quotes or
apostrophes in either field.
Do not use line breaks.
-------------------------------------------------------------------------*/




makeTopic( "Advocacy / Public Church", 	"http://archive.elca.org/advocacy" );
makeTopic( "Bible / Prayer", 	        "http://archive.elca.org/spiritual.html" );
makeTopic( "Camps & Retreat Centers", 	"http://archive.elca.org/dcm/camps/" );
makeTopic( "Careers / Jobs", 		"http://archive.elca.org/hr/career.html" );
makeTopic( "Churchwide Assembly", 		"http://archive.elca.org/assembly/05" );
makeTopic( "Disaster Response",		"http://archive.elca.org/disaster/" );
makeTopic( "Education incl. Seminaries","http://archive.elca.org/education.html" );
makeTopic( "Ecumenical / Interfaith",    "http://archive.elca.org/ecumenical" );
makeTopic( "Evangelizing Church",		"http://archive.elca.org/evangelizingchurch" );
makeTopic( "Financial Resources",	"http://archive.elca.org/financial.html" );
makeTopic( "Forms", 			"http://archive.elca.org/forms.html" );
makeTopic( "Giving Opportunities",	"http://archive.elca.org/givingbasket" );
makeTopic( "Global Mission", 		"http://archive.elca.org/globalmission/" );
makeTopic( "Hunger", 		        "http://archive.elca.org/hunger/" );
makeTopic( "Library", 			"http://archive.elca.org/library/library.html" );
makeTopic( "Men\'s Ministry",		"http://archive.elca.org/lmm/" );
makeTopic( "Multicultural Ministry", 	"http://archive.elca.org/multicultural/" );
makeTopic( "News / Events / Calendar", 	"http://archive.elca.org/newsevents.html" );
makeTopic( "Planning for Mission",	"http://archive.elca.org/planning" );
makeTopic( "Radio / TV / Audio",	"http://archive.elca.org/co/broadcast.html" );
makeTopic( "Rural / Small Town",	                "http://archive.elca.org/rural" );
makeTopic( "Stewardship", 		"http://archive.elca.org/dcm/stewardship" );
makeTopic( "Studies on Sexuality", 	"http://archive.elca.org/faithfuljourney" );
makeTopic( "Synods and Regions", 	"http://archive.elca.org/sr/regions.and.synods.html" );
makeTopic( "Women\'s Organization", 	"http://www.womenoftheelca.org" );
makeTopic( "Worship", 			"http://archive.elca.org/dcm/worship/default.asp" );
makeTopic( "Young Adults", 		"http://archive.elca.org/youngadults/" );
makeTopic( "Youth & Family Ministry", 	"http://archive.elca.org/youthandfamily.html" );









if (window!= top) top.location.href=location.href;

document.write("<table align=left border=0 cellpadding=0 cellspacing=0 width=760 bgcolor='#CC0000'>");
document.write("<tr><td align=left valign=top width=66><a href=http://www.elca.org><IMG SRC=/images/commonemblem.gif alt='Return to the current ELCA.org' WIDTH=66 HEIGHT=63 BORDER=0></a></td><td align=left valign=top style='background-color: #FFFFFF' width=228><a href=http://archive.elca.org><img border=0 SRC=/graphics/elca1b.gif alt='Return to the current ELCA.org'></a></td>");
document.write("<td align=right valign=top style='background-color: #FFFFFF'>");
document.write("<table border=0 cellpadding=0 cellspacing=0 style='border-collapse: collapse' bordercolor=#111111 bgcolor=#FFFFFF>");
document.write("<tr><td colspan=2><img border=0 src=/graphics/clear.gif width=12 height=10></td></tr>");
document.write("<tr><td colspan=2 style='background-color: #FFFFFF'><p align='center'><span class='navigation'><a href='http://www.elca.org'>Home</a>&nbsp; &nbsp; |&nbsp;&nbsp;&nbsp; <a href='http://archive.elca.org/findachurch.html'>Locate a Church</a>&nbsp;&nbsp; |&nbsp;&nbsp;     <a href='http://archive.elca.org/contactus.html'>Contact</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;     <a href='http://archive.elca.org/help.html'>Help</a></span></td></tr>");
document.write("<tr><td colspan='2'><img border='0' src='/graphics/clear.gif' width='4' height='4'></td></tr>");
document.write("<tr><td>");

//"ScriptLib support of < FORM > tags"
if (typeof(document.thisForm) != 'object'){
	document.write("<form style='margin:0px'>");
}
document.write("<select style='width:170px; text-decoration:none; background-color:#FFFFFF; font-variant:normal; font-family:Arial, Helvetica, sans-serif; font-size:12px' name=url size=1 ");
document.write("onchange=\"if( options[selectedIndex].value ) document.location = options[selectedIndex].value\">");
document.write("<option value='http://archive.elca.org' selected>Selected Topics</option>");

for (i=0; i < topicCount; i++) {
	document.write("<option value="+selectedTopics[i].url+">"+selectedTopics[i].name+"</option>");
}

function goSearch() {
//"ScriptLib support of < FORM > tags"
	if (typeof(document.thisForm) == 'object'){
		var n = thisForm.q.value;
		if(n=="Search") {location.href="http://www.google.com/u/ELCAorg";}
		else {location.href="http://www.google.com/u/ELCAorg?q="+escape(n);}
	}else{
		var n = sf.q.value;
		if(n=="Search") {location.href="http://www.google.com/u/ELCAorg";}
		else {sf.submit();}
	}
}

var noValue = "";
document.write("</select>");
//"ScriptLib support of < FORM > tags"
if (typeof(document.thisForm) == 'object'){
	document.write("<img border=0 src=/graphics/clear.gif width=6 height=6></td><td>");
	document.write("<input name='q' TYPE='text' style='line-height:14px; margin-left:5px; width:131px; font-family:Arial, Helvetica, sans-serif; font-size:12px' value='Search' alt='search' size='20' onclick='this.value=noValue'><input type='button' onclick='goSearch();' value='GO' name='go' style='font-family: Arial, Helvetica, sans-serif; line-height:14px; font-size: 12px; font-weight: bold; color:#666666'>");
}else{
	document.write("<img border=0 src=/graphics/clear.gif width=6 height=6></form></td><td>");
	document.write("<form name='sf' method='GET'action='http://www.google.com/u/ELCAorg' style='display:inline; font-size:1px; line-height:1px;'><input name='q' TYPE='text' style='line-height:14px; margin-left:5px; width:131px; font-family:Arial, Helvetica, sans-serif; font-size:12px' value='Search' alt='search' size='20' onclick='this.value=noValue'><input type='button' onclick='goSearch();' value='GO' name='go' style='font-family: Arial, Helvetica, sans-serif; line-height:14px; font-size: 12px; font-weight: bold; color:#666666'></form>");
}
document.write("</td></tr></table>");

document.write("</td></tr>");
document.write("</table>");