
		//The location of furniture pics goes here, if online this can just be "/furniture"
		var imageLocation = "furniture/tables/image";

		//The other image location goes here, i.e. any pic not of furniture, like
		//the title or the button images, if online this can just be "/images"
		var animationStills = "images/";

		//The font in which the information text appears
		var font = "<font face=\"Arial\">";

	 	// The information that matches the above images, i.e. info[1] is
	 	// the text that appears next to image i1 above. If you want to add
	 	// a new line of text to these just put another <br> (thats a break
	 	// line tag, to start a new line)followed by the text anywhere in the
	 	// strings below, as long as it is within the "quotes.

	 	// Remember to change to number of pieces below if some are added or
	 	// taken out.

	 	var numberOfPieces = 5;
	 	var info = new Array (numberOfPieces);
	 	

		info [1] = font + "<ul><li>old continental antique pine washstand with drawer <li>height:30\"<li>width:36\"<li>depth:20\"<li>ref1 price:£225 sale £199 sold";
	 	info [2] = font + "<ul><li>table with lock and key<li>height:30\"<li>width:36.5\"<li>depth:28\"<li>ref2 price:£245 sold";
	 	info [3] = font + "<ul><li>This tables can be made to measure when we have timber in stock<li>This is an example of a scrub top table with turned legs<li>width:36\"<li>length:60\"<li>75 year old top with new legs ref 3 £350";
        info [4] = font + "<ul><li>continental original antique pine table<li>height:32\"<li>width:41\"<li>depth:30\"ref 4 price:£245 ";
        info [5] = font + "<ul><li>original pine washstand with draw <li>height:31\"<li>width:36\"<li>depth:22\"<li>ref 5 price:£225 sale £199 ";

	 	// The number of items in the gallery
	 	maxPic = numberOfPieces;
                
		var alt = new Array (numberOfPieces);

		alt[1] = "antique pine table";
		alt[2] = "antique pine table";
		alt[3] = "antique pine table";
        alt[4] = "antique pine table";
		alt[5] = "antique pine table";

		count = 1;
		function next() {
			count++;
			if (count > maxPic) {
				count = 1;
			}
			eval("document.p.src=\"" + imageLocation + count + ".jpg\"");
			eval("document.p.alt=\"" + alt[count] + "\"");
                        target = document.getElementById("info");
			target.innerHTML=info[count];
		}

		function back() {
			count--;
			if (count <= 0) {
				count = maxPic;
			}
                        eval("document.p.src=\"" + imageLocation + count + ".jpg\"");
                        eval("document.p.alt=\"" + alt[count] + "\"");
                        target = document.getElementById("info");
			target.innerHTML=info[count];
		}

		function link() {
			window.open(document.p.src,'','width=400,height=500,scrollbars=yes,menubar=no,resizable=yes,toolbar=no,location=no,status=no');
		}

		function alternative() {
                          
            var stringIndex = document.p.src.indexOf("jpg") - 1;
			var altImage = document.p.src.substring(0,stringIndex);
			var filePath = altImage + "Alt.jpg";
			var checkFile = new Image;
			checkFile.src=filePath;
			
			if(checkFile.complete)
            {
            	window.open(filePath,'','width=400,height=500,scrollbars=yes,menubar=no,resizable=yes,toolbar=no,location=no,status=no');
            } else {
            	pausecomp(3000);
            	if(checkFile.complete)
	            {
	            	window.open(filePath,'','width=400,height=500,scrollbars=yes,menubar=no,resizable=yes,toolbar=no,location=no,status=no');
	            } else {
                	window.open("fileNotFound.html")
                }
            }                    
		}	
		
		function pausecomp(millis)
		{
			var date = new Date();
			var curDate = null;			
			do { curDate = new Date(); }
			while(curDate-date < millis);
		}

  		function changeURL(target){
 			document.URL=target;
		}

                function checkCookie(name)
                {
                       var dc = document.cookie;
		       var prefix = name + "=";
                       var begin = dc.indexOf("; " + prefix);
                       if (begin == -1)
                       {
                           begin = dc.indexOf(prefix);
                           if (begin != 0) return null;
                       }
                       else
                       {
                           begin += 2;
                       }
                       var end = document.cookie.indexOf(";", begin);
                       if (end == -1)
                       {
                           end = dc.length;
                       }
                       var index = unescape(dc.substring(begin + prefix.length, end));
                       eval("document.p.src=\"" + imageLocation + index + ".jpg\"");
		       eval("document.p.alt=\"" + alt[index] + "\"");
                       target = document.getElementById("info");
		       target.innerHTML=info[index];
                       deleteCookie("index");
                }

		function deleteCookie(name, path, domain)
		{
		    if (getCookie(name))
		    {
		        document.cookie = name + "=" +
		            ((path) ? "; path=" + path : "") +
		            ((domain) ? "; domain=" + domain : "") +
		            "; expires=Thu, 01-Jan-70 00:00:01 GMT";
		    }
		}
