
		//The location of furniture pics goes here, if online this can just be "/furniture"
		var imageLocation = "furniture/potcupboards/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=\"Cataneo BT\">";

	 	// 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 = 22;
	 	var info = new Array (numberOfPieces);
	 	info [1] = font + "<ul><li> old antique pine food cupboard with drawers <li>height:53\"<li>width:38\"<li>depth:17\"<li>ref 1 price:£430 sold ";

	 	info [2] = font + "<ul><li> cupboard with with shelves<li>height:71.5\"<li>width:38\"<li>depth:18\"<li>ref 2 waxed price:£395 sold";
	 	info [3] = font + "<ul><li>desk <li>height:33\"<li>width:55\"<li>depth:29\"<li><li>ref 3 waxed price:£650   ";
	 	info [4] = font + "<ul><li>small hanging cupboard<li>height:31\"<li>width:17\"<li>depth:12\"price:£145  ref 4 ";
                info [5] = font + "<ul><li>linen press cupboard  <li>height:74.5\"<li>width:45\"<li>depth:22\"price:£650 now £625  ref 5 sold";
                info [6] = font + "<ul><li>original  pair of pot cupboards<li>height:31\"<li>width:15.5\"<li>depth:14\"<li>ref 6 waxed price:£285  ";
	 	info [7] = font + "<ul><li>restored original pot cupboards pair <li>height:31\"<li>width:17\"<li>depth:15\"<li>ref 7 waxed price:£285 ";
                info [8] = font + "<ul><li>original food cupboard lock and key<li>height:47.5\"<li>width:35\"<li>depth:16.5\"<li>ref 8  price :£395 sold";

                info [9] = font + "<ul><li>restored original hanging cupboard <li>height:32\"<li>width:24\"<li>depth:13\"<li>ref 9 waxed price:£180  ";
                info [10] = font + "<ul><li> antique pine linen press  <li>height:72.5\"<li>width:45\"<li>depth:21\"<li>ref 10 price:£650 now £625 sold";
	 	info [11] = font + "<ul><li>original pair of pot cupboards<li>height:32\"<li>width:16\"<li>depth:14\"<li>ref 11 price:£285 ";
	 	info [12] = font + "<ul><li>lift top washstand<li>height:41\"<li>width:32\"<li>depth:21\"<li>ref 12 sale price:£255 now £195";
                info [13] = font + "<ul><li>original pair of pot cupboards<li>height:32\"<li>width:18 \"<li>depth:15\"<li>ref 13 waxed price:£285  ";
                info [14] = font + "<ul><li>tall cupboard<li>height:73\"<li>width:24\"<li>depth:17.5\"price:£395  ref 14 sold";
                info [15] = font + "<ul><li>original pair of pot cupboards<li>height:31\"<li>width:15.5\"<li>depth:14.5\"<li>ref 15 waxed price:£285  ";
	 	info [16] = font + "<ul><li>one door cupboard with shelves <li>height:70\"<li>width:29\"<li>depth:16\"ref 16 price:£395 sold";
	 	info [17] = font + "<ul><li>painted distressed cupboard<li>height:83\"<li>width:48\"<li>depth:16\"price:£495 sale £395 ref 17 ";
                info [18] = font + "<ul><li>original  antique pine one door cupboard  <li>height:70\"<li>width:42\"<li>depth:16\"<li>ref 18 waxed price:£380 ";
                info [19] = font + "<ul><li>original two door cupboard static<li>height:72\"<li>width:46\"<li>depth:20\"<li>ref 19  price:£425 sold ";
                 info [20] = font + "<ul><li>pot cupboards original pair<li>height:30\"<li>width:18\"<li>depth:16\"<li>ref 20 price:£ sold ";
                info [21] = font + "<ul><li>antique pine bookcase  <li>height:74\"<li>width:45\"<li>depth:18\"<li>ref 21 price:£460 sale £395";
                info [22] = font + "<ul><li>original  cupboard with drawers <li>height:32\"<li>width:41\"<li>depth:24\"<li>ref 22 price:£295 ";

                	 	// The number of items in the gallery
	 	maxPic = numberOfPieces;

        var alt = new Array (numberOfPieces);

		alt[1] = "antique pine cupboard";
		alt[2] = "antique pine cupboard";
		alt[3] = "antique pine cupboard";
        alt[4] = "antique pine cupboard";
        alt[5] = "antique pine cupboard";
        alt[6] = "antique pine cupboard";
        alt[7] = "antique pine cupboard";
        alt[8] = "antique pine cupboard";
        alt[9] = "antique pine cupboard";
        alt[10] = "antique pine cupboard";
		alt[11] = "antique pine cupboard";
		alt[12] = "antique pine cupboard";

		alt[13] = "antique pine cupboard";
		alt[14] = "antique pine cupboard";
		alt[15] = "antique pine cupboard";
        alt[16] = "antique pine cupboard";
        alt[17] = "antique pine cupboard";
        alt[18] = "antique pine cupboard";
        alt[19] = "antique pine cupboard";
      	alt[20] = "antique pine cupboard";
        alt[21] = "antique pine cupboard";
        alt[22] = "antique pine cupboard";



		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.onload = function () {
				window.open(filePath,'','width=400,height=500,scrollbars=yes,menubar=no,resizable=yes,toolbar=no,location=no,status=no');
			};
			checkFile.onerror = function () {
				window.open("fileNotFound.html")
			}
			checkFile.src = filePath;

		}

		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";
		    }
		}
