function centertop(){

	var windowHeight = 0;
	
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	//alert(windowHeight);

	
	var scrheight = (windowHeight - 620)/2;
	
	//alert(scrheight);
	if(scrheight <= '10')
		{
		return false;
		}
	else
		{
		document.write('<img src="architects_images/1pix.gif" width="1" height="'+scrheight+'" alt="" border="0" />')
		}
}

window.onresize  = function() {
	window.location.reload();
}

// this obtains the screen height, subtracts the height of the website (620px) 
// this leaves the screen height left at the top and bottom of the website
// half of that height (var scrheight) will be the height required for the spacer graphic at the top to centre the website
function hiliteActive(vtd)
{    
	//vtd.style.cursor = 'hand';
	vtd.style.cursor = 'pointer';
	
	if (vtd.aselected=="true")
	{
		return false;
	}
	else
	{


	vtd.style.color = '#000000';
	//vtd.style.borderTop = '1px solid #cccccc';
	//vtd.style.borderLeft = '1px solid #cccccc';
	//vtd.style.borderRight = '1px solid #cccccc';
	}

}
function hilite(vtd)
{    
	//vtd.style.cursor = 'hand';
	vtd.style.cursor = 'pointer';
	
	if (vtd.aselected=="true")
	{
		return false;
	}
	else
	{


	vtd.style.color = '#000000';
	vtd.style.borderTop = '1px solid #cccccc';
	vtd.style.borderLeft = '1px solid #cccccc';
	vtd.style.borderRight = '1px solid #cccccc';
	}

}

function aselect(vtd)
{
	vtd.aselected="true";
	vtd.style.color = '#000000';
	vtd.style.borderTop = '1px solid #cccccc';
	vtd.style.borderLeft = '1px solid #cccccc';
	vtd.style.borderRight = '1px solid #cccccc';
	
	var optd;
	
	for (var i=1; i<5; i++)
	{
		if (document.getElementById)
			optd=document.getElementById("menu" + i);
		else
			optd=document.all("menu"+i);
		
		if (optd!=vtd)
		{
			optd.aselected="false";
			lolite(optd);
		}
	}
}

function lolite(vtd)
{    
	if (vtd.aselected=="true")
	{
		return;
	}
	
	vtd.style.color = '#777777';
	vtd.style.borderTop = '1px solid #ffffff';
	vtd.style.borderLeft = '1px solid #ffffff';
	vtd.style.borderRight = '1px solid #ffffff';

}

function hiliteleft(vtd)
{    

	//vtd.style.cursor = 'hand';
	vtd.style.cursor = 'pointer';

	if (vtd.aselected=="true")
	{
		return false;
	}
	
	else
	
	{
	
	
	vtd.style.color = '#000000';
	//vtd.style.padding = '1px 0px 1px 0px';
	vtd.style.borderTop = '1px solid #cccccc';
	vtd.style.borderLeft = '1px solid #cccccc';
	vtd.style.borderBottom = '1px solid #cccccc';
	
	
	}

}

function aselectleft(vtd,items)
{
		//alert(vtd);
	vtd.aselected="true";
	vtd.style.color = '#000000';
	vtd.style.borderTop = '1px solid #cccccc';
	vtd.style.borderLeft = '1px solid #cccccc';
	vtd.style.borderBottom = '1px solid #cccccc';
	
	var optd;
	
	for (var i=1; i<items; i++)
	{
		if (document.getElementById)
			optd=document.getElementById("leftmenu" + i);
		else
			optd=document.all("leftmenu"+i);
		
		if (optd!=vtd)
		{
			optd.aselected="false";
			loliteleft(optd);
		}
	}
			
}

function loliteleft(vtd)
{    
	if (vtd.aselected=="true")
	{
		return;
	}
	vtd.style.color = '#777777';
		//vtd.style.padding = '1px 0px 1px 0px';
	vtd.style.borderTop = '1px solid #ffffff';
	vtd.style.borderLeft = '1px solid #ffffff';
	vtd.style.borderBottom = '1px solid #ffffff';

}


function rowshow(vtd,items)
{
	
	//alert(vtd);
	if (vtd.style.display == 'block')
	{
	vtd.style.display = 'none';
	}
	else
	{
		vtd.style.display = 'block';
		var optd;
		
		for (var i=1; i<items; i++)
		{
			if (document.getElementById)
				optd=document.getElementById("row" + i);
			else
				optd=document.all("row"+i);
			
			if (optd!=vtd)
			{
				optd.aselected="false";
				rowhide(optd);
			}
		}
	}
			
}

function rowhide(vtd)
{    

	vtd.style.display = 'none';

}

function show(div,items)
{
	//alert(div);
	div.style.display = 'block';
	var otherdiv;
	
	for (var i=1; i<items; i++)
	{
		if (document.getElementById)
			otherdiv=document.getElementById("div" + i);
		else
			otherdiv=document.all("div"+i);
		
		if (otherdiv!=div)
		{
			otherdiv.aselected="false";
			hide(otherdiv);
		}
	}
	
}

function hide(div)
{    
	div.style.display = 'none';
}

function imgOver(img)
{
	img.src = 'architects_images/' + img.name + '_over.jpg'; 
	//img.style.cursor = 'hand'; 
	img.style.cursor = 'pointer';
}	

function imgOut(img)
{
	if (img.aselected == "true")
		return false;
	else
	img.src = 'architects_images/' + img.name + '.jpg'; img.style.cursor = 'default'; img.style.cursor = 'default';
}


function imgOn(img,proj)
{
	img.src = 'architects_images/' + img.name + '_over.jpg'; 
	//img.style.cursor = 'hand'; 
	img.style.cursor = 'pointer';
	img.aselected= "true";
	var otherimg;
	for (var i=1; i<50; i++)
	{
		if (document.getElementById)
		{
			otherimg=document.getElementById(proj + "0" + i);
		}
		else
		{
			otherimg=document.all(proj + i);
		}
		if (otherimg!=img)
		{
			if (otherimg)
			{
				otherimg.aselected="false";
				imgOff(otherimg);
			}
		}
		
	}
}

function imgOff(img)
{
	img.src = 'architects_images/' + img.name + '.jpg';	img.style.cursor = 'default'; 	img.style.cursor = 'default'; 

	
}




function goTo(goPage)
{
	window.location = goPage;
}

function goTox(goPage)
{
	return false;
}

function linkover(menu)
{
	menu.style.color = '#000000';
	//menu.style.cursor = 'hand'; 
	menu.style.cursor = 'pointer';
}	

function linkout(menu)
{
	if (menu.aselected=="true")
	{
		return false;
	}
	else
	{
	menu.style.cursor = 'default'; 
	menu.style.color = '#1D547B';
	}
}	

function addmovie()
{
	createMovieObj('flashobj', 
					'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000', 
					'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0', 
					500, 
					255, 
					'architects_flash/home_transition_3.swf');
}

function createMovieObj(id, classid, codebase, width, height, movievalue)
{
	document.getElementById("movie_container").innerHTML = "<object id='" + id 
													+ "' classid='" + classid 
													+ "' codebase='" + codebase
													+ "' width='" + width 
													+ "' height='" + height
													+ "' VIEWASTEXT><param name='movie' value='" + movievalue
													+ "'><param name='quality' value='high'><embed src='" + movievalue
													+ "' width='" + width
													+ "' height='" + height
													+ "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>";
}
//here you place the ids of every element you want.
var ids=new Array('a1','a2');

function switchid(id){	
	hideallids();
	showdiv(id);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
	}


function switchid2(id){	
	hideallids2();
	showdiv2(id);
}

function hideallids2(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids2.length;i++){
		hidediv2(ids2[i]);
	}		  
}

  
  function hidediv2(id) {
	//safe function to hide an element with a specified id
	//if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	//}
	//else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		//else { // IE 4
			//document.all.id.style.display = 'none';
		//}
	//}
}

function showdiv2(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}
