


function getURL ( uri )
{
	uri.dir = location.href.substring(0, location.href.lastIndexOf('\/'));
	uri.dom = uri.dir; if (uri.dom.substr(0,7) == 'http:\/\/') uri.dom = uri.dom.substr(7);
	uri.path = ''; var pos = uri.dom.indexOf('\/'); if (pos > -1) {uri.path = uri.dom.substr(pos+1); uri.dom = uri.dom.substr(0,pos);}
	uri.page = location.href.substring(uri.dir.length+1, location.href.length+1);
	pos = uri.page.indexOf('?');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
	pos = uri.page.indexOf('#');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
	uri.ext = ''; pos = uri.page.indexOf('.');if (pos > -1) {uri.ext =uri.page.substring(pos+1); uri.page = uri.page.substr(0,pos);}
	uri.file = uri.page;
	if (uri.ext != '') uri.file += '.' + uri.ext;
	if (uri.file == '') uri.page = 'index';
	uri.args = location.search.substr(1).split("?");
	
	return uri;
}

function getchangeColor( elem )
{
	if( elem.id == "accommodation" )
	{
		//alert( elem.id  );
		document.getElementById("accommodation").style.color = "#566703";
		document.getElementById("top").style.color = "#9D9D9D";
		document.getElementById("contact").style.color = "#9D9D9D";
		document.getElementById("wine").style.color = "#9D9D9D";
		document.getElementById("concierge").style.color = "#9D9D9D";
		document.getElementById("bookings").style.color = "#9D9D9D";
		document.getElementById("rate").style.color = "#9D9D9D";
		
	}
	
	if( elem.id == "concierge" )
	{
		//alert( elem.id  );
		document.getElementById("accommodation").style.color = "#9D9D9D";
		document.getElementById("top").style.color = "#9D9D9D";
		document.getElementById("contact").style.color = "#9D9D9D";
		document.getElementById("wine").style.color = "#9D9D9D";
		document.getElementById("concierge").style.color = "#566703";
		document.getElementById("bookings").style.color = "#9D9D9D";
		document.getElementById("rate").style.color = "#9D9D9D";
	}
	
	if( elem.id == "bookings" )
	{
	
		document.getElementById("accommodation").style.color = "#9D9D9D";
		document.getElementById("top").style.color = "#9D9D9D";
		document.getElementById("contact").style.color = "#9D9D9D";
		document.getElementById("wine").style.color = "#9D9D9D";
		document.getElementById("concierge").style.color = "#9D9D9D";
		document.getElementById("bookings").style.color = "#566703";
		document.getElementById("rate").style.color = "#566703";
	}
	
}

function setupMenu ( id )
{
	//alert( id );
	if ( id == "index" )
	{
		document.getElementById( "top" ).style.color = "#566703";
	}
	else if ( id == "contact" )
	{
		document.getElementById( id ).style.color = "#566703";
	}
	
	else if ( id == "accommodation" )
	{
		document.getElementById( id ).style.color = "#566703";
	}
	
	else if ( id == "concierge" )
	{
		document.getElementById( id ).style.color = "#566703";
	}
	else if ( id == "wine" )
	{
		document.getElementById( id ).style.color = "#566703";
	}
	else if ( id == "bookings" )
	{
		document.getElementById( id ).style.color = "#566703";
	}
	else if ( id == "rate" )
	{
		document.getElementById( id ).style.color = "#566703";
	}
	
	else if ( id == "deluxe" || id == "loft" || id == "suite" || id == "amenities")
	{		
		document.getElementById("accommodation").style.color = "#566703";	
		document.getElementById(id).style.color = "#566703";		
	}
	
	else if ( id == "getting" || id == "winter" || id == "spring" || id == "hot" || id == "dining" || id == "gallery"|| id == "weather" || id == "villagemap" || id == "links" )
	{		
		document.getElementById("concierge").style.color = "#566703";	
		document.getElementById(id).style.color = "#566703";		
	}
	
	else if ( id == "rates" || id == "availability" )
	{		
		document.getElementById("bookings").style.color = "#566703";	
		document.getElementById(id).style.color = "#566703";		
	}
		
}


/*
function getchangeColor(elem)
{

if(elem.id = "projects")
	{
	document.getElementById("projects").style.color = "#566703";
	document.getElementById("top").style.color = "#9D9D9D";
	document.getElementById("contact").style.color = "#9D9D9D";
	document.getElementById("services").style.color = "#9D9D9D";
	document.getElementById("team").style.color = "#9D9D9D";
	document.getElementById("concept").style.color = "#9D9D9D";
	}

}


function getURL2(uri) {
uri.dir = location.href.substring(0, location.href.lastIndexOf('\/'));
uri.dom = uri.dir; if (uri.dom.substr(0,7) == 'http:\/\/') uri.dom = uri.dom.substr(7);
uri.path = ''; var pos = uri.dom.indexOf('\/'); if (pos > -1) {uri.path = uri.dom.substr(pos+1); uri.dom = uri.dom.substr(0,pos);}
uri.page = location.href.substring(uri.dir.length+1, location.href.length+1);
pos = uri.page.indexOf('?');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
pos = uri.page.indexOf('#');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
uri.ext = ''; pos = uri.page.indexOf('.');if (pos > -1) {uri.ext =uri.page.substring(pos+1); uri.page = uri.page.substr(0,pos);}
uri.file = uri.page;
if (uri.ext != '') uri.file += '.' + uri.ext;
if (uri.file == '') uri.page = 'index';
uri.args = location.search.substr(1).split("?");
return uri;
}
var uri2 = new Object();
getURL2(uri2);


//alert( uri.page );
//ssets the color of the clicked link
if(uri.page == "index")
{
document.getElementById("top").style.color = "#566703";
}
else if(uri.page == "contact")
{
document.getElementById("contact").style.color = "#566703";
}
else if(uri.page == "services")
{
document.getElementById("services").style.color = "#566703";
}
else if(uri.page == "team")
{
document.getElementById("team").style.color = "#566703";
}
else if(uri.page == "project")
{
document.getElementById("projects").style.color = "#566703";
}
else if(uri.page == "concept")
{
document.getElementById("concept").style.color = "#566703";
}
else if(uri.page == "project_past")
{
document.getElementById("projects").style.color = "#566703";
document.getElementById("past").style.color = "#566703";
}


//resets color of the selected
function changeColor(elem)
{
if(elem.id == "projects")
	{
	alert("asfd");
		document.getElementById("projects").style.color = "#566703";
		document.getElementById("top").style.color = "#9D9D9D";
		document.getElementById("contact").style.color; = "#9D9D9D";
		document.getElementById("services").style.color; = "#9D9D9D";
		document.getElementById("team").style.color; = "#9D9D9D";
		document.getElementById("concept").style.color; = "#9D9D9D";
	}
}
		
		
		
function getURL(uri) {
uri.dir = location.href.substring(0, location.href.lastIndexOf('\/'));
uri.dom = uri.dir; if (uri.dom.substr(0,7) == 'http:\/\/') uri.dom = uri.dom.substr(7);
uri.path = ''; var pos = uri.dom.indexOf('\/'); if (pos > -1) {uri.path = uri.dom.substr(pos+1); uri.dom = uri.dom.substr(0,pos);}
uri.page = location.href.substring(uri.dir.length+1, location.href.length+1);
pos = uri.page.indexOf('?');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
pos = uri.page.indexOf('#');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
uri.ext = ''; pos = uri.page.indexOf('.');if (pos > -1) {uri.ext =uri.page.substring(pos+1); uri.page = uri.page.substr(0,pos);}
uri.file = uri.page;
if (uri.ext != '') uri.file += '.' + uri.ext;
if (uri.file == '') uri.page = 'index';
uri.args = location.search.substr(1).split("?");
return uri;
}
var uri = new Object();
getURL(uri);
*/



