function activateRolls() {
	xImgRollSetup('/static/img/nav/','-over','.gif','product-info','cust-service','referenceimg','bus-resources','about','great-lakes','southern','western','southwest','northeast');
	xImgRollSetup('/static/img/region/','-over','.png','spotlight.header.northeast');
	xImgRollSetup('/static/img/nav/utility/','-over','.gif','home','history','contact-pf','faq');
	xImgRollSetup('/static/img/tabs/','-over','.png','recent','popular','one','two','three');
	xImgRollSetup('/static/img/buttons/','-over','.png','search');
	xImgRollSetup('/static/img/buttons/','-over','.png','events2','news2','mostrecent','mostpop','upcalendarevent','pastcalendarevent');

}
xAddEventListener(window,'load',activateRolls);


function showPop(id) {
	e = xGetElementById(id);
	if (e) {
		xShow(e);
	}
} 
function hidePop(id) {
	e = xGetElementById(id);
	if (e) {
		xHide(e);
	}
  if(typeof(current_tab)!='undefined'){
	  keepOn(current_tab);
	}
}


function replaceTab(q){
  current_tab=q;
  var e = document.getElementById(q);
  e.src = '/static/img/nav/'+q+'-in.gif';
}
function keepActive() {
	if(document.getElementById('NewsBox').style.display=="none"){
	document.getElementById('events2').src = '/static/img/buttons/events2-on.png';
  }else{
	document.getElementById('news2').src = '/static/img/buttons/news2-on.png';
  }
}

function keepDocsActive() {
	if(document.getElementById('DocsRegionPop').style.display=="none"){
	document.getElementById('mostrecent').src = '/static/img/buttons/mostrecent-on.png';
  }else{
	document.getElementById('mostpop').src = '/static/img/buttons/mostpop-on.png';
  }
}		

function showRecent() {
  document.getElementById('popularTab').style.display="none";
  document.getElementById('recentTabTop').src = '/static/img/tabs/recent-in.png';
  document.getElementById('recentTab').style.display="block";
  document.getElementById('popularTabTop').src = '/static/img/tabs/popular.png';
}

function showPopular() {
  document.getElementById('recentTab').style.display="none";
  document.getElementById('popularTabTop').src = '/static/img/tabs/popular-in.png';
  document.getElementById('popularTab').style.display="block";
  document.getElementById('recentTabTop').src = '/static/img/tabs/recent.png';
}

function showRegionRecent() {
  document.getElementById('DocsRegionPop').style.display="none";
  document.getElementById('mostpop').src = '/static/img/buttons/mostpop.png';
  document.getElementById('DocsRegionRecent').style.display="block";
  document.getElementById('mostrecent').src = '/static/img/buttons/mostrecent-on.png';
}

function showRegionPop() {
  document.getElementById('DocsRegionRecent').style.display="none";
  document.getElementById('mostrecent').src = '/static/img/buttons/mostrecent.png';
  document.getElementById('DocsRegionPop').style.display="block";
  document.getElementById('mostpop').src = '/static/img/buttons/mostpop-on.png';
}

function showEvents() {
  document.getElementById('NewsBox').style.display="none";
  document.getElementById('events2').src = '/static/img/buttons/events2-on.png';
  document.getElementById('EventsBox').style.display="block";
  document.getElementById('news2').src = '/static/img/buttons/news2.png';
}

function showNews() {
  document.getElementById('EventsBox').style.display="none";
  document.getElementById('news2').src = '/static/img/buttons/news2-on.png';
  document.getElementById('NewsBox').style.display="block";
  document.getElementById('events2').src = '/static/img/buttons/events2.png';
}

function keepOn(tabname){
	if(typeof(current_tab)!='undefined'){
		replaceTab(current_tab);
	}
}

function showHint(tabNumber) {
	var numbers=new Array("","one","two","three");
  for (var x = 1; x <= 3; x++){
    document.getElementById('tipTab'+x).src = '/static/img/tabs/'+numbers[x]+'.png';
    if(document.getElementById('hhw-container'+x)){
      document.getElementById('hhw-container'+x).style.display="none";
    }
  }
  if(document.getElementById('hhw-container'+tabNumber)){
    document.getElementById('hhw-container'+tabNumber).style.display="block";
  } 
  document.getElementById('tipTab'+tabNumber).src = '/static/img/tabs/'+numbers[tabNumber]+'-in.png';
}

function hideElement(id_element){
    $(id_element).style.display = "none";
}

function showElement(id_element){
    $(id_element).style.display = "block";
}

	