document.write('<link rel="shortcut icon" href="'+RM_Directory_Path+'Appearance/RM_icon.ico">');

var RM_This_Year = "2010";
var RM_Prev_Year = "2009";
var RM_WebEmail = "barry_rosales@rmsyr.org";
var RM_Appearance_Path = RM_Directory_Path;
/* The variable http will hold our new XMLHttpRequest object. */
var http = createRequestObject();
var Domino_Address = "";
//var Client_IP_Address = "";
//document.write('<script type="text/JavaScript" SRC="getIP.php"></script>');
//Client_IP_Address = "<?php echo $_SERVER['REMOTE_ADDR']?>;
//Client_IP_Address = location.hostaddress;
getIP();
//if (Client_IP_Address == "66.218.8.2")
//   Domino_Address = "172.16.242.23:8023";
//else
//   Domino_Address = "66.218.8.3:8023";
//alert("location.hostaddress = "+location.hostaddress+", Client_IP_Address = "+Client_IP_Address+", Domino_Address = "+Domino_Address);
//document.write("location.hostaddress = "+location.hostaddress+", Client_IP_Address = "+Client_IP_Address+", Domino_Address = "+Domino_Address);
var ThisPage;
var ThisTab;
var ThisLine;
var wait = 250;
var defaultwait = 250;
var onmousewait = 500;
var onclickwait = 10000;
var timeoutID = null;
var menu = "";
var tdID = "";
var textID = "";
var tailIndex = 1;
var prevMenuID = "";
var prevMenuIDs;
var CurrentTab;
var CurrentLine;
var TabShowNode;
var LineShowNode;
var TabDivNode;
var LineDivNode;
var PartsTimeoutId = null;
var TimeSinceTimeoutId = null;
var TimeLeftTimeoutId = null;
var timeDiff = '';
var timeSince = '';
var timeLeft = '';

function createRequestObject(){
  var request_o;
  //declare the variable to hold the object.
  var browser = navigator.appName;
  //find the browser name
  if (browser == "Microsoft Internet Explorer"){
    /* Create the object using MSIE's method */
    request_o = new ActiveXObject("Microsoft.XMLHTTP");
  }else{
    /* Create the object using other browser's method */
    request_o = new XMLHttpRequest();
  }
  return request_o;
  //return the object
}
function getIP(){
  /* Create the request.
     The first argument to the open function is the method (POST/GET),
     and the second argument is the url...
  */
  try {
    http.open("get", "http://www.rmsyr.org/Appearance/getIP.php");
    http.onreadystatechange = gotIP;
    http.send(null);
  } catch (e) {
    if (location.href.substring(7, 25) == "172.16.242.23:8023")
      Domino_Address = "172.16.242.23:8023";
    else
      Domino_Address = "66.218.8.3:8023";
  }
}
function gotIP(){
  /* Make sure that the transaction has finished.
     The XMLHttpRequest object has a property called readyState with several states:
       0: Uninitialized
       1: Loading
       2: Loaded
       3: Interactive
       4: Finished
  */
  if (http.readyState == 4) Domino_Address = http.responseText;
} 

function monitorTimeSince(targetDate, timeBreak, lastJoin, beforeTime, afterTime, noTime, timeSpan) {
  getTimeSince(targetDate, timeBreak, lastJoin, beforeTime, afterTime, noTime);
  updateSpan(timeSince, beforeTime, afterTime, noTime, timeSpan);
  var timeSinceCall = "monitorTimeSince('" + targetDate + "','" + timeBreak + "','" + lastJoin + "','" + beforeTime + "','" + afterTime + "','"  + noTime + "','" + timeSpan + "')";
  TimeSinceTimeoutId = setTimeout(timeSinceCall, 1000);
}
function monitorTimeLeft(targetDate, timeBreak, lastJoin, beforeTime, afterTime, noTime, timeSpan) {
  getTimeLeft(targetDate, timeBreak, lastJoin, beforeTime, afterTime, noTime);
  updateSpan(timeLeft, beforeTime, afterTime, noTime, timeSpan);
  var timeLeftCall = "monitorTimeLeft('" + targetDate + "','" + timeBreak + "','" + lastJoin + "','" + beforeTime + "','" + afterTime + "','" + noTime + "','" + timeSpan + "')";
  TimeLeftTimeoutId = setTimeout(timeLeftCall, 1000);
}
function updateSpan(timeDiff, beforeTime, afterTime, noTime, timeSpan) {
  if (document.getElementById(timeSpan)) {
    var spanNode = document.getElementById(timeSpan);
    while (spanNode.childNodes.length > 0) spanNode.removeChild(spanNode.firstChild);
    while (timeDiff != '') {
      var i1 = timeDiff.indexOf("<br>");
      var i2 = timeDiff.indexOf("<bR>");
      var i3 = timeDiff.indexOf("<Br>");
      var i4 = timeLeft.indexOf("<BR>");
      var i = timeDiff.length;
      if ((i1 > -1) && (i > i1)) i = i1;
      if ((i2 > -1) && (i > i2)) i = i2;
      if ((i3 > -1) && (i > i3)) i = i3;
      if ((i4 > -1) && (i > i4)) i = i4;
      if (i == timeLeft.length) {
        spanNode.appendChild(document.createTextNode(timeDiff));
        timeDiff = '';
      } else {
        spanNode.appendChild(document.createTextNode(timeDiff.substring(0, i)));
        spanNode.appendChild(document.createElement("br"));
        timeDiff = timeDiff.substring(i + 4, timeDiff.length);
      }
    }
  }
}
function getTimeSince(targetDate, timeBreak, lastJoin, beforeTime, afterTime, noTime) {
  var today = new Date();
  var todayEpoch = today.getTime();
  var target = new Date(targetDate);
  var targetEpoch = target.getTime();
  var milisecondsSince = todayEpoch - targetEpoch;
  getTimeDiff(milisecondsSince, timeBreak, lastJoin, beforeTime, afterTime, noTime)
  timeSince = timeDiff;
}
function getTimeLeft(targetDate, timeBreak, lastJoin, beforeTime, afterTime, noTime) {
  var today = new Date();
  var todayEpoch = today.getTime();
  var target = new Date(targetDate);
  var targetEpoch = target.getTime();
  var milisecondsLeft = targetEpoch - todayEpoch;
  getTimeDiff(milisecondsLeft, timeBreak, lastJoin, beforeTime, afterTime, noTime)
  timeLeft = timeDiff;
}
function getTimeDiff(milisecondsDiff, timeBreak, lastJoin, beforeTime, afterTime, noTime) {
  timeDiff = '';
  if (milisecondsDiff > 0) {
    var daysDiff = Math.floor((milisecondsDiff / (60*60*24)) / 1000); 
    var milisecondsDiff = milisecondsDiff - daysDiff * 1000*60*60*24;
    var hoursDiff = Math.floor((milisecondsDiff / (60*60)) / 1000); 
    var milisecondsDiff = milisecondsDiff - hoursDiff * 1000*60*60;
    var minutesDiff = Math.floor((milisecondsDiff / 60) / 1000); 
    var milisecondsDiff = milisecondsDiff - minutesDiff * 1000*60;
    var secondsDiff = Math.floor(milisecondsDiff / 1000); 
    if (secondsDiff == 1) secondsDiff = '1 second';
    else if (secondsDiff > 1) secondsDiff = secondsDiff+' seconds';
    else secondsDiff = '';
    if (minutesDiff == 1) minutesDiff = '1 minute';
    else if (minutesDiff > 1) minutesDiff = minutesDiff+' minutes';
    else minutesDiff = '';
    if (hoursDiff == 1) hoursDiff = '1 hour';
    else if (hoursDiff > 1) hoursDiff = hoursDiff+' hours';
    else hoursDiff = '';
    if (daysDiff == 1) daysDiff = '1 day';
    else if (daysDiff > 1) daysDiff = daysDiff+' days';
    else daysDiff = '';
    if (lastJoin == ',') {
      if (secondsDiff != '') {
        if (minutesDiff != '') minutesDiff = minutesDiff+',';
        if (hoursDiff != '') hoursDiff = hoursDiff+',';
        if (daysDiff != '') daysDiff = daysDiff+',';
      } else if (minutesDiff != '') {
        if (hoursDiff != '') hoursDiff = hoursDiff+',';
        if (daysDiff != '') daysDiff = daysDiff+',';
      } else if (hoursDiff != '') {
        if (daysDiff != '') daysDiff = daysDiff+',';
      }
    } else {
      if (secondsDiff != '') {
        if (daysDiff != '' || hoursDiff != '' || minutesDiff != '') secondsDiff = lastJoin+secondsDiff;
        if (daysDiff != '' && (hoursDiff != '' || minutesDiff != '')) daysDiff = daysDiff+',';
        if (hoursDiff != '' && minutesDiff != '') hoursDiff = hoursDiff+',';
      } else if (minutesDiff != '') {
        if (daysDiff != '' || hoursDiff != '') minutesDiff = lastJoin+minutesDiff;
        if (daysDiff != '' && hoursDiff != '') daysDiff = daysDiff+',';
      } else if (hoursDiff != '') {
        if (daysDiff != '') hoursDiff = lastJoin+hoursDiff;
      }
    }
    if (secondsDiff != '') secondsDiff = secondsDiff+timeBreak;
    if (minutesDiff != '') minutesDiff = minutesDiff+timeBreak;
    if (hoursDiff != '') hoursDiff = hoursDiff+timeBreak;
    if (daysDiff != '') daysDiff = daysDiff+timeBreak;
    timeDiff = daysDiff + hoursDiff + minutesDiff + secondsDiff;
    if (timeDiff != '') timeDiff = timeDiff.substring(0, timeDiff.length - timeBreak.length);
  }
  if (timeDiff == '') {
    timeDiff = noTime;
  } else {
    timeDiff = beforeTime + timeDiff + afterTime;
  }
}

var BrowserDetect = {
  init: function () {
    this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
    this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version";
    this.OS = this.searchString(this.dataOS) || "an unknown OS";
  },
  searchString: function (data) {
    for (var i=0;i<data.length;i++) {
      var dataString = data[i].string;
      var dataProp = data[i].prop;
      this.versionSearchString = data[i].versionSearch || data[i].identity;
      if (dataString) {
        if (dataString.indexOf(data[i].subString) != -1) return data[i].identity;
      } else if (dataProp) return data[i].identity;
    }
  },
  searchVersion: function (dataString) {
    var index = dataString.indexOf(this.versionSearchString);
    if (index == -1) return;
    return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
  },
  dataBrowser: [
    { string: navigator.userAgent, subString: "OmniWeb", versionSearch: "OmniWeb/", identity: "OmniWeb" },
    { string: navigator.vendor, subString: "Apple", identity: "Safari" },
    { prop: window.opera, identity: "Opera" },
    { string: navigator.vendor, subString: "iCab", identity: "iCab" },
    { string: navigator.vendor, subString: "KDE", identity: "Konqueror" },
    { string: navigator.userAgent, subString: "Firefox", identity: "Firefox" },
    { string: navigator.vendor, subString: "Camino", identity: "Camino" },
    { // for newer Netscapes (6+)
      string: navigator.userAgent, subString: "Netscape", identity: "Netscape" },
    { string: navigator.userAgent, subString: "MSIE", identity: "Explorer", versionSearch: "MSIE" },
    { string: navigator.userAgent, subString: "Gecko", identity: "Mozilla", versionSearch: "rv" },
    { // for older Netscapes (4-)
      string: navigator.userAgent, subString: "Mozilla", identity: "Netscape", versionSearch: "Mozilla" }
  ],
  dataOS : [
    { string: navigator.platform, subString: "Win", identity: "Windows" },
    { string: navigator.platform, subString: "Mac", identity: "Mac" },
    { string: navigator.platform, subString: "Linux", identity: "Linux" }
  ]
};
BrowserDetect.init();

function GoMore(Page) {
	document.location.href=Page+"?page="+ThisPage+"&tab="+ThisTab+"&line="+ThisLine;
}
function goBack() {
	if (ThisPage == "")
		history.go(-1);
	else
		document.location.href=ThisPage+"?page="+ThisPage+"&tab="+ThisTab+"&line="+ThisLine;
}
function GoBack() {
	if (ThisPage == "")
		history.go(-1);
	else
		document.location.href=ThisPage+"?page="+ThisPage+"&tab="+ThisTab+"&line="+ThisLine;
}
function goHome() {
	newWindow = window.open("http://www.rmsyr.org/Home/Main_Page.htm", "RM_Home", "resizable=1,scrollbars=1,toolbar=1,status=1,location=1,menubar=1");
	if (newWindow != null) {
		history.go(-1);
		newWindow.focus();
	} else {
		window.document.location.href="http://www.rmsyr.org/Home/Main_Page.htm";
	}
}
function getParameter(paramName) {
	var currentUrl = window.location.search;
	var strBegin = currentUrl.indexOf("?");
	if (strBegin == -1) {
		return "";
	} else {
		strBegin = currentUrl.indexOf(paramName, strBegin);
		if (strBegin == -1) {
			return "";
		} else {
			strBegin = strBegin + paramName.length + 1;
			var strEnd = currentUrl.indexOf("&", strBegin);
			if (strEnd == -1) strEnd = currentUrl.length;
			return currentUrl.substring(strBegin, strEnd);
		}
	}
}
function showMenu(thisID, waitduration) {
	if (timeoutID != null) clearTimeout(timeoutID);
	var menuID = "";
	var j = thisID.lastIndexOf("_");
	if (j >= 0) {
		if (thisID.substring(j,thisID.length) == "_text") {
			textID = thisID;
			menuID = thisID.substring(0,j);
		} else {
			textID = "";
			tdID = thisID;
			menuID = thisID;
		}
	} else {
		textID = "";
		tdID = thisID;
		menuID = thisID;
	}
	var elementId = null;
	var MenuIDs = menuID.split("_");
	if (prevMenuID != "") {
		var k = (MenuIDs.length < prevMenuIDs.length) ? MenuIDs.length : prevMenuIDs.length;
		if ((k > 0) && (prevMenuIDs[0] == MenuIDs[0]) && (prevMenuIDs[1] == MenuIDs[1])) {
			if (waitduration > wait) wait = waitduration;
		} else {
			wait = waitduration;
		}
		tailIndex = k - 1;
		for (i = 0; i < k; i++) {
			if (prevMenuIDs[i] != MenuIDs[i]) {
				tailIndex = i;
				break;
			}
		}
		menu = prevMenuIDs[0];
		if (tailIndex == 0) {
			tailIndex = 1;
			processMenuTail("hidden", menu+"hidden", menu, menu+"edge");
			menu = MenuIDs[0];
		} else {
			for (i = 1; i < tailIndex; i++) {
				menu = menu + "_" + prevMenuIDs[i];
			}
			var idSave = menu;
			processMenuTail("hidden", prevMenuIDs[0]+"hidden", prevMenuIDs[0], prevMenuIDs[0]+"edge");
			menu = idSave;
		}
	} else {
		wait = waitduration;
		tailIndex = 1;
		menu = MenuIDs[0];
	}
	prevMenuIDs = MenuIDs;
	processMenuTail("visible", prevMenuIDs[0]+"visible", prevMenuIDs[0]+"highlight", prevMenuIDs[0]+"highlight");
	prevMenuID = menuID;
	if (timeoutID != null) clearTimeout(timeoutID);
}
function hideMenuCheck(thisID) {
	if ((tdID != "") && (thisID.substring(thisID.lastIndexOf("_"),thisID.length) == "_text")) return;
	timeoutID=setTimeout('hideMenu()',wait)
}
function hideMenu() {
	if (prevMenuID != "") {
		wait = defaultwait;
		menu = prevMenuIDs[0];
		tailIndex = 1;
		processMenuTail("hidden", menu+"hidden", menu, menu+"edge");
		prevMenuIDs = new Array();
		prevMenuID = "";
		tdID = "";
		textID = "";
	}
}
function processMenuTail(menuVisibility, menuVisibilityClass, menuHighlightClass, menuEdgeClass) {
	var startTail = tailIndex;
	if (tailIndex == 1) {
		menu = menu+"_"+prevMenuIDs[1];
		startTail = 2;
		elementId = document.getElementById(menu+"_border_N");
		if(elementId != null)
			elementId.style.visibility=menuVisibility;
		elementId = document.getElementById(menu+"_border_W");
		if(elementId != null)
			elementId.style.visibility=menuVisibility;
		elementId = document.getElementById(menu+"_border_E");
		if(elementId != null)
			elementId.style.visibility=menuVisibility;
		elementId = document.getElementById(menu+"_border_S");
		if(elementId != null)
			elementId.style.visibility=menuVisibility;
		processMenuItem(menuVisibilityClass, menuHighlightClass+"_main", menuEdgeClass);
	}
	for (i = startTail; i < prevMenuIDs.length; i++) {
		menu = menu+"_"+prevMenuIDs[i];
		processMenuItem(menuVisibilityClass, menuHighlightClass, menuEdgeClass);
	}
}
function processMenuItem(menuVisibilityClass, menuHighlightClass, menuEdgeClass) {
	elementId = document.getElementById(menu);
	if(elementId != null)
		elementId.className=menuHighlightClass;
	elementId = document.getElementById(menu+"_text");
	if(elementId != null)
		elementId.className = menuHighlightClass;
	elementId = document.getElementById(menu+"_menu");
	if(elementId != null) {
		elementId.className=menuVisibilityClass;
		elementId = document.getElementById(menu+"_edge");
		if(elementId != null)
			elementId.className=menuEdgeClass;
	}
}
function changeTab(Tab) {
	if (CurrentTab != Tab) {
		if ((LineShowNode != null) && (LineDivNode != null)) {
			var LineAreaNode = LineShowNode.removeChild(LineShowNode.firstChild);
			LineDivNode.appendChild(LineAreaNode);
			LineShowNode = null;
			LineDivNode = null;
		}
		var TabAreaNode = TabShowNode.removeChild(TabShowNode.firstChild);
		TabDivNode.appendChild(TabAreaNode);
		changeTabArea(Tab);
	}
}
function changeTabArea(Tab) {
	TabDivNode = document.getElementById("Tab"+Tab+"Area");
	var TabAreaNode = TabDivNode.removeChild(TabDivNode.firstChild);
	TabShowNode.appendChild(TabAreaNode);
	LineShowNode = document.getElementById("ShowTab"+Tab+"LineArea");
	hideAllTabs();
	showTab(Tab);
	CurrentTab = Tab;
	ThisTab = Tab;
}
function changeLine(Tab,Line) {
	if (CurrentLine != Line) {
		if ((LineShowNode != null) && (LineDivNode != null)) {
			var LineAreaNode = LineShowNode.removeChild(LineShowNode.firstChild);
			LineDivNode.appendChild(LineAreaNode);
		}
		changeLineArea(Tab,Line);
	}
}
function changeLineArea(Tab,Line) {
	if (LineShowNode != null) {
		LineDivNode = document.getElementById("Tab"+Tab+"Line"+Line+"Area");
		if (LineDivNode != null) {
			var LineAreaNode = LineDivNode.removeChild(LineDivNode.firstChild);
			LineShowNode.appendChild(LineAreaNode);
		}
		hideAllLines(Tab);
		showLine(Tab,Line);
		CurrentLine = Line;
		ThisLine = Line;
	}
}
function showTab(Tab) {
	var TabItem = document.getElementById("Tab"+Tab);
	if(TabItem != null) TabItem.className="tabvisible";
	TabItem = document.getElementById("Tab"+Tab+"Text");
	if(TabItem != null) TabItem.className="tabvisible";
	changeLineArea(Tab,'0')
}
function hideAllTabs() {
	var moreTabs = true;
	var i = 1;
	while (moreTabs) {
		var TabItem = document.getElementById("Tab"+eval(i));
		if(TabItem != null) {
			TabItem.className="tabhidden";
			TabItem = document.getElementById("Tab"+eval(i)+"Text");
			if(TabItem != null) TabItem.className="tabhidden";
			hideAllLines(eval(i));
		} else {
			moreTabs = false;
		}
		i = i + 1;
	}
}
function showLine(Tab,Line) {
	if (Line != "0") {
		var LineItem = document.getElementById("Tab"+Tab+"Line"+Line);
		if(LineItem != null) LineItem.className="linehighlight";
		LineItem = document.getElementById("Tab"+Tab+"Line"+Line+"Text");
		if(LineItem != null) LineItem.className="linehighlight";
	}
}
function hideAllLines(Tab) {
	var moreLines = true;
	var j = 1;
	while (moreLines) {
		LineItem = document.getElementById("Tab"+Tab+"Line"+eval(j));
		if(LineItem != null) LineItem.className="linenormal";
		else moreLines = false;
		LineItem = document.getElementById("Tab"+Tab+"Line"+eval(j)+"Text");
		if(LineItem != null) LineItem.className="linenormal";
		j = j + 1;
	}
}
function initialize() {
	cleanTabs();
	if ((ThisTab == null) || (ThisTab == ""))
		changeTabArea('1');
	else {
		if ((ThisLine == null) || (ThisLine == ""))
			changeTabArea(ThisTab);
		else {
			var TempLine = ThisLine; 
			changeTabArea(ThisTab);
			changeLine(ThisTab,TempLine);
		}
	}
}
function cleanTabs() {
	var moreTabs = true;
	var i = 1;
	while (moreTabs) {
		TabDivNode = document.getElementById("Tab"+eval(i)+"Area");
		if(TabDivNode != null) {
			cleanTabArea(TabDivNode);
			LineShowNode = document.getElementById("ShowTab"+eval(i)+"LineArea");
			if (LineShowNode) {
				fullCleanTabArea(LineShowNode);
			}
			cleanTabLines(eval(i));
		} else {
			moreTabs = false;
		}
		i = i + 1;
	}
	TabShowNode = document.getElementById("ShowTabArea");
	fullCleanTabArea(TabShowNode);
}
function cleanTabLines(Tab) {
	var moreLines = true;
	var j = 0;
	while (moreLines) {
		LineDivNode = document.getElementById("Tab"+Tab+"Line"+eval(j)+"Area");
		if(LineDivNode != null) cleanTabArea(LineDivNode);
		else moreLines = false;
		j = j + 1;
	}
}
function cleanTabArea(node) {
	var kids = node.childNodes;
	var numKids = kids.length;
	for (var i = numKids-1; i >= 0; i--) {
		var kid = kids[i];
		if (kid.nodeName != "TABLE") node.removeChild(kid);
	}
}
function fullCleanTabArea(node) {
	var kids = node.childNodes;
	var numKids = kids.length;
	for (var i = numKids-1; i >= 0; i--) {
		var kid = kids[i];
		node.removeChild(kid);
	}
}
var UniqueID = 314 // Make each link open in a new window 
var newWinOffset = 0 // Position of first pop-up
function PlayerOpen(soundfiledesc,soundfilepath) { 
PlayWin = window.open('',UniqueID,'width=340,height=200,top=' + newWinOffset +',left=0,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');
PlayWin.focus(); 
var winContent = "<html><head><title>"+soundfiledesc+"</title><link href='http://www.rmsyr.org/RadioShow/Style.css' rel='stylesheet' type='text/css'></link></head><body bgcolor='#CCDDFF'>"; 
winContent += "<table width='340' height='200' border='0' cellpadding='0' cellspacing='0'><tr><td width='1' height='20'></td><td width='320' class='mp3title'>" + soundfiledesc + "</td><td width='19'></td></tr>";
winContent += "<tr><td width='1'></td><td width='320' class='mp3body'><object width='300' height='42'>"; 
winContent += "<param name='src' value='" + soundfilepath + "'>";
winContent += "<param name='autoplay' value='true'>"; 
winContent += "<param name='controller' value='true'>";
winContent += "<param name='bgcolor' value='#CCDDFF'>"; 
winContent += "<embed src='" + soundfilepath + "' autostart='true' loop='false' width='300' heigth='42' controller='true' bgcolor='#CCDDFF'></embed>";
winContent += "</object></td><td width='19'></td></tr></table></body></html>"; 
PlayWin.document.write(winContent); 
PlayWin.document.close(); // "Finalizes" new window 
UniqueID = UniqueID + 1
// newWinOffset = newWinOffset + 20 // subsequent pop-ups will be this many pixels lower 
}
function ClickAwayHunger() {
//    openDonationWindow("http://ecom1.netsitesys.com/cgi-bin/ncommerce3/OrderItemUpdate?merchant_rn=633&product_rn=24836&quantity=15&url=https%3A%2F%2Fecom1.netsitesys.com%2Fcgi-bin%2Fncommerce3%2FOrderItemList%3Fmerchant_rn%3D633&comment=Comments%3A+");
//    window.document.location.href = RM_Directory_Path+"Home/DonationsTempOutOfOrder.htm";
    window.document.location.href = "https://secure.acceptiva.com/?cst=206d1c";
}
function GeneralDonation() {
//    openDonationWindow("http://ecom1.netsitesys.com/cgi-bin/ncommerce3/OrderItemUpdate?merchant_rn=633&product_rn=24837&quantity=15&url=https%3A%2F%2Fecom1.netsitesys.com%2Fcgi-bin%2Fncommerce3%2FOrderItemList%3Fmerchant_rn%3D633&comment=Comments%3A+");
    window.document.location.href = "https://secure.acceptiva.com/?cst=206d1c";
}
function HonorDonation() {
//    openDonationWindow("http://ecom1.netsitesys.com/cgi-bin/ncommerce3/OrderItemUpdate?merchant_rn=633&product_rn=24838&quantity=15&url=https%3A%2F%2Fecom1.netsitesys.com%2Fcgi-bin%2Fncommerce3%2FOrderItemList%3Fmerchant_rn%3D633&comment=Comments%3A+");
    window.document.location.href = "https://secure.acceptiva.com/?cst=206d1c";
}
function MemorialDonation() {
//    openDonationWindow("http://ecom1.netsitesys.com/cgi-bin/ncommerce3/OrderItemUpdate?merchant_rn=633&product_rn=24839&quantity=15&url=https%3A%2F%2Fecom1.netsitesys.com%2Fcgi-bin%2Fncommerce3%2FOrderItemList%3Fmerchant_rn%3D633&comment=Comments%3A+");
    window.document.location.href = "https://secure.acceptiva.com/?cst=206d1c";
}
function BraceletsOnLine() {
    window.document.location.href = "https://secure.acceptiva.com/?cst=206d1c";
}
function openDonationWindow(url) {
//    window.open(url, "RM_Donate", "top=103,left=136,height=440,width=620,resizable=1,scrollbars=1,toolbar=1,status=1,location=1,menubar=1");
//    window.document.location.href = RM_Directory_Path+"Home/DonationsTempOutOfOrder.htm";
    window.document.location.href = "https://secure.acceptiva.com/?cst=206d1c";
}
function openHTMLWindow(url) {
    openNewWindow(url,510,756,1);
}
function ShowAnnualReport() {
    openPDFWindow(RM_Directory_Path+"Organization/Financial/AnnualReport/Annual_Report.pdf");
}
function ShowNewsletter(letter) {
    openPDFWindow(RM_Directory_Path+"WhatWeAreAbout/NewsletterArchive/"+letter+".pdf");
}
function ShowVolunteerNewsletter(letter) {
    openPDFWindow(RM_Directory_Path+"Volunteer/VolunteerNewsletterArchive/"+letter+".pdf");
}
function ShowOurBrochure() {
    openPDFWindow(RM_Directory_Path+"WhatWeAreAbout/OurBrochure/Main_Page.pdf");
}
function ShowOurVideo() {
    openPDFWindow(RM_Directory_Path+"WhatWeAreAbout/OurVideos/OurVideo/RM2006.wmv");
}
function ShowCelebrationVideo() {
    openPDFWindow(RM_Directory_Path+"WhatWeAreAbout/OurVideos/CelebrationVideo/RMCelebration2007.wmv");
}
function ShowPlannedGivingletter(letter) {
    openPDFWindow(RM_Directory_Path+"Donations/Financial/Planned/LastingConnection_Archive/"+letter+".pdf");
}
function openPDFWindow(url) {
    newWindow = window.open(url,"","top=103,left=0,height=510,width=756,scrollbars=0,menubars=0,resizable=1");
//    newWindow = window.open(url,"RM_PDF","top=103,left=0,height=510,width=756,scrollbars=0,menubars=0,resizable=1");
//    newWindow.focus();
}
function openNewWindow(url,height,width,scroll) {
    newWindow = window.open(url,"RM_HTML","top=103,left=0,height="+height+",width="+width+",scrollbars="+scroll+",menubars=0,resizable=1");
    newWindow.focus();
}
function openLinkWindow(url,height,width) {
    newWindow = window.open(url,"RM_LINK","top=103,left=0,height="+height+",width="+width+",scrollbars=1,menubars=0,resizable=1");
    newWindow.focus();
}
function ListenTo(mp3File) {
    newWindow = window.open(mp3File, "RM_MP3", "top=150,left=138,height=180,width=240,scrollbars=1,menubars=0,resizable=1");
    newWindow.focus();
}
function ReferFriend(type) {
    newWindow = window.open(RM_Directory_Path+"Appearance/ReferFriend_Form.htm?type="+type+"&page="+window.document.location.href,"ReferFriend","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=396,height=277,left=138,top=150,titlebar=yes");
    newWindow.focus();
}
function doMenu(text,thisID) {
  switch (thisID)
  {
    case "topmenu_item1": { window.document.location.href = RM_Directory_Path+"Home/Main_Page.htm"; break; }
    case "topmenu_item2": { showMenu(thisID+text,onclickwait); break; }
    case "topmenu_item2_item0": { window.document.location.href = RM_Directory_Path+"NeedHelp/HolidayMeal/Main_Page.htm"; break; }
    case "topmenu_item2_item1": { window.document.location.href = RM_Directory_Path+"NeedHelp/Meal/Main_Page.htm"; break; }
    case "topmenu_item2_item2": { window.document.location.href = RM_Directory_Path+"NeedHelp/Shelter/Main_Page.htm"; break; }
    case "topmenu_item2_item3": { window.document.location.href = RM_Directory_Path+"NeedHelp/Clothing/Main_Page.htm"; break; }
    case "topmenu_item2_item4": { window.document.location.href = RM_Directory_Path+"NeedHelp/Education/Main_Page.htm"; break; }
    case "topmenu_item2_item5": { window.document.location.href = RM_Directory_Path+"NeedHelp/Vocation/Main_Page.htm"; break; }
//    case "topmenu_item3": { showMenu(thisID+text,onclickwait); break; }
    case "topmenu_item3": { openDonationWindow(""); break; }
    case "topmenu_item3_item1": { window.document.location.href = RM_Directory_Path+"Donations/Financial/ClickAwayHunger/Main_Page.htm"; break; }
    case "topmenu_item3_item2": { GeneralDonation(); break; }
    case "topmenu_item3_item3": { HonorDonation(); break; }
    case "topmenu_item3_item4": { MemorialDonation(); break; }
    case "topmenu_item4": { showMenu(thisID+text,onclickwait); break; }
    case "topmenu_item4_item1": { window.document.location.href = "http://"+Domino_Address+"/RMWebSite/Employment/Job_Listing.nsf"; break; }
//    case "topmenu_item4_item1": { window.document.location.href = RM_Directory_Path+"Employment/JobListings/Main_Page.htm"; break; }
    case "topmenu_item4_item2": { window.document.location.href = RM_Directory_Path+"Employment/JobApplication/Main_Page.htm"; break; }
    case "topmenu_item4_item3": { window.document.location.href = RM_Directory_Path+"Volunteer/Internship/Main_Page.htm"; break; }
    case "topmenu_item5": { showMenu(thisID+text,onclickwait); break; }
    case "topmenu_item5_item1": { window.document.location.href = RM_Directory_Path+"Volunteer/Opportunities/Main_Page.htm"; break; }
    case "topmenu_item5_item2": { window.document.location.href = RM_Directory_Path+"Volunteer/IndividualApplication/Individual_Form.htm"; break; }
    case "topmenu_item5_item3": { window.document.location.href = RM_Directory_Path+"Volunteer/GroupApplication/Group_Form.htm"; break; }
    case "topmenu_item5_item4": { window.document.location.href = RM_Directory_Path+"Volunteer/VolunteerNewsletterArchive/Main_Page.htm"; break; }
    case "topmenu_item5_item5": { window.document.location.href = RM_Directory_Path+"Volunteer/PrayerPartners/Main_Page.htm"; break; }
    case "topmenu_item5_item6": { window.document.location.href = RM_Directory_Path+"Volunteer/CollectionDrives/Main_Page.htm"; break; }
    case "topmenu_item5_item7": { window.document.location.href = RM_Directory_Path+"Volunteer/VolunteersOfTheYear/Main_Page.htm"; break; }
    case "topmenu_item5_item8": { window.document.location.href = RM_Directory_Path+"Volunteer/Internship/Main_Page.htm"; break; }
    case "topmenu_item5_item9": { window.document.location.href = RM_Directory_Path+"Volunteer/FamilyOpportunities/Main_Page.htm"; break; }
    case "topmenu_item5_item10": { window.document.location.href = RM_Directory_Path+"Volunteer/CollectionDrives/Main_Page.htm"; break; }
    case "topmenu_item5_item11": { window.document.location.href = RM_Directory_Path+"Volunteer/IndividualRideApplication/Individual_Ride_Form.htm"; break; }
    case "topmenu_item5_item12": { window.document.location.href = RM_Directory_Path+"Volunteer/GroupRideApplication/Group_Ride_Form.htm"; break; }
    case "topmenu_item6": { showMenu(thisID+text,onclickwait); break; }
    case "topmenu_item6_item1": { window.document.location.href = RM_Directory_Path+"ContactUs/MailPhoneFax/Main_Page.htm"; break; }
    case "topmenu_item6_item2": { window.document.location.href = RM_Directory_Path+"ContactUs/Email/Email_Form.htm"; break; }
    case "topmenu_item6_item3": { window.document.location.href = RM_Directory_Path+"ContactUs/Survey/Survey_Form.htm"; break; }
    case "sidemenu_item1": { showMenu(thisID+text,onclickwait); break; }
    case "sidemenu_item1_item1": { window.document.location.href = RM_Directory_Path+"Organization/ExecutiveDirectorMessage/Main_Page.htm"; break; }
    case "sidemenu_item1_item2": { window.document.location.href = RM_Directory_Path+"WhatWeAreAbout/MissionVisionCoreValues/Main_Page.htm"; break; }
    case "sidemenu_item1_item3": { showMenu(thisID+text,onclickwait); break; }
    case "sidemenu_item1_item3_item1": { window.document.location.href = RM_Directory_Path+"Organization/Leadership/BoardOfDirectors/Main_Page.htm"; break; }
    case "sidemenu_item1_item3_item2": { window.document.location.href = RM_Directory_Path+"Organization/Leadership/ExecutiveDirector/Main_Page.htm"; break; }
    case "sidemenu_item1_item3_item3": { window.document.location.href = RM_Directory_Path+"Organization/Leadership/ExecutiveTeam/Main_Page.htm"; break; }
    case "sidemenu_item1_item3_item4": { window.document.location.href = RM_Directory_Path+"Organization/Leadership/TeamLeaders/Main_Page.htm"; break; }
    case "sidemenu_item1_item4": { window.document.location.href = RM_Directory_Path+"WhatWeAreAbout/FactsFigures/Main_Page.htm"; break; }
    case "sidemenu_item1_item5": { window.document.location.href = RM_Directory_Path+"Organization/PhotoTour.htm";  break; }
    case "sidemenu_item1_item6": { showMenu(thisID+text,onclickwait); break; }
    case "sidemenu_item1_item6_item1": { window.document.location.href = RM_Directory_Path+"Organization/Financial/Funding/Main_Page.htm"; break; }
    case "sidemenu_item1_item6_item2": { ShowAnnualReport(); break; }
    case "sidemenu_item1_item7": { window.document.location.href = RM_Directory_Path+"Organization/Locations/Main_Page.htm"; break; }
    case "sidemenu_item2": { showMenu(thisID+text,onclickwait); break; }
    case "sidemenu_item2_item1": { window.document.location.href = RM_Directory_Path+"WhatWeAreAbout/MissionVisionCoreValues/Main_Page.htm"; break; }
    case "sidemenu_item2_item2": { window.document.location.href = RM_Directory_Path+"WhatWeAreAbout/Homeless/Main_Page.htm"; break; }
    case "sidemenu_item2_item3": { window.document.location.href = RM_Directory_Path+"WhatWeAreAbout/History/Main_Page.htm"; break; }
    case "sidemenu_item2_item4": { window.document.location.href = RM_Directory_Path+"Seasonal/"+RM_Prev_Year+"/"+RM_Prev_Year+"-YearInReview/Main_Page.htm"; break; }
    case "sidemenu_item2_item5": { ShowOurBrochure(); break; }
    case "sidemenu_item2_item6": { window.document.location.href = RM_Directory_Path+"WhatWeAreAbout/NewsletterStoryArchive/Main_Page.htm"; break; }
    case "sidemenu_item2_item7": { window.document.location.href = RM_Directory_Path+"WhatWeAreAbout/NewsletterArchive/Main_Page.htm"; break; }
    case "sidemenu_item2_item8": { window.document.location.href = RM_Directory_Path+"WhatWeAreAbout/FactsFigures/Main_Page.htm"; break; }
    case "sidemenu_item2_item9": { window.document.location.href = RM_Directory_Path+"WhatWeAreAbout/OurVideos/Main_Page.htm"; break; }
//    case "sidemenu_item2_item9": { ShowOurVideo(); break; }
    case "sidemenu_item3": { showMenu(thisID+text,onclickwait); break; }
    case "sidemenu_item3_item1": { window.document.location.href = RM_Directory_Path+"Programs/Overview/Main_Page.htm"; break; }
    case "sidemenu_item3_item2": { window.document.location.href = RM_Directory_Path+"Programs/Philosophy/Main_Page.htm"; break; }
    case "sidemenu_item3_item3": { window.document.location.href = RM_Directory_Path+"Programs/ClothingOutreach/Main_Page.htm"; break; }
    case "sidemenu_item3_item4": { window.document.location.href = RM_Directory_Path+"Programs/NewLife/Main_Page.htm"; break; }
    case "sidemenu_item3_item5": { window.document.location.href = RM_Directory_Path+"Programs/LearningCenter/Main_Page.htm"; break; }
    case "sidemenu_item3_item6": { window.document.location.href = RM_Directory_Path+"Programs/EmergencyShelter/Main_Page.htm"; break; }
    case "sidemenu_item3_item7": { window.document.location.href = RM_Directory_Path+"Programs/HomelessVan/Main_Page.htm"; break; }
    case "sidemenu_item3_item8": { window.document.location.href = RM_Directory_Path+"Programs/HousingPlacementSupport/Main_Page.htm"; break; }
    case "sidemenu_item3_item9": { window.document.location.href = RM_Directory_Path+"Programs/CrossRoads/Main_Page.htm"; break; }
    case "sidemenu_item3_item10": { window.document.location.href = RM_Directory_Path+"Programs/FoodServices/Main_Page.htm"; break; }
    case "sidemenu_item3_item11": { window.document.location.href = RM_Directory_Path+"Programs/Recreation/Main_Page.htm"; break; }
    case "sidemenu_item3_item12": { window.document.location.href = RM_Directory_Path+"Programs/NewBeginnings/Main_Page.htm"; break; }
    case "sidemenu_item3_item13": { window.document.location.href = RM_Directory_Path+"Programs/SpiritualLife/Main_Page.htm"; break; }
    case "sidemenu_item3_item14": { window.document.location.href = RM_Directory_Path+"Programs/EmploymentCenter/Main_Page.htm"; break; }
    case "sidemenu_item3_item15": { window.document.location.href = RM_Directory_Path+"Programs/GiffordPlace/Main_Page.htm"; break; }
    case "sidemenu_item11": { window.document.location.href = RM_Directory_Path+"Binghamton/Main_Page.htm"; break; }
    case "sidemenu_item4": { window.document.location.href = RM_Directory_Path+"NewsReleases/Main_Page.htm"; break; }
    case "sidemenu_item5": { window.document.location.href = RM_Directory_Path+"Calendar/Main_Page.htm"; break; }
    case "sidemenu_item8": { showMenu(thisID+text,onclickwait); break; }
    case "sidemenu_item8_item1": { window.document.location.href = RM_Directory_Path+"CorporateConnection/EventSponsorship/Main_Page.htm"; break; }
    case "sidemenu_item8_item2": { window.document.location.href = RM_Directory_Path+"CorporateConnection/UnderwritingOpportunities/Main_Page.htm"; break; }
    case "sidemenu_item8_item3": { window.document.location.href = RM_Directory_Path+"CorporateConnection/VolunteerOpportunities/Main_Page.htm"; break; }
    case "sidemenu_item8_item4": { window.document.location.href = RM_Directory_Path+"CorporateConnection/MatchingGifts/Main_Page.htm"; break; }
    case "sidemenu_item8_item5": { window.document.location.href = RM_Directory_Path+"CorporateConnection/StaffInvolvement/Main_Page.htm"; break; }
    case "sidemenu_item6": { showMenu(thisID+text,onclickwait); break; }
    case "sidemenu_item6_item1": { window.document.location.href = RM_Directory_Path+"Stores/OnlineStore/Main_Page.htm"; break; }
    case "sidemenu_item6_item2": { window.document.location.href = RM_Directory_Path+"Stores/ThriftStores/Main_Page.htm"; break; }
    case "sidemenu_item7": { showMenu(thisID+text,onclickwait); break; }
    case "sidemenu_item7_item1": { showMenu(thisID+text,onclickwait); break; }
//    case "sidemenu_item7_item1_item1": { showMenu(thisID+text,onclickwait); break; }
    case "sidemenu_item7_item1_item1": { openDonationWindow(""); break; }
    case "sidemenu_item7_item1_item1_item1": { window.document.location.href = RM_Directory_Path+"Donations/Financial/ClickAwayHunger/Main_Page.htm"; break; }
    case "sidemenu_item7_item1_item1_item2": { GeneralDonation(); break; }
    case "sidemenu_item7_item1_item1_item3": { HonorDonation(); break; }
    case "sidemenu_item7_item1_item1_item4": { MemorialDonation(); break; }
    case "sidemenu_item7_item1_item2": { window.document.location.href = RM_Directory_Path+"Donations/Financial/PhoneMail/Main_Page.htm"; break; }
    case "sidemenu_item7_item1_item3": { window.document.location.href = RM_Directory_Path+"Donations/Financial/PhoneMail/Main_Page.htm"; break; }
    case "sidemenu_item7_item1_item4": { window.document.location.href = RM_Directory_Path+"Donations/Financial/Monthly/Main_Page.htm"; break; }
    case "sidemenu_item7_item1_item7": { window.document.location.href = RM_Directory_Path+"Donations/Financial/MatchingGifts/Main_Page.htm"; break; }
    case "sidemenu_item7_item1_item5": { window.document.location.href = RM_Directory_Path+"Donations/Financial/Planned/Main_Page.htm"; break; }
    case "sidemenu_item7_item1_item6": { window.document.location.href = RM_Directory_Path+"Donations/Financial/FAQ/Main_Page.htm"; break; }
    case "sidemenu_item7_item2_item1": { window.document.location.href = RM_Directory_Path+"Donations/Auto/Main_Page.htm"; break; }
    case "sidemenu_item7_item2_item2": { window.document.location.href = RM_Directory_Path+"Donations/Food/Main_Page.htm"; break; }
    case "sidemenu_item7_item2_item3": { window.document.location.href = RM_Directory_Path+"Donations/ClothingHouseholdGoods/Main_Page.htm"; break; }
    case "sidemenu_item7_item2_item4": { window.document.location.href = RM_Directory_Path+"Donations/Furniture/Main_Page.htm"; break; }
    case "sidemenu_item7_item2_item7": { window.document.location.href = RM_Directory_Path+"Donations/House/Main_Page.htm"; break; }
    case "sidemenu_item7_item2_item5": { window.document.location.href = RM_Directory_Path+"Donations/ComputersOtherItems/Main_Page.htm"; break; }
    case "sidemenu_item7_item2_item6": { window.document.location.href = RM_Directory_Path+"Donations/WelcomePack/Main_Page.htm"; break; }
    case "sidemenu_item7_item9": { showMenu(thisID+text,onclickwait); break; }
    case "sidemenu_item7_item9_item1": { window.document.location.href = RM_Directory_Path+"CorporateConnection/EventSponsorship/Main_Page.htm"; break; }
    case "sidemenu_item7_item9_item2": { window.document.location.href = RM_Directory_Path+"CorporateConnection/UnderwritingOpportunities/Main_Page.htm"; break; }
    case "sidemenu_item7_item9_item3": { window.document.location.href = RM_Directory_Path+"CorporateConnection/VolunteerOpportunities/Main_Page.htm"; break; }
    case "sidemenu_item7_item9_item4": { window.document.location.href = RM_Directory_Path+"CorporateConnection/MatchingGifts/Main_Page.htm"; break; }
    case "sidemenu_item7_item9_item5": { window.document.location.href = RM_Directory_Path+"CorporateConnection/StaffInvolvement/Main_Page.htm"; break; }
    case "sidemenu_item9": { window.document.location.href = RM_Directory_Path+"RadioShow/Main_Page.htm"; break; }
    case "sidemenu_item10": { window.document.location.href = RM_Directory_Path+"PrivacyPolicy/Main_Page.htm"; break; }
    case "HostedBy": { window.document.location.href = RM_Directory_Path+"HostedBy/Main_Page.htm"; break; }
    default: { break; }
  }
}
function AddToPartsArray(PartsArray, Part) {
  // Enter Part into next element of PartsArray
  var PartsCount = PartsArray.length;
  PartsArray[PartsCount] = Part;
}
function ShowOnePart(PartsBase, Part) {
  PartsArray = new Array();
  var RotateSpeed = 0;
  // Add Part to PartsArray
  AddToPartsArray(PartsArray, Part);
  // Display the Part
  ShowParts(PartsBase, PartsArray, RotateSpeed);
}
function ShowParts(PartsBase, PartsArray, RotateSpeed) {
  var PartsCount = PartsArray.length;
  var PartsIndex = 0;
  var PartsName = "";
  var PartsFile = "";
  var PartsYear = "";
//  if ((RotateSpeed <= 0) || (PartsCount == 1 )) {
  if ((RotateSpeed <= 0) || (PartsCount == 1) || (BrowserDetect.browser != "Firefox") || (BrowserDetect.OS != "Windows")) {
//  Non-Rotating Random (or single part) section
    var now = new Date();
    var sec = now.getSeconds();
    PartsIndex = sec % PartsCount;
    PartsName = PartsArray[PartsIndex];
    PartsFile = PartsName.substring(0, PartsName.indexOf("-"));
    if (PartsName.substring(0, 3) == "Box") {
      PartsYear = PartsName.substring(3, 7);
    } else if (PartsName.substring(0, 3) == "Mai") {
      PartsYear = PartsName.substring(7, 11);
      PartsFile = "MainBox";
    } else if (PartsName.substring(0, 3) == "Dou") {
      PartsYear = PartsName.substring(9, 13);
    } else {
      PartsYear = PartsName.substring(5, 9);
    }
    document.write('<script language="JavaScript" src="'+RM_Directory_Path+'/Parts/'+PartsYear+'/'+PartsName+'/'+PartsFile+'.js"></script>');
  } else {
//  Rotating section
    document.write('<div style="position: relative">');
    for (PartsIndex = 0; PartsIndex < PartsCount; PartsIndex++) {
      PartsName = PartsArray[PartsIndex];
      PartsFile = PartsName.substring(0, PartsName.indexOf("-"));
      if (PartsName.substring(0, 3) == "Box") {
        PartsYear = PartsName.substring(3, 7);
      } else if (PartsName.substring(0, 3) == "Mai") {
        PartsYear = PartsName.substring(7, 11);
        PartsFile = "MainBox";
      } else if (PartsName.substring(0, 3) == "Dou") {
        PartsYear = PartsName.substring(9, 13);
      } else {
        PartsYear = PartsName.substring(5, 9);
      }
      if (PartsIndex == 0) document.write('<div id="'+PartsBase+'_Loc"><div><script language="JavaScript" src="'+RM_Directory_Path+'/Parts/'+PartsYear+'/'+PartsName+'/'+PartsFile+'.js"></script></div></div>');
      document.write('<div id="'+PartsBase+'_'+PartsIndex.toString()+'" style="position: absolute; top: 0px; left: 0px; visibility: hidden; display: none"><div><script language="JavaScript" src="'+RM_Directory_Path+'/Parts/'+PartsYear+'/'+PartsName+'/'+PartsFile+'.js"></script></div></div>');
    }
    document.write('</div>');
    var TimeoutCall = "RotateParts('" + PartsBase + "'," + PartsCount.toString() + ",0," + RotateSpeed.toString() + ")";
    PartsTimeoutId = setTimeout(TimeoutCall, RotateSpeed);
  }
}
function RotateParts(PartsBase, PartsCount, PartIndex, RotateSpeed) {
    if (PartsTimeoutId != null) clearTimeout(PartsTimeoutId);
    var NextPartIndex = PartIndex + 1;
    if (NextPartIndex >= PartsCount) NextPartIndex = 0;
//    alert("RotateParts: "+PartsBase);
    var LocNode = document.getElementById(PartsBase+"_Loc");
//    if (LocNode == null) alert("Error: Location Node not found.");
    var PartNode = document.getElementById(PartsBase + "_" + NextPartIndex.toString());
//    if (PartNode == null) alert("Error: Next Part Node not found.");
    if ((LocNode != null) && (PartNode != null)) {
//      var LocNodeChild = LocNode.firstChild;
//      if (LocNodeChild == null) alert("Error: Location child not found.");
//      var PartNodeChild = PartNode.firstChild;
//      if (PartNodeChild == null) alert("Error: Next Part child not found.");
//      var ClonedPartNodeChild = PartNodeChild.cloneNode(true);
//      if (LocNodeChild == null) alert("Error: Could not clone Part.");
//      LocNode.replaceChild(ClonedPartNodeChild, LocNodeChild);
      LocNode.replaceChild(PartNode.firstChild.cloneNode(true), LocNode.firstChild);
    }
    var TimeoutCall = "RotateParts('" + PartsBase + "'," + PartsCount.toString() + "," + NextPartIndex.toString() + "," + RotateSpeed.toString() + ")";
    PartsTimeoutId = setTimeout(TimeoutCall, RotateSpeed);
}
function MapPageAds() {
  PartsArray = new Array();
  var RotateSpeed = 0;

  // Add to PartsArray the names of all the Box Ads you want to run
  AddToPartsArray(PartsArray, "Box2005_13-Socks");
  AddToPartsArray(PartsArray, "Box2005_14-Thrifty Coupon");
  AddToPartsArray(PartsArray, "Box2005_15-Volunteer");
  AddToPartsArray(PartsArray, "Box2008_31-Tuckins");
  AddToPartsArray(PartsArray, "Box2004_14-ClickAwayHunger");
  AddToPartsArray(PartsArray, "Box2008_28-CarTrade");
  AddToPartsArray(PartsArray, "Box2006_30-Toiletries");

  // Display the Box Ads
  ShowParts("MAPAD", PartsArray, RotateSpeed);
}
