﻿function jumpAnchor() {
		var currentURL = document.location.href ;
		if ( currentURL.indexOf("#") != -1 ) {
			window.scrollBy(0,-130);
		}
	}
	
function showLayer(id){
	if (document.all)  {
		eval("document.all." + id + ".style.visibility='visible'");
	} else if (document.getElementById) {
		eval("document.getElementById('" + id + "').style.visibility='visible'");
	} else {
		eval("document." + id + ".visibility='visible'");
	}
}

function hideLayer(id){
	if (document.all)  {
		eval("document.all." + id + ".style.visibility='hidden'");
	} else if (document.getElementById) {
		eval("document.getElementById('" + id + "').style.visibility='hidden'");
	} else {
		eval("document." + id + ".visibility='hidden'");
	}
}

function alignDIV(obj) {
  // initialize object variables
  var allDIV;
  var spacerDIV;
  var link;

  // get the anchor name
  var aname = obj.href.substring(obj.href.indexOf('#') + 1);
  // strip out all url encoded spaces
  aname = aname.replace(/%20/gi,' ');
  // get the anchor object
  link = document.getElementsByName(aname)[0];

  // get all of the div tags on the page
  var divs = document.getElementsByTagName('div');
  // loop through until we find the two we are looking for
  for (var i=0;i<divs.length;i++) {
    // content DIV needed for IE
    if (divs[i].id == 'contain-all')
      allDIV = divs[i];
    // spacer DIV causing all of the problems
    if (divs[i].className == 'spacer-top')
      spacerDIV = divs[i];
  }

  // properly align the applicable scrollTop
  try {
    // this works in IE, but not Firefox...
    allDIV.scrollTop = link.offsetTop - spacerDIV.offsetHeight - 10;
    // ...so we do this to make it work in FF.
    document.body.scrollTop = link.offsetTop - spacerDIV.offsetHeight - 10;
  } catch(e) {}
}

