// (c) www.stocksoftware.co.uk 2007

function attractionlisthandler(ListNumber)
{
var LinkURL;
switch(ListNumber)
	{
	case 1:
		if (document.attractiondropdowns.administrative.selectedIndex < 0) 
			{document.attractiondropdowns.administrative.selectedIndex = 0}
		LinkURL = document.attractiondropdowns.administrative.options[document.attractiondropdowns.administrative.selectedIndex].value;
		LinkURL = "http://www.escapeandexplore.co.uk/attractions/area/" + LinkURL;
		break;
	case 2:
		if (document.attractiondropdowns.unitary.selectedIndex < 0) 
			{document.attractiondropdowns.unitary.selectedIndex = 0}
		LinkURL = document.attractiondropdowns.unitary.options[document.attractiondropdowns.unitary.selectedIndex].value;
		LinkURL = "http://www.escapeandexplore.co.uk/attractions/area/" + LinkURL;
		break;
	case 3:
		if (document.attractiondropdowns.historic.selectedIndex < 0) 
			{document.attractiondropdowns.historic.selectedIndex = 0}
		LinkURL = document.attractiondropdowns.historic.options[document.attractiondropdowns.historic.selectedIndex].value;
		LinkURL = "http://www.escapeandexplore.co.uk/attractions/hc/" + LinkURL;
		break;
	case 4:
		if (document.attractiondropdowns.type.selectedIndex < 0) 
			{document.attractiondropdowns.type.selectedIndex = 0}
		LinkURL = document.attractiondropdowns.type.options[document.attractiondropdowns.type.selectedIndex].value;
		LinkURL = "http://www.escapeandexplore.co.uk/attractions/type/" + LinkURL;
		break;
	}
window.location.href = LinkURL;
}

function viewstandard(entrycode) 
{
	var windowid;
	var standardurl="http://www.escapeandexplore.co.uk/attractions/pages/" + entrycode + ".htm";
	windowid=window.open(standardurl,'standardadvert','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes,width=500,height=500');
	windowid.focus();
}


function launchindex() 
{
var indexwid;
indexwid=window.open('http://www.escapeandexplore.co.uk','siteindex','toolbar=yes,location=no,directories=no,status=yes,menubar=yes,resizable=yes,copyhistory=yes,scrollbars=yes,width=800,height=600');
indexwid.blur();
}

// Menu actions are passed to this function for execution

function perform(method,org,et,ec,sl,pc,fn,pn,mn,ma,wa,loc,pid,plat,plong)
{
	

	if (method=="location")
	{
		// Some Orgs contain & arguments these need to be converted before passing
		messagebox = org.replace(/&amp;/g,"%26");
		messagebox = messagebox + " is located in or nearby " + loc;
				
		link = "http://www.escapeandexplore.co.uk/tools/map_viewer.htm?title="+messagebox+"&lat="+plat+"&long="+plong
		NewWindow('standardchild',link,800,600,'no','yes','no','no');
	}

	if (method=="website")
	{
		// Some URL's contain & arguments these need to be converted before the link is made
		wa = wa.replace(/&amp;/g,"%26");

		link = "http://www.escapeandexplore.co.uk/tools/link_viewer.asp?mode=log&entrycode="+ec+"&link="+wa;
		NewWindow('standardchild',link,800,600,'yes','yes','yes','yes');
	}

	if (method=="nowebsite")
	{
		alert("Sorry - We don't have a website address for this organisation.");	
	}

	if (method=="owner")
	{
		alert("Sorry - We don't have a owners page for this organisation.");
	}

	if (method=="print")
	{
		self.print();
	}

	if (method=="close")
	{
		self.close();
	}
	
	if (method=="home")
	{
		link = "http://www.escapeandexplore.co.uk";
		NewWindow('standardchild',link,800,600,'no','yes','no','no');	
	self.close();
	}
}

function onlyleftclick()
{if (event.button==2) {alert('Copyright © 2001 - 2007 Stock Software Ltd - All Rights Reserved.  The design, artwork, articles, stories, text and images on our websites are protected by copyright. Information, logos. images and any other intellectual property must not be copied or reproduced without explicit written permission. We issue licence and authorisation codes when permission is granted.')}}document.onmousedown=onlyleftclick

// Event handler for onmousedown
document.onmousedown=onlyleftclick;

