﻿<!-- Browser Check -->
	iens6=document.all||document.getElementById
	ns4=document.layers
<!--PLACE ALL YOUR BOX CONTENT HERE - Make sure you use a += after the first line -->
	var linkArray = new Array

	<!-- About us -->
	linkArray[1]=buildLink("Mission & History","mission.html")
	linkArray[1]+=buildLink("Staff","staff.html")
	linkArray[1]+=buildLink("Board","board.html")
	linkArray[1]+=buildLink("Friends","friends.html")
	linkArray[1]+=buildLink("Contact Us","contact_us.html")
	<!-- Cool Congregations -->	
	linkArray[2]=buildLink("Welcome","cc_welcome.html")
	linkArray[2]+=buildLink("Mission & History","cc_mission.html")
	linkArray[2]+=buildLink("Success Stories","cc_success_stories.html")
	linkArray[2]+=buildLink("Calendar","cc_calendar.html")
	linkArray[2]+=buildLink("Carbon Calculator","cc_carbon_calc.html")	
	<!-- News -->
	linkArray [3]=buildLink("Upcoming Events","calendar.html")
	linkArray [3]+=buildLink("Climate News","climate_news.html")
	linkArray [3]+=buildLink("Newsletter Archives","newsletter.html")
	linkArray [3]+=buildLink("IowaIPL in the News","IPLNews.html")
	
	<!-- Resources -->
	linkArray [4]=buildLink("Science of Global Warming","global_warming.html")
	linkArray [4]+=buildLink("Climate Change & Iowa","climate_change.html")
	linkArray [4]+=buildLink("Statements by Faith Communities","faith_statements.html")
	linkArray [4]+=buildLink("Spiritual Resources","spiritual_resources.html")
	linkArray [4]+=buildLink("Energy Efficiency","energy_efficiency.html")
	linkArray [4]+=buildLink("ShopIPL","shop_ipl.html")
	linkArray [4]+=buildLink("Green Power","green_power.html")

	<!--Take Action -->
	linkArray [5]=buildLink("Become a Member","join.html")
	linkArray [5]+=buildLink("Cool Congregations","cc_welcome.html")
	linkArray [5]+=buildLink("Sign-Up for Updates","updates.html")
	linkArray [5]+=buildLink("Contact Your Representatives","contact_reps.html")
	
<!--GLOBAL VARIABLES-->
	var thename
	var theobj
	var thetext
	var winHeight
	var winWidth
	var headerColor
	var tableColor
	var timerID
	var seconds=0
	var x=0
	var y=0
	var offsetx = 2
	var offsety = 2
	<!--END GLOBAL VARIABLES-->
	if(ns4) {
		document.captureEvents(Event.MOUSEMOVE)
	}
	document.onmousemove=getXY
<!--GLOBAL FUNCTIONS-->
function buildLink(linkText,linkURL) 
{
	text="<a href='" + linkURL + "'><span class = 'menuText'><Font Color = '#E3E3E3'>_</FONT>" + linkText + "</SPAN></a><br>"
	return text
}

function buildText(value) 
{
	text="<table width='"+(winWidth-4)+"' height='"+(winHeight-4)+"' border='0' bgcolor='#E3E3E3' cellspacing='1' cellpadding=1>"
	text+="<tr><td width='"+winWidth+"' align='left' valign='top'>"
	text+= linkArray[value]
	text+="</td></tr></table>"
	return text
}

function buildMenuBar() 
{
	var menuBarHTML		
	var tblBgnHght 
	tblBgnHght = 208
	if (navigator.appName != "Microsoft Internet Explorer")
		{
			tblBgnHght = 210
		}
	menuBarHTML="<a href='home.html'>"
	menuBarHTML+="	<img src='images/Banner_w_Text.jpg' alt='Click here for the Iowa Interfaith Power &amp; Light home page' border='0' height='125' width='850'>"
	menuBarHTML+="</a>"														
	menuBarHTML+="<br><img src='images/navmenu.jpg' width='850' height='45' border='0' usemap='#FPMap0' alt='" + navigator.appName + "'>"
	menuBarHTML+="<map id=FPMap0 name=FPMap0>"
	menuBarHTML+="	<area coords='  3, 0, 119, 44' href='Javascript:Void(0)' onmouseout='timer(4.5)' onmouseover='setObj(1,150,105,0," + tblBgnHght + ")' shape='rect' >"
	menuBarHTML+="	<area coords='122, 0, 332, 44' href='Javascript:Void(0)' onmouseout='timer(4.5)' onmouseover='setObj(2,140,105,120," + tblBgnHght + ")' shape='rect' >"
	menuBarHTML+="	<area coords='333, 0, 420, 44' href='Javascript:Void(0)' onmouseout='timer(4.5)' onmouseover='setObj(3,155,85,332," + tblBgnHght + ")' shape='rect' >"
	menuBarHTML+="	<area coords='423, 0, 553, 44' href='Javascript:Void(0)' onmouseout='timer(4.5)' onmouseover='setObj(4,240,140,420," + tblBgnHght + ")' shape='rect' >"
	menuBarHTML+="	<area coords='546, 0, 685, 44' href='Javascript:Void(0)' onmouseout='timer(4.5)' onmouseover='setObj(5,215,88,548," + tblBgnHght + ")' shape='rect' >"
	menuBarHTML+="	<area coords='690, 1, 842, 44' href='donate.html' shape='rect' alt='Donate Now!'>"						
	menuBarHTML+="	</map>"
	menuBarHTML+="<layer name='nsviewer' bgcolor='#cccccc' width='0' height='0' style='border-width: 0px; z-index: 1;'></layer>"
	menuBarHTML+="<div id='viewer' style='background-color:#cccccc;marginleft:0;visibility:hidden;position:absolute;width:0;height:0;z-index:1;overflow:hidden'></div>"
	return menuBarHTML
}
	function buildLeftBar() 
{
	var leftBarHTML		
	leftBarHTML= "<table style='width: 850px;' align='center' cellpadding='0' cellspacing='0'>"
	leftBarHTML+="<tr><td style='height:4px'></td></tr>"
	leftBarHTML+="<tr width='850'>"
	leftBarHTML+="	<td class='pageHeader' align='left' valign='top' width='119'>" 
	leftBarHTML+="		<a href='calendar.html'>"
	leftBarHTML+="			<img alt='Calendar' src='images/calendar_w_border.jpg' border='0' height='80' width='115'>"
	leftBarHTML+="		</a>"
	leftBarHTML+="		<a href='climate_news.html'>"
	leftBarHTML+="			<img alt='Climate News' src='images/climate_news_w_border.jpg' style='border-width: 0px;' height='80' width='115'>"
	leftBarHTML+="		</a>"
	leftBarHTML+="		<a href='shop_ipl.html'>"
	leftBarHTML+="			<img alt='Shop IPL' src='images/shop_ipl.jpg' style='border-width: 0px;' height='80' width='115'>"
	leftBarHTML+="		</a>"
	leftBarHTML+="		<img src='images/spacer_10.jpg' alt='' height='20' width='119'>"
	leftBarHTML+="		<span class='quoteText'>&quot;Without a vision,<br>the people perish.&quot;<br>&nbsp;&nbsp; -Proverbs 29:18</span><br><br>"
	leftBarHTML+="	</td>"
	leftBarHTML+="	<td class='pageHeader' style='width: 5px;' align='left' background='images/separator.jpg' valign='top'>&nbsp;</td>"
	leftBarHTML+="	<td class='pageHeader' style='width: 5px;' align='left' valign='top'> "
	leftBarHTML+="		<img src='images/spacer_10.jpg' width='11'>"
	leftBarHTML+="	</td>"
	leftBarHTML+="	<td style='width: 5px;' height='5' valign='top'>"
	leftBarHTML+="		<img src='images/spacer_10.jpg' alt='' height='5' width='5'>"
	leftBarHTML+="	</td>"

	return leftBarHTML
}

	function pageDisclaimer() 
{
	var disclaimerHMTL		
	disclaimerHMTL= "</td>"
	disclaimerHMTL+="</tr>"
	disclaimerHMTL+="</tbody>>"
	disclaimerHMTL+="</table>"
	disclaimerHMTL+="<p class='pageTextCentered'>"		
	disclaimerHMTL+="<span class='pageTextCentered'>Copyright 2008, Iowa Interfaith Power &amp; Light</span>"	
	disclaimerHMTL+="</p>"
	disclaimerHMTL+="</body>"
	disclaimerHMTL+="</html>"
	
	return disclaimerHMTL
}

function setObj(textelement,inwidth,inheight,boxposx,boxposy) 
{
	clearTimeout(timerID)
	winWidth=inwidth
	winHeight=inheight
	thetext=buildText(textelement)
	if(iens6){
		thename = "viewer"
		theobj=document.getElementById? document.getElementById(thename):document.all.thename
		theobj.style.width=winWidth
		theobj.style.height=winHeight
		if(document.body.clientWidth >= 850)
		{
			theobj.style.left=boxposx+	(document.body.clientWidth-850)/2
		}
		if(document.body.clientWidth < 850)
		{
			theobj.style.left=boxposx+25
		}
		theobj.style.top=boxposy
			if(iens6&&document.all) {
				theobj.innerHTML = ""
				theobj.insertAdjacentHTML("BeforeEnd","<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=top><font type='times' size='2' style='color:black;font-weight:normal'>"+thetext+"</font></td></tr></table>")
			}
			if(iens6&&!document.all) {
				theobj.innerHTML = ""
				theobj.innerHTML="<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=top><font type='times' size='2' style='color:black;font-weight:normal'>"+thetext+"</font></td></tr></table>"
			}
	}
	if(ns4){
		thename = "nsviewer"
		theobj = eval("document."+thename)
		theobj.left=x+winwidth-850
		theobj.top=y
		theobj.width=winWidth
		theobj.clip.width=winWidth
		theobj.height=winHeight
		theobj.clip.height=winHeight
		theobj.document.write("<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=top><font type='times' size='2' style='color:black;font-weight:normal'>"+thetext+"</font></td></tr></table>")
		theobj.document.close()
	}
	viewIt()
}
function viewIt() {
		if(iens6) {
			theobj.style.visibility="visible"
		}
		if(ns4) {
			theobj.visibility = "visible"
		}
}
function stopIt() {
	if(iens6) {
		theobj.innerHTML = ""
		theobj.style.visibility="hidden"
	}
	if(ns4) {
		theobj.document.write("")
		theobj.document.close()
		theobj.visibility="hidden"
	}
}
function timer(sec) {
	seconds=parseInt(sec)
	if(seconds>0) {
		seconds--
		timerID=setTimeout("timer(seconds)",1000)
	}else{
		stopIt()
	}
}
function getXY(e) {
	if (ns4) {
		x=0
		y=0
		x=e.pageX; 
		y=e.pageY;
	}
	if (iens6&&document.all) {
		x=0
		y=0
		x=event.x; 
		y=event.y;
	}
	if (iens6&&!document.all) {
		x=0
		y=0
		x=e.pageX; 
		y=e.pageY;
	}
}
