//	menu.js

			sep = '_sm.'
			w = h = 300
			date = ''
			month = new Array('','jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec')
			
			img_w = 124
			x_tot = 0
			
			gig = new Array()
			gigx = new Array()
			gig.length = 0


			function imageWindow(g, i) {
				
				src = gig[g].image[i].large.src
				the_title = gig[g].image[i].alt + " " + getDate(gig[g].name)
				
				openWindow(src,w,h,'no',the_title)
			}
			
			
			function getDate(d) {
				year = d.substr(0,4)
				mon = d.substr(4,2)
				day = d.substr(6,2)
//				alert(mon)
//				mon = parseInt(mon)
//				alert(mon + ' ' + month[mon])
				if ( mon == '08' )
					mon = 8
				if ( mon == '09' )
					mon = 9
				
				d = day + month[parseInt(mon)] + year
				return d
			}
						
			
			var oldInfo = ''
			
			function getInfo(that, reset) {
				if(reset)
				{
//					document.forms.info.elements.content.value = oldInfo
					setText('menu_gallery','info', oldInfo)
				}
				
				for ( i=0; i<gig.length; i++ ) 
					if(gig[i].name == that) {
						oldInfo = getText('menu_gallery','info')
						// document.forms.info.elements.content.value
//						document.forms.info.elements.content.value = gig[i].description
						setText('menu_gallery','info', gig[i].description)
					}
			}
			
			
			function setText (p, id, text)
			{
				if ( !text || text == 'undefined' )
					text = ''
				node = parent[p].document.getElementById(id)
				node.innerHTML = text
//				node.firstChild.nodeValue = text	
			}


			function getText (p,id)
			{
				node = parent[p].document.getElementById(id)
				if ( node.firstChild )
					return(node.firstChild.nodeValue)
				else
					return
			}
						
						
			function slideways(that)
			{
				for ( i=0; i<gig.length; i++ ) 
					if(gig[i].name == that) {
//						alert(gig[i].x/img_w)
						scroller(gig[i].x,0,parent.gallery)
						getInfo(that)
					}
			}
			
						
			function getArtist(that, reset) {
				if(reset)
					setText('menu_gallery','info','')
				else
					setText('menu_gallery','info', that.alt)
			}
			
						
			function init() {
			
				for ( i = 1 ; i < gig.length; i ++ ) {
					if ( gig[i-1].image.length == 0 )
						gig[i].x = gig[i-1].x
					else
						gig[i].x = gig[i-1].x + (gig[i-1].image.length + 1) * img_w
					
//					alert(gig[i].x)
				}
			
				if(location.search.substr(1))
					slideways(location.search.substr(1))
				else
					scroller(gig[gig.length-1].x,0,self)
			}

	//		function init() {
		//		slideways(location.search.substr(1))
		//	}


		function newGig(name, img, x, description)
		{
			obj = new Object()
	
			obj.name = name
			obj.img = new Array(img)
			obj.x = x 
			obj.description = description
			obj.alt = description

			return obj
		}
	
	
		function newGigImage(thumb, large, description)
		{
			gigimage = new Object()
			
			gigimage.small = new Image()
			gigimage.small.src = thumb

			if (large)
			{
				gigimage.large = new Image()
				gigimage.large.src = large
			}
			
			gigimage.alt = description

			return gigimage
		}
		
