		roll = new ubRoll()
		
		//init.add("roll.init()");
		// if you're not using the new init, just add roll.init() in the init function
		
		// primary object
		function ubRoll(){
			this.images = new Object()
			this.initialized = false;
		}
		
		// out and over methods
		ubRoll.prototype.over = ubRollOver;
		function ubRollOver(imgName){
			if(this.initialized){
				this.images[imgName].over();
			}
		}
		
		ubRoll.prototype.out = ubRollOut;
		function ubRollOut(imgName){
			if(this.initialized){
				this.images[imgName].out();
			}
		}		
		
		// initialize roll object by mapping named images
		ubRoll.prototype.init = ubRollInit;
		function ubRollInit(){
			if(document.layers){
				for(var i = 0; i < document.layers.length; i++){
					this.map(document.layers[i]);
				}
			}
			else if(document.getElementById){
				var imgs = document.getElementsByTagName("img");
				for(var i = 0; i < imgs.length; i++){
					this.mapImage(imgs[i]);
				}			
			}
			else if(document.all && !document.getElementById){
				for(var i = 0; i < document.images.length; i++){
					this.mapImage(document.images[i]);
				}				
			}			
			this.initialized = true;
		}
		
		// map images
		ubRoll.prototype.mapImage = ubRollMapImage;
		function ubRollMapImage(img){
			if(img.name.indexOf("_ROLL") != -1){
				this.images[img.name.substr(0,img.name.lastIndexOf("_"))] = new ubRollImage(img);
			}		
		}
		
		ubRoll.prototype.map = ubRollMap;
		function ubRollMap(div){
			if(document.layers){
				for (var i =0; i < div.document.images.length; i++){
					this.mapImage(div.document.images[i])
				}
				for (var i =0; i < div.document.layers.length; i++){
					this.map(div.document.layers[i])
				}
			}
		}		
		
		function ubRollImage(img){
			this.img = img;
			this.filePath = this.img.src.slice(0,this.img.src.lastIndexOf("."));
			this.baseSuffix = this.img.src.slice(this.img.src.lastIndexOf("."),this.img.src.length);
			var baseSrc = this.filePath.slice(0,this.filePath.lastIndexOf("_"));
			
						
			this.overSrc = baseSrc + "_on" + this.baseSuffix;
			this.outSrc = baseSrc + "_off" + this.baseSuffix;
			var preload = new Image(); 
			preload.src = this.overSrc; 
			preload.src = this.outSrc;
			
			//alert(img.id + "\nOver: " + this.overSrc + "\nOut: " + this.outSrc);
		}
		
		ubRollImage.prototype.over = ubRollImageOver
		function ubRollImageOver(){
			this.img.src = this.overSrc;
		}
		
		ubRollImage.prototype.out = ubRollImageOut
		function ubRollImageOut(){
			this.img.src = this.outSrc;
		}
