	//
	//this function shows appropriate information in the main page when the Show Details tab is selected on the
	//google map
	//
	function displayindexpage(id,header,formname){
		//
		//had to build  a header without spaces so built header name with underscores and decoded them here
		//
		header=header.replace(/_/g," ");
		if  (formname != ''){
			var displaytext=document.getElementById(formname).innerHTML;
			//var displaytext=document.inform.formname.value;
			//var xxx='document.'+ formname + '.display_' + id + '.value';
			//displaytext=xxx;
			//due to javascript constraints
			//had to build a command line without ' and spaces to get data back from ajax lookup
			//this allows me to put the a href commands in the displayed header
			//
			displaytext=displaytext.replace(/#/g,"'");
			displaytext=displaytext.replace(/###/g," ");
			//alert(displaytext);
			document.getElementById("text_title").innerHTML = header + displaytext;
		}
		else {
			document.getElementById("text_title").innerHTML = header;
		}
		select_activity(id);
		}
	function displaylocationpage(id,header){
		header=header.replace(/_/g," ")
		document.getElementById("text_title").innerHTML = header;
		select_location(id);
		}
	function displaycarparkpage(id,header){
		header=header.replace(/_/g," ")
		document.getElementById("text_title").innerHTML = header;
		select_carpark(id);
		}
	function show_search_page() {
		//var LocLinkText = document.forms['search'].elements['LocLinkText_hidden'].value
		var LocLinkText = document.getElementById("LocLinkText_hidden").value;
		if (!LocLinkText){
			alert('Please enter a search string');
		}
		else {
			//alert(LocLinkText);
			var strsplit=LocLinkText.split("xxx");
			var type=strsplit[0];
			var id=strsplit[1];
			var header=strsplit[2];
			//alert(type+","+id+","+header);
			if (type=="A"){
				var progsrc="http://enjoy.pcnpa.org.uk/new_site/includes/location_map_activities.asp?LocLinkID=" + id
				var html= "<iframe id = 'map_frame' src='"+progsrc+"' frameborder='0' scrolling='no'></iframe>"
				//alert (html);
				showsearchmap(html)
				displayindexpage(id,header,'');
			}
			else if (type == "L"){
				var progsrc="http://enjoy.pcnpa.org.uk/new_site/includes/location_map_locations.asp?Locid=" + id
				var html= "<iframe id = 'map_frame' src='"+progsrc+"'  frameborder='0' scrolling='no'></iframe>"
				//alert (html);
				showsearchmap(html)
				displaylocationpage(id,header);
			}
			else if (type == "C"){
			var progsrc="http://enjoy.pcnpa.org.uk/new_site/includes/location_map_activities.asp?LocLinkID=" + id
			//	var progsrc="http://enjoy.pcnpa.org.uk/new_site/includes/location_map_carparks.asp?CarParkid=" + id
				var html= "<iframe id = 'map_frame' src='"+progsrc+"'  frameborder='0' scrolling='no'></iframe>"
				//alert (html);
				showsearchmap(html)
				//displaycarparkpage(id,header);
				displayindexpage(id,header,'');
				
			}

		}
	}
	//
	var frameName="map_frame";
	function openIFrame(iFrameId,winURL)
	{
		ifId=gmobj(iFrameId);
		iFrameId.onreadystatechange=fnStartInit();
		ifId.src=winURL;
	}

	function fnStartInit() {
		frameName.onLoad=loading();
	}

	function loading() {
		frameName.innerText = "<h1>Loading...</h1>";
	}

	function checkMe(e, win) {
  		alert(win.location.href);
	}

	
//
//
