function showPic (whichpic) {
 if (document.getElementById) {
  document.getElementById('placeholder')
  .src = whichpic.href;
  if (whichpic.title) {
   document.getElementById('desc')
  .childNodes[0].nodeValue = whichpic.title;
  } else {
   document.getElementById('desc')
  .childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
  }
  return false;
 } else {
  return true;
 }
}


function imgSwap(imgName,filename) {
if (document.images) {
document [imgName].src = filename;
}
}




var newwindow = ''
function popitup(url) {
if (newwindow.location && !newwindow.closed) {
    newwindow.location.href = url;
    newwindow.focus(); }
else {
    newwindow=window.open(url,'htmlname','width=380,height=380,resizable=1');}
}

function tidy() {
if (newwindow.location && !newwindow.closed) {
   newwindow.close(); }
}
// Based on JavaScript provided by Peter Curtis at www.pcurtis.com -->

function fp_show(tab) {
    for (i = 1; i < 5; i++) {
	for (j = 1; j < 5; j++) {
	    if (j == tab) {
		document.getElementById('prod'+i+j).style.display='block';
	    } else {
		document.getElementById('prod'+i+j).style.display='none';
	    }
	}
	if (i == tab) {
	    document.getElementById('tab'+i).setAttribute('class', 'tabhighlighted');
	    document.getElementById('tab'+i).setAttribute('className', 'tabhighlighted');
	} else {
	    document.getElementById('tab'+i).setAttribute('class', 'tabbg');
	    document.getElementById('tab'+i).setAttribute('className', 'tabbg');
	}
    }
}

function sh_show(tab) {
    for (i = 1; i < 4; i++) {
	if (i == tab) {
	    document.getElementById('stage'+i).style.display='block';
	    document.getElementById('st'+i).setAttribute('class', 'tabhighlighted');
	    document.getElementById('st'+i).setAttribute('className', 'tabhighlighted');
	} else {
	    document.getElementById('stage'+i).style.display = 'none';
	    document.getElementById('st'+i).setAttribute('class', 'tabbg');
	    document.getElementById('st'+i).setAttribute('className', 'tabbg');
	}
    }
}

function sh_pic(tab) {
    for (i = 1; i < 3; i++) {
	for (j = 1; j < 5; j++) {
	    if (i == tab) {
		document.getElementById('showtab'+i+j).style.display='block';
	    } else {
		document.getElementById('showtab'+i+j).style.display='none';
	    }
	}
	if (i == tab) {
	    document.getElementById('shpic'+i).setAttribute('class', 'tabhighlighted');
	    document.getElementById('shpic'+i).setAttribute('className', 'tabhighlighted');
	} else {
	    document.getElementById('shpic'+i).setAttribute('class', 'tabbg');
	    document.getElementById('shpic'+i).setAttribute('className', 'tabbg');
	}
    }
}
