// Mandy Patinkin JavaScript Document

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function changeStyle(id1, id2){
if (document.getElementById)
	{
		var nodeObj1 = document.getElementById(id1)
		nodeObj1.style.backgroundColor = '#87A2CF';
	}
	{
		var nodeObj2 = document.getElementById(id2)
		nodeObj2.style.backgroundColor = '#00468A';
	}
}

/* Using anchors in overflow:auto fix for Safari
 * see http://blog.deconcept.com/code/overflowsafari/overflowsafari.html
 * for more information
 *
 * Courtesy of Geoff Stearns ( geoff @ deconcept.com )
// the id of the element with overflow: auto set, in this case the div */

var targBox = "contentscroll";

function init() {
	if (document.getElementById) {
		var atags = document.getElementsByTagName("A");
		for (var i=0;i<atags.length;i++) {
			var ca = atags[i];
			if (ca.href.indexOf("#") > -1) {
				ca.onclick = function() {
					scrollDivToAnchor(this.href.split("#")[1]);
				}
			}
		}
	}
}

function scrollDivToAnchor(a) {

	var b = document.getElementById(targBox);
	b.scrollTop = document.getElementById(a).offsetTop - b.offsetTop;
}

if (navigator.userAgent.indexOf("Safari") > -1) {
	window.onload = init;
}

/* Courtesy of Peter-Paul Koch of quirksmode.org */

function popitup(url)
{
	newwindow=window.open(url,'name','height=450,width=800, resizable=yes');
	if (window.focus) {newwindow.focus()}
	return false;
}