//********************************************************************************
//this series of functions enables the rotation of images at the top of the page and stops it as required
//initiates the counter for changeImg()
var str = document.cookie;
var num = str.slice(5);
				var n = 0;

//the function changeImg() loads an array of relevant images and displays them on the page in the element id= image

				function changeImg(){
					var pix = new Array ('cars.jpg','flowers15.jpg','mailCoach.jpg','tracEng-red.jpg','tractors.jpg','woodCrafts.jpg','tob.jpg','oldbikes.jpg','carline.jpg','falcon.jpg','suffolk-ih.jpg','onlookers.jpg','statEng1.jpg','statEng2.jpg','lurchers.jpg','balloon.jpg','brassBand.jpg');				
						n++;
					if (n == pix.length){
						n = 0;
					}
						var picture = "rotation/" + pix[n];
						document.getElementById("image").src = picture;
						document.cookie = "pict =" + n;
					}	
					
				
				
//this ends changeImg and starts the function to control the timing
				
				var t = setInterval('changeImg()','2000');
				
//this ends the timing and defines a function stopHere() to stop the slideshow by clicking on the image showing
				
				function stopHere(){
					clearInterval(t);
				}
				
//end of stopHere()
//********************************************************************************
//function unhide() and hide() - the reverse, to display hidden text in content, accepts id of article and id of button's as args.
				function unhide(art,btnh,btns){
					document.getElementById(art).style.display='block';
					//document.getElementById(btnh).style.display='none';
					//document.getElementById(btns).style.display='block';
				}
				/*function hide(art,btnh,btns){
					document.getElementById(art).style.display='none';
					document.getElementById(btnh).style.display='block';
					document.getElementById(btns).style.display='none';
				}*/
//end function unhide, start of menu controls
				function menuUnhide(){
					document.getElementById('iniHide').style.display='block';
				}
				function mouseOverMenu(ident){
				document.getElementById(ident).style.backgroundImage = 'url(images/bg/act_menuBG.jpg)';
				document.getElementById(ident).style.border = 'inset #edcc98 0.1em';
    		}
    		function mouseOutMenu(ident){
    				document.getElementById(ident).style.backgroundImage = 'url(images/bg/menuBG.jpg)';
    				document.getElementById(ident).style.border = 'outset #edcc98 0.1em';
    		}
//********************************************************************************			
//this function sends form data from the gallery folders to exp_gallery.php
function submitForm(txt,bground){
		document.write ("<form action='exp_gallery.php' method='get'>");
		document.write ('<input type="hidden" name="cat" value=  '+txt+'  />');
		document.write ('<input class="input" type="image" src="'+bground+'" alt="submit" />');
		document.write ("</form>");
	}
//********************************************************************************
//this function makes hidden objects appear, takes two args - identity and style parameter
function appear(ident, stile){
			document.getElementById(ident).style.display = stile;
}
//********************************************************************************
