
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 = 'home';
	uri.args = location.search.substr(1).split("?");
	
	return uri;
}

function getchangeColor( elem )
{
	if( elem.id == "projects" )
	{
		//alert( elem.id  );
		document.getElementById("projects").style.color = "#566703";
		
		document.getElementById("home").style.color = "#9D9D9D";
		document.getElementById("contact").style.color = "#9D9D9D";
		document.getElementById("team").style.color = "#9D9D9D";
		document.getElementById("services").style.color = "#9D9D9D";
		document.getElementById("sekkastyle").style.color = "#9D9D9D";
		document.getElementById("sekkaliving").style.color = "#9D9D9D";
		document.getElementById("sekkateca").style.color = "#9D9D9D";
	}
	
	if( elem.id == "services" )
	{
		//alert( elem.id  );
		document.getElementById("projects").style.color = "#9D9D9D";
		document.getElementById("home").style.color = "#9D9D9D";
		document.getElementById("team").style.color = "#9D9D9D";
		document.getElementById("contact").style.color = "#9D9D9D";
		
		document.getElementById("services").style.color = "#566703";
		
		document.getElementById("sekkastyle").style.color = "#9D9D9D";
		document.getElementById("sekkaliving").style.color = "#9D9D9D";	
		document.getElementById("sekkateca").style.color = "#9D9D9D";		
	}
}

function setupMenu ( id )
{
	//alert( id );
	if ( id == "home" )
	{
		document.getElementById( "home" ).style.color = "#566703";
	}
	else if ( id == "contact" )
	{
		document.getElementById( id ).style.color = "#566703";
	}
	else if ( id == "sekkastyle" )
	{
		document.getElementById( id ).style.color = "#566703";
	}
	else if ( id == "sekkaliving" )
	{
		document.getElementById( id ).style.color = "#566703";
	}
	else if ( id == "sekkateca" )
	{
		document.getElementById( id ).style.color = "#566703";
	}
	else if ( id == "services" )
	{
		document.getElementById( id ).style.color = "#566703";
	}
	else if ( id == "team" )
	{
		document.getElementById( id ).style.color = "#566703";
	}
	else if ( id == "projects" )
	{
		document.getElementById( id ).style.color = "#566703";
	}
	else if ( id == "concept" )
	{
		document.getElementById( id ).style.color = "#566703";
	}
	else if ( id == "past" )
	{
		document.getElementById("projects").style.color = "#566703";
		document.getElementById("past").style.color = "#566703";
	}
	else if ( id == "present" || id == "future" || id == "past" )
	{
		document.getElementById("projects").style.color = "#566703";
		document.getElementById( id ).style.color = "#566703";
	}
	
	// past projects ...
	else if ( id == "bouro" || id == "jsekka" || id == "kado" || id == "karamure" || id == "p2" || 
			  id == "sekkaannupurilodge" || id == "sekkadinningbar" || id == "sekkahouse" || 
			  id == "bokyo" || id == "sekkakan" || id == "setsugetsu" || id == "shikaku" || id == "sekkamaruyama" || id == "hanazonohouse" )
	{
		document.getElementById("projects").style.color = "#566703";
		document.getElementById("past").style.color = "#566703";
		document.getElementById( id ).style.color = "#566703";
	}
	
	// present projects ...
	else if ( id == "shikaku" || id == "townhouse"  || id == "hanazono" || id == "penthouse" || 
			  id == "sekkasekka" || id == "setsugetsuterraces" )
	{
		document.getElementById("projects").style.color = "#566703";
		document.getElementById("present").style.color = "#566703";
		document.getElementById( id ).style.color = "#566703";
	}
	
	// present projects ...
	else if ( id == "kabayamahills" || id == "yamada11" || id == "kabayama36" || id == "oshororetreat" || id == "sekkapod" )
	{
		document.getElementById("projects").style.color = "#566703";
		document.getElementById("future").style.color = "#566703";
		document.getElementById( id ).style.color = "#566703";
	}
	
	else if ( id == "architecture" || id == "interior" || id == "media" )
	{
		document.getElementById("services").style.color = "#566703";
		document.getElementById( id ).style.color = "#566703";
	}
}