var aRow1Images = new Array('home_01','poolsbrackets_04','bulletins_05','downloads_06','photogallery_07','mapsweath_09','toursearch_10')

for (var i=0; i<aRow1Images.length; i++){
	document.write("<a href='javascript:GoMenu(\"" + aRow1Images[i] + "\")' onMouseOver='msover(" + i + ")' onMouseOut='msout(" + i + ")'>")
	document.write("<img name='img" + i + "' src='/images/menu/" + aRow1Images[i] + ".jpg' height=19 border=0></a>")
}

function msover(i){
	document.images['img' + i].src = "/images/menu/" + aRow1Images[i] + "-over.jpg"
}

function msout(i){
	document.images['img' + i].src = "/images/menu/" + aRow1Images[i] + ".jpg"
}

function GoMenu(sOption){
	var sURL = ''
	var iTourneyId = Number(getCookie('TourneyId'))

	if ('home_01accountsetuptoursearch_10'.indexOf(sOption)==-1 != ''){
		if (iTourneyId == 0){
			alert('You have not selected an active tournament.\nPlease go to Tournament Search and pick a tournament.')
			return
		}
	}

	switch (sOption){
		case 'home_01':
			sURL = '/'
			break
		case 'accountsetup':
			sURL = 'Account.asp'
			break;
		case 'tournadmin_02':
			break;
		case 'registration_03':
			break;
		case 'poolsbrackets_04':
			sURL = 'PoolsBrackets.asp'
			break;
		case 'bulletins_05':
			sURL = 'Bulletins.asp'
			break;
		case 'downloads_06':
			sURL = 'FilesDownload.asp'
			break;
		case 'photogallery_07':
			sURL = 'PhotoGallery.asp'
			break;
		case 'messagewizard_08':
			break;
		case 'mapsweath_09':
			sURL = 'Maps.asp'
			break;
		case 'toursearch_10':
			sURL = 'Featured.asp'
	}
	if (sURL != '/'){
		if (sURL != '')
			location.href = sURL
		else
			alert('This feature is under development.')
	}else
		location.href = '/'
}

function OpenWindow(url,label,width,height){
	var Winder = window.open(url,label,'menubar=0,location=0,toolbar=0,scrollbars=1,resizable=1,width=' + width + ',height=' + height)
	Winder.focus()
}