// JavaScript Document

window.onload = initAll;


var currImg = 0;



var captionText = new Array(
	"Whether your need is posters, backlit displays, window, counter or floor graphics Kelmscott can help your company with your next retail display.",
	"Kelmscott can help your company with your next trade show or grass-roots marketing effort. Look to Kelmscott for your signage and banner needs.",
	"A rotating pole sign campaign is a great way to advertise a business, sponsor an event and improve curb appeal. Heavy-duty, long-lasting vinyl to withstand all weather conditions.",
	"Indoor and outdoor banners - with grommets, pole pockets, or Velcro to meet your size, durability and hanging requirements.",
	"Indoor and outdoor banners - with grommets, pole pockets, or Velcro to meet your size, durability and hanging requirements.",
	"Reach your customers while you're sure to have their attention. Three-sided kiosk designs and point of purchase signage provide maximum visibility and provide arms-reach storage for marketing materials, products, and special offers.",
	"Tradeshow signage must be both creative and practical. Kelmscott achieves both goals with attractive design and functional finishing. Booth sign can be finished with Velcro, grommets or pole pockets for your easy tradeshow display.",
	"Create a marketing piece on wheels! Full vehicle wraps from design to installation.",
	"Use of all of your square footage to advertise your goods and services, including your floors! Safety-certified floor graphics can be printed and die cut to any shape or size and are easy clean.",
	"No surface should go unadvertised! These concrete graphics were printed and adhered to a non-slip surface with extreme adhesive for bike and skate parks.",
	"Make a splash at your next industry event by freshening up your company signage.  Let Kelmscott designers and our production team develop a corporate backdrop that is professional and targeted."
	
	
	
)
var captionTitle = new Array(
	"POP Displays",
	"Signage Banners",
	"Pole Signs",
	"Banners",
	"Banners",
	"Point of Purchase",
	"Tradeshow Signage",
	"Vehicle Wraps",
	"Floor Graphic",
	"Concrete Graphic",
	"Trade Show Signage"
	
	
	
	
)

//JY----------------------

function initAll(myIndex) {
	if (myIndex != null)
	window.location.href="work_wide.php?pid=" + myIndex + "#slideshow";
	if (myIndex == "" || myIndex == null || myIndex < 0)
		myIndex = 0;
		
	document.getElementById("slideshow").src = "images/gallery2img/wideImg" + myIndex + ".jpg";
	document.getElementById("imgTitle").innerHTML = captionTitle[myIndex];
	document.getElementById("imgText").innerHTML = captionText[myIndex];
	document.getElementById("prevLink").onclick = processPrevious;
	document.getElementById("nextLink").onclick = processNext;
	if (myIndex != currImg)
	currImg = myIndex;
}


//------------------------





//function initAll() {
//	document.getElementById("imgTitle").innerHTML = captionTitle[0];
//	document.getElementById("imgText").innerHTML = captionText[0];
//	document.getElementById("prevLink").onclick = processPrevious;
//	document.getElementById("nextLink").onclick = processNext;
//}

		

function processPrevious() {
	newSlide(-1);
}

function processNext() {
	newSlide(1);
}

function newSlide(direction) {
	var imgCt = captionText.length;
	
	currImg = currImg + direction;
	if (currImg < 0) {
		currImg = imgCt-1;
	}
	if (currImg == imgCt) {
		currImg = 0;
	}
	document.getElementById("slideshow").src = "images/gallery2img/wideImg" + currImg + ".jpg";
	document.getElementById("imgText").innerHTML = captionText[currImg];
	document.getElementById("imgTitle").innerHTML = captionTitle[currImg];
}
