function blurit() {  
	// blur <a
	lnks = document.getElementsByTagName('a');
	for (i = 0; i < lnks.length; i++) {
		lnks[i].onfocus = new Function("this.blur()");
		// build external target
		if (lnks[i].className.match(/external/)) {
      lnks[i].target = '_blank';
    }
	}
	// blur <area
	lnks = document.getElementsByTagName('area');
	for (i = 0; i < lnks.length; i++) {
		lnks[i].onfocus = new Function("this.blur()");
	}
}

function makePNG() {
	// set function onload="fixPNG(this);"
	imgs = document.getElementsByTagName('img');
	for (i = 0; i < imgs.length; i++) {
		imgs[i].onload = new Function("this.fixPNG()");
	}
}

function changeStyle(id, property) {
   document.getElementById(id).className = property;
}

activeButton = new String();
oldButton = "layerThumb";  
currentLayer = "layer1";

function show(id) {
  if (id != currentLayer) {
    hide(currentLayer);
    currentLayer = id;
    document.getElementById(id).style.display = "block";
	}
}
function hide(id) {
  document.getElementById(id).style.display = "none";
}

function buttonOver(buttonId, property) {
  if (buttonId != activeButton) {
  	changeStyle(buttonId, property); 
	}		
}
function buttonOut(buttonId, property) {
  if (buttonId != activeButton) {
    changeStyle(buttonId, property);
  } else {
		oldButton = property;
	}
}
function buttonClick(buttonId, property) {
  if (buttonId != activeButton) {
  	if (activeButton != "") {
  	  changeStyle(activeButton, oldButton);
		}
		changeStyle(buttonId, property);
		activeButton = buttonId;	
  }
}



