// JavaScript Document
function startpag()
{
	document.getElementById('pag1').style.display = "none";
	document.getElementById('pag2').style.display = "none";
	document.getElementById('pag3').style.display = "none";
	document.getElementById('pag4').style.display = "none";
	document.getElementById('pag5').style.display = "none";
	document.getElementById('pag6').style.display = "none";
	document.getElementById('pag7').style.display = "none";
	document.getElementById('pagdefault').style.display = "block";
}
function pagfunc(pagId)
{
	if(document.getElementById(pagId).style.display == "none")
	{
		startpag();
		document.getElementById(pagId).style.display = "block";
		document.getElementById('pagdefault').style.display = "none";
	}
	else
	{
		startpag();
	}
}


/// photo gallery
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;
  }
}

var previousToggle=null;
function toggleMe(a){
  var e=document.getElementById(a);
  if(!e)return true;
  if(e.style.display=="none"){
    e.style.display="block";
    if(previousToggle)previousToggle.style.display="none";
    previousToggle=e;
  }
  return true;
}

/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Mr J | http://www.huntingground.net/ */

scrollStep=1

timerLeft=""
timerRight=""

function toLeft(id){
  document.getElementById(id).scrollLeft=0
}

function scrollDivLeft(id){
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft+=scrollStep
  timerRight=setTimeout("scrollDivLeft('"+id+"')",5)
}

function scrollDivRight(id){
  clearTimeout(timerLeft)
  document.getElementById(id).scrollLeft-=scrollStep
  timerLeft=setTimeout("scrollDivRight('"+id+"')",5)
}

function toRight(id){
  document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth
}

function stopMe(){
  clearTimeout(timerRight) 
  clearTimeout(timerLeft)
}
