var cycleSpeed = 7000;
var crossFadeDuration = 30;
var Pic = new Array();
Pic[0] = 'pic1.jpg';
Pic[1] = 'pic2.jpg';
Pic[2] = 'pic3.jpg';

var t;
var j1 = 0;
var p = Pic.length;

var preLoad1 = new Array()
for (i = 0; i < p; i++){
   preLoad1[i] = new Image();
   preLoad1[i].src = 'images/'+Pic[i];
}


function showImages()
{
  cycle1();
}

function cycle1(){
   if (document.all){
      document.images.SlideShow1.style.filter="blendTrans(duration=4)";
      document.images.SlideShow1.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShow1.filters.blendTrans.Apply();
   }
   document.images.SlideShow1.src = preLoad1[j1].src;
   if (document.all){
      document.images.SlideShow1.filters.blendTrans.Play();
   }
   j1 = j1 + 1;
   if (j1 > (p-1)) j1=0;
   t = setTimeout('cycle1()', cycleSpeed);
}

function toggleLayer(show)
{
	if (document.getElementById)
	{	
		for (i=1;i<4;i++)
		{
			var e =document.getElementById('TD'+i);
			e.className = 'toolsMenu';
			var style = document.getElementById('Div'+i).style;
			style.display = 'none';
		}

		var e =document.getElementById('TD'+show);
		e.className = 'toolsMenuOn';
		
		// this is the way the standards work
		var style = document.getElementById('Div'+show).style;
		style.display = 'block';
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var style = document.all[show].style;
		style.display = style.display? "":"block";	
	}

	else if (document.layers)
	{
		// this is the way nn4 works
		var style = document.layers[show].style;
		style.display = style.display? "":"block";
	}


}

function toggleLayer1(show)
{
	if (document.getElementById)
	{	
		for (i=1;i<4;i++)
		{
			var e =document.getElementById('TD1'+i);
			e.className = 'toolsMenu';
			var style = document.getElementById('Div'+i).style;
			style.display = 'none';
		}

		var e =document.getElementById('TD1'+show);
		e.className = 'toolsMenuOn';
		
		// this is the way the standards work
		var style = document.getElementById('Div1'+show).style;
		style.display = 'block';
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var style = document.all[show].style;
		style.display = style.display? "":"block";	
	}

	else if (document.layers)
	{
		// this is the way nn4 works
		var style = document.layers[show].style;
		style.display = style.display? "":"block";
	}


}

function toolsWindow(location)
{
 window.open(location, "Tools","menubar=no,resizable=no,scrollbars=yes");
}

