<!--
var time = 3000;
var numofitems = 7;

//menu constructor
function menu(allitems,thisitem,startstate){ 
  callname= "gl"+thisitem;
  divname="subglobal"+thisitem;  
  this.numberofmenuitems = allitems;
  this.caller = document.getElementById(callname);
  this.thediv = document.getElementById(divname);
  this.thediv.style.visibility = startstate;
}

//menu methods
function ehandler(event,theobj){
  for (var i=1; i<= theobj.numberofmenuitems; i++){
    var shutdiv =eval( "menuitem"+i+".thediv");
    shutdiv.style.visibility="hidden";
  }
  theobj.thediv.style.visibility="visible";
}
				
function closesubnav(event){
  if ((event.clientY <48)||(event.clientY > 107)){
    for (var i=1; i<= numofitems; i++){
      var shutdiv =eval('menuitem'+i+'.thediv');
      shutdiv.style.visibility='hidden';
    }
  }
}
// -->
function bottomlinks()
{
	//Create Default Table
		t=	'<table width="100%" cellpadding="0" cellspacing="0">'
		t +='<tr>'
		t +='<td align="right" class="trhighlight" bgcolor="' + bgcolor + '"><img src="../images/yourhope.gif"></td>'
		t +='</tr>'
		t +='<tr><td align=center class="faint">'
	//Loop through links 
		for (i in links)
		 {
		    t += '<a href="../' + links[i] + '/index.htm?c=' + i + '" class="faint">' + links[i] + "</a> | ";
		 }
	 //Website Copyright Info
		t += '<br>&copy; 2006 Elim Ministres Ireland'
	//Default Email
		t += '<br><a class="faint" href="mailto:' + defaultemail  + '">Contact Webmaster</a>'
	//Last Modified Date
	var default_date = "13/07/2006 12:00:00"
	var lm = document.lastModified

	if (Date.parse(lm) == null) {
		lm = default_date
		}
    t += '<br>Document Last Modified: ' + lm;
	//Close Main Table
		t +='</td></tr>'
		t +='</table>'
	//Transfer the t var to the str var
		str = t ;
	//Write the table
		writediv('bottomlinks')
}


function writediv(id) {
	//Test Browsers to see which browser it is and write text input
	ns4 = (document.layers)? true:false
	ie4 = (document.all)? true:false
	if (ns4 == false) {
	  ns6 = (document.getElementById) ? true:false
		}
	if (ns4) {
	    document.layers[id].document.open();
	    document.layers[id].document.write(str);
	    document.layers[id].document.close();
	  }
	 else if (ie4) { document.all[id].innerHTML = str; }
	 else if (ns6) { document.getElementById(id).innerHTML = str; }
}


function getPageIndex()
{
	//Get URL
		q = location.href;
	//Split URL by at "?"
		s = q.split("?");
	//Take everything after  "?" and split it at "&"
		s = s[1].split("&");
	//From the first matched pair get the value by removing "c=". Currently there is only one matched pair
		s = s[0].replace("c=","")
	//Return Page Index
		return s;
}

function PopulatePage()
{
	//Write Div sections
			bottomlinks();
}

//
// Window Popup Function Called from hrefs
//
function windowPopUp(sUrl){

	window.open(sUrl,null,"location=top, status=no,toolbar=no,menubar=no,height=650,width=550, valign=top");
}