// JavaScript Document - last rev: 7/16/2008; Paul M. Hill
	function showme(pageID)
	{
		if(pageID==0)
		{
			switchVisible('home',1);// Make only this visible
			switchVisible('gallery1Spry_region',0);
			switchVisible('gallery2Spry_region',0);
			switchVisible('gallery3Spry_region',0);
			//switchVisible('gallery4Spry_region',0);
			//switchVisible('gallery5Spry_region',0);
			switchVisible('bio',0);
			//switchVisible('tour',0);
			switchVisible('contact',0);
			scrollWindow();
			rotateImage();
		}
		else if(pageID==1)
		{
			clearTimeout (TimerId); // clear out the image rotation timer - that is stop img rotation
			initRot();
			switchVisible('home',0);
			switchVisible('gallery1Spry_region',1); // Make only this gallery visible
			switchVisible('gallery2Spry_region',0);
			switchVisible('gallery3Spry_region',0);
			//switchVisible('gallery4Spry_region',0);
			//switchVisible('gallery5Spry_region',0)
			switchVisible('bio',0);
			//switchVisible('tour',0);
			switchVisible('contact',0);
			StartFilterTimer('Womens_Gallery1'); // filter out all of the images except these
			scrollWindow();
			clearTimeout (TimerId); // clear out the image rotation timer - that is stop img rotation
		}
		else if(pageID==2)
		{
			clearTimeout (TimerId); // clear out the image rotation timer - that is stop img rotation
			initRot();
			switchVisible('home',0);
			switchVisible('gallery1Spry_region',0);
			switchVisible('gallery2Spry_region',1); // Make only this gallery visible
			switchVisible('gallery3Spry_region',0);
			//switchVisible('gallery4Spry_region',0);
			//switchVisible('gallery5Spry_region',0)
			switchVisible('bio',0);
			//switchVisible('tour',0);
			switchVisible('contact',0);
			StartFilterTimer('Mens_Gallery2'); // filter out all of the images except these
			scrollWindow();
			clearTimeout (TimerId); // clear out the image rotation timer - that is stop img rotation
		}
		else if(pageID==3)
		{
			clearTimeout (TimerId); // clear out the image rotation timer - that is stop img rotation
			initRot();
			switchVisible('home',0);
			switchVisible('gallery1Spry_region',0);
			switchVisible('gallery2Spry_region',0);
			switchVisible('gallery3Spry_region',1); // Make only this gallery visible
			//switchVisible('gallery4Spry_region',0);
			//switchVisible('gallery5Spry_region',0)
			switchVisible('bio',0);
			//switchVisible('tour',0);
			switchVisible('contact',0);
      //         getLayer('gallery3Spry_region').focus(); // put this gallery in focus
			StartFilterTimer('Headshots_Gallery3'); // filter out all of the images except these
			scrollWindow();
			clearTimeout (TimerId); // clear out the image rotation timer - that is stop img rotation
		}
		else if(pageID==4)
		{
			clearTimeout (TimerId); // clear out the image rotation timer - that is stop img rotation
			initRot();
			switchVisible('home',1);// No gallery4; Make home visible
			switchVisible('gallery1Spry_region',0);
			switchVisible('gallery2Spry_region',0);
			switchVisible('gallery3Spry_region',0);
			//switchVisible('gallery4Spry_region',0);
			//switchVisible('gallery5Spry_region',0)
			switchVisible('bio',0);
			//switchVisible('tour',0);
			switchVisible('contact',0);
//			StartFilterTimer(null);
			scrollWindow();
			clearTimeout (TimerId); // clear out the image rotation timer - that is stop img rotation
		}
		else if(pageID==5)
		{
			clearTimeout (TimerId); // clear out the image rotation timer - that is stop img rotation
			initRot();
			switchVisible('home',1);// No gallery5; Make home visible
			switchVisible('gallery1Spry_region',0);
			switchVisible('gallery2Spry_region',0);
			switchVisible('gallery3Spry_region',0);
			//switchVisible('gallery4Spry_region',0);
			//switchVisible('gallery5Spry_region',0)
			switchVisible('bio',0);
			//switchVisible('tour',0);
			switchVisible('contact',0);
//			StartFilterTimer(null);
			scrollWindow();
			clearTimeout (TimerId); // clear out the image rotation timer - that is stop img rotation
		}
		else if(pageID==100)
		{
			clearTimeout (TimerId); // clear out the image rotation timer - that is stop img rotation
			initRot();
			switchVisible('home',0);
			switchVisible('gallery1Spry_region',0);
			switchVisible('gallery2Spry_region',0);
			switchVisible('gallery3Spry_region',0);
			//switchVisible('gallery4Spry_region',0);
			//switchVisible('gallery5Spry_region',0)
			switchVisible('bio',1);// Make only this visible
			//switchVisible('tour',0);
			switchVisible('contact',0);
			scrollWindow();
			clearTimeout (TimerId); // clear out the image rotation timer - that is stop img rotation
		}
		else if(pageID==200)
		{
			clearTimeout (TimerId); // clear out the image rotation timer - that is stop img rotation
			initRot();
			switchVisible('home',0);
			switchVisible('gallery1Spry_region',0);
			switchVisible('gallery2Spry_region',0);
			switchVisible('gallery3Spry_region',0);
			//switchVisible('gallery4Spry_region',0);
			//switchVisible('gallery5Spry_region',0)
			switchVisible('bio',0);
			//switchVisible('tour',1);// Make only this visible
			switchVisible('contact',0);
			scrollWindow();
			clearTimeout (TimerId); // clear out the image rotation timer - that is stop img rotation
		}
		else if(pageID==300)
		{
			clearTimeout (TimerId); // clear out the image rotation timer - that is stop img rotation
			initRot();
			switchVisible('home',0);
			switchVisible('gallery1Spry_region',0);
			switchVisible('gallery2Spry_region',0);
			switchVisible('gallery3Spry_region',0);
			//switchVisible('gallery4Spry_region',0);
			//switchVisible('gallery5Spry_region',0)
			switchVisible('bio',0);
			//switchVisible('tour',0);
			switchVisible('contact',1);// Make only this visible
			scrollWindow();
			clearTimeout (TimerId); // clear out the image rotation timer - that is stop img rotation
		}
	}
//
	function switchVisible(id,viz) 
	{
		 if(viz==0)
		 {
			//document.getElementById(id).blur();
			document.getElementById(id).style.visibility="hidden";
			//getLayer(id).style.visibility = "hidden";
		 }
		else if(viz==1)
		{
		//document.getElementById(id).focus();
		document.getElementById(id).style.visibility="visible";
	//getLayer(id).style.visibility = "visible";
		}
		//  	alert("Debug switchVisible:  id= " + id + "   viz= " + viz + "  Browsers = " + ie4up + " " + ns4 + " "  + ns6up + "  getLayer(id)= " + getLayer(id));
	}//
	function switchTextDecoration(id,viz) 
	{
		 if(viz==0)
		 {
			//document.getElementById(id).blur();
			document.getElementById(id).style.textDecoration="none";
			//getLayer(id).style.visibility = "hidden";
		 }
		else if(viz==1)
		{
		//document.getElementById(id).focus();
		document.getElementById(id).style.textDecoration="underline";
	//getLayer(id).style.visibility = "visible";
		}
		//  	alert("Debug switchVisible:  id= " + id + "   viz= " + viz + "  Browsers = " + ie4up + " " + ns4 + " "  + ns6up + "  getLayer(id)= " + getLayer(id));
	}
	//
	//function getLayer(id) 
	//{	
	//	var x = eval('document.getElementById("'+id+'")')
//		alert("Debug: getlayer= " + id);
		//var ie4up = (document.all)? true : false;
		//var ns4   = (document.layers)? true : false;
		//var ns6up = (document.getElementById)? true : false;
	   // if (ns4) return eval('document.layers["'+id+'"]');
	   // if (ie4up) return eval('document.all["'+id+'"]');
	   // if (ns6up) return eval('document.getElementById("'+id+'")');
	   // return null;
//	}
//
function autotab(original)
{
//	var destination;
//	var b=original.value.length;
//	var c=original.getAttribute("maxlength");
	var d=original.getAttribute("name");
	//alert("debug pmh autotab: original.value.length="+ b  +"   original.getAttribute(maxlength)="+c+"  name="+d);
	if (original.getAttribute&&original.value.length==original.getAttribute("maxlength"))
		{
			if(d=="first")this.second.focus();
			else if(d=="second")this.third.focus();
			else return;
		}
}
//
function mousehelp(id,msg)
{
//	alert(debug: mouseOver help - id="+id+" and msg="+msg);
			if(msg==0)switchVisible('help_gallery',id);
	else if(msg==1)switchVisible('help_gallery1',id);
	else if(msg==2)switchVisible('help_gallery2',id);
	else if(msg==3)switchVisible('help_gallery3',id);
	else if(msg==4)switchVisible('help_gallery4',id);
	else if(msg==100)switchVisible('help_bio',id);
	else if(msg==200)switchVisible('help_studio',id);
	else if(msg==300)switchVisible('help_contactus',id);
	else if(msg==400)switchVisible('help_home',id);
}
//
function scrollWindow()
{
	window.scrollTo(10,10);
}
//
function underlineMe(galleryName)
{
	//alert("Debug underlineMe: galleryName= "+galleryName);
		if(galleryName=="Celebrity")
		{
			switchTextDecoration('name1',1);
			switchTextDecoration('name2',0);
			switchTextDecoration('name3',0);
			switchTextDecoration('name4',0);
		}
		else if(galleryName=="Womens")
		{
			switchTextDecoration('name1',0);
			switchTextDecoration('name2',1);
			switchTextDecoration('name3',0);
			switchTextDecoration('name4',0);
		}
		else if(galleryName=="Mens")
		{
			switchTextDecoration('name1',0);
			switchTextDecoration('name2',0);
			switchTextDecoration('name3',1);
			switchTextDecoration('name4',0);
		}
		else if(galleryName=="Headshots")
		{
			switchTextDecoration('name1',0);
			switchTextDecoration('name2',0);
			switchTextDecoration('name3',0);
			switchTextDecoration('name4',1);
		}
}