function preloadImages(the_images_array) {
  for (loop = 0; loop < the_images_array.length; loop++) {
    var an_image = new Image();
	an_image.src = the_images_array[loop]
  }
}


{
  var the_images = new Array('images/graphic_img.gif, images/large_img.gif, images/mailing_img.jpg, images/offset_img.jpg.gif, images/screen_img.jpg, images/sheet_img.jpg, images/roll_about.gif, images/roll_clientsamples.gif, images/roll_graphic.gif, images/roll_large.gif, images/roll_mailing.gif, images/roll_offset.gif, images/roll_quote.gif, images/roll_screen.gif, images/roll_sheetfed.gif');
  preloadImages(the_images);
}

function rollButton(butt){
	curr = butt.src;
	rExp = /roll_/gi;	
	res = curr.search(rExp);
	newname = getFileName(butt.src);
	if(res == -1){
		butt.src = "images/roll_" + newname
	}else{
		butt.src = "images/" +  newname.slice(5,newname.length)
	}
}

function getFileName(fil){
	nms = fil.split("/");
	return nms[nms.length - 1]
}
function showGraphics(butt){
	//rollButton(butt)
	img = getFileName(butt.src);
	rExp = /roll_/gi;	
	res = img.search(rExp);
	if(res == -1){
		butt.src = "images/roll_" + img
		
		dd = document.getElementById("img" + img);
	}else{
		img = img.slice(5,img.length)
		butt.src = "images/" +  img
		dd = document.getElementById("img" + img);
	}
	if(dd.style.display == "block"){
		dd.style.display = "none";
	}else{
		dd.style.display = "block";
	}		
}