function clearBox(f) {
	if(f.defaultValue==f.value) {
		f.value = '';	
	}
}

function restoreBox(f) {
	if(f.value=='') {
		f.value = f.defaultValue;	
	}
}

function s(id) {
	document.getElementById(id).style.display = 'block';
}

function h(id) {
	document.getElementById(id).style.display = 'none';
}

function runSlideShow() {
	if (document.all){
		document.images.PictureBox.style.filter="blendTrans(duration=2)";
		document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
		document.images.PictureBox.filters.blendTrans.Apply();
	}
	document.images.PictureBox.src = preLoad[jss].src;
	if (document.getElementById) document.getElementById("link-url").href = Caption[jss];
	if (document.all) document.images.PictureBox.filters.blendTrans.Play();
	jss = jss + 1;
	if (jss > (pss)) jss=1;
	tss = setTimeout('runSlideShow()', SlideShowSpeed);
}

function loadMap() {
	if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("map"));
		var point = new GLatLng(53.382310865931494,-1.467200517654419);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		map.setCenter(point, 16);
		
		function createMarker(point, icon, html) {
			var marker = new GMarker(point, icon);
			GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowHtml(html);
			});
			return marker;
		}
		
		/* add cutlers */
		var addresses = Array();
		addresses[0] = Array(53.382310865931494,-1.467200517654419,'logo-small.png',"<strong>The Cutler's Hotel</strong><br>George Street<br>Sheffield<br>South Yorkshire");
		
		var icon = new GIcon();
		icon.shadow = "/images/msmarker_shadow.png";
		icon.iconSize = new GSize(24, 22);
		icon.shadowSize = new GSize(59, 32);
		icon.iconAnchor = new GPoint(12, 11);
		icon.infoWindowAnchor = new GPoint(12, 0);
		icon.image = "/images/"+addresses[0][2];		
		var point = new GLatLng(addresses[0][0], addresses[0][1]);
		map.addOverlay(createMarker(point, icon, addresses[0][3]));		
		
		
		/* other locations */
		addresses[1] = Array(53.38141493240704,-1.465526819229126,'yellow.png',"<strong>Arundel Gate Carpark</strong><br />Arundel Gate<br />Sheffield<br />S1 2PN");
		addresses[2] = Array(53.379309414419204,-1.4670288562774658,'pink.png',"<strong>Millennium Gallery</strong><br>Arundel Gate<br>Sheffield<br>S1 2PP ");
		addresses[3] = Array(53.380250190641895, -1.4680910110473632,'pink.png',"<strong>Winter Garden</strong><br>Surrey Street<br>Sheffield<br>S1 2LH");
		addresses[4] = Array(53.38069817201424, -1.4724254608154296,'orange.png',"<strong>Sheffield City Hall</strong><br>Barkers Pool<br>Sheffield<br>S1 2JA");
		addresses[5] = Array(53.38249005037422, -1.4613211154937744,'green.png',"<strong>Ponds Forge</strong><br>Sheaf Street<br>Sheffield<br>S1 2BP");
		//addresses[6] = Array(53.381619718874646, -1.4714276790618896,'blue.png',"<strong>Strada</strong><br>6 Leopold Square<br>Leopold Street<br>Sheffield<br>S1 2FG ");
		//addresses[7] = Array(53.3817925066906, -1.4721035957336425,'blue.png',"<strong>Wagamama</strong><br>2 Leopold Square<br>Sheffield<br>S1 2JG");
		//addresses[8] = Array(53.37934141395189, -1.4698076248168945,'blue.png',"<strong>Piccolino</strong><br>4 Millennium Square<br>Sheffield<br>S1 2JL");
	
		var icon = new GIcon();
		icon.shadow = "/images/msmarker_shadow.png";
		icon.iconSize = new GSize(32, 32);
		icon.shadowSize = new GSize(59, 32);
		icon.iconAnchor = new GPoint(16, 32);
		icon.infoWindowAnchor = new GPoint(16, 0);
	
		for(i=1;i<addresses.length;i++) {
			icon.image = "/images/"+addresses[i][2];		
			var point = new GLatLng(addresses[i][0], addresses[i][1]);
			map.addOverlay(createMarker(point, icon, addresses[i][3]));
		}
	}
}