var imgoff = new Array();
imgoff['company'] = "images/nav_company_off.gif";         
imgoff['s_philosophy'] = "images/nav_s_philosophy_off.gif";   
imgoff['s_our_serv'] = "images/nav_s_our_serv_off.gif";     
imgoff['s_the_team'] = "images/nav_s_the_team_off.gif"      
imgoff['s_contact'] = "images/nav_s_contact_off.gif"       
//imgoff['s_design'] = "images/nav_s_design_off.gif"        
//imgoff['s_engin'] = "images/nav_s_engin_off.gif"         
imgoff['work'] = "images/nav_work_off.gif";
imgoff['w_client'] = "images/nav_w_client_off.gif";
imgoff['w_case'] = "images/nav_w_case_off.gif";
imgoff['news'] = "images/nav_news_off.gif";
imgoff['n_training'] = "images/nav_n_training_off.gif";
imgoff['n_press'] = "images/nav_n_press_off.gif";
imgoff['n_careers'] = "images/nav_n_careers_off.gif";
imgoff['showcase1'] = "images/btn_case_1_off.gif";
imgoff['showcase2'] = "images/btn_case_2_off.gif";
imgoff['showcase3'] = "images/btn_case_3_off.gif";
imgoff['showcase4'] = "images/btn_case_4_off.gif";
imgoff['showcase5'] = "images/btn_case_5_off.gif";

var imgover = new Array();
imgover['company'] = "images/nav_company_over.gif";
imgover['s_philosophy'] = "images/nav_s_philosophy_over.gif";
imgover['s_our_serv'] = "images/nav_s_our_serv_over.gif";
imgover['s_the_team'] = "images/nav_s_the_team_over.gif"
imgover['s_contact'] = "images/nav_s_contact_over.gif"
//imgover['s_design'] = "images/nav_s_design_over.gif"
//imgover['s_engin'] = "images/nav_s_engin_over.gif"
imgover['work'] = "images/nav_work_over.gif";
imgover['w_client'] = "images/nav_w_client_over.gif";
imgover['w_case'] = "images/nav_w_case_over.gif";
imgover['news'] = "images/nav_news_over.gif";
imgover['n_training'] = "images/nav_n_training_over.gif";
imgover['n_press'] = "images/nav_n_press_over.gif";
imgover['n_careers'] = "images/nav_n_careers_over.gif";
imgover['showcase1'] = "images/btn_case_1_over.gif";
imgover['showcase2'] = "images/btn_case_2_over.gif";
imgover['showcase3'] = "images/btn_case_3_over.gif";
imgover['showcase4'] = "images/btn_case_4_over.gif";
imgover['showcase5'] = "images/btn_case_5_over.gif";

var imgon = new Array();
imgon['showcase1'] = "images/btn_case_1_on.gif";
imgon['showcase2'] = "images/btn_case_2_on.gif";
imgon['showcase3'] = "images/btn_case_3_on.gif";
imgon['showcase4'] = "images/btn_case_4_on.gif";
imgon['showcase5'] = "images/btn_case_5_on.gif";

var imgid = new Array("company", "s_philosophy", "s_our_serv", "s_the_team", "s_contact", "s_our_serv", "work", "w_client", "w_case", "news", "n_careers", "n_training", "n_press");
//var subImgid = new Array("s_our_serv");

var menu = new Array("companyMenu", "workMenu", "newsMenu");
//var subMenu = new Array("companySubMenu");

var imgcase = new Array();
imgcase['showcase1'] = "case1";
imgcase['showcase2'] = "case2";
imgcase['showcase3'] = "case3";
imgcase['showcase4'] = "case4";
imgcase['showcase5'] = "case5";

var topY = 23;
var minY = new Array();
minY['companyMenu'] = -53;
minY['workMenu'] = -23;
minY['newsMenu'] = -37;

var par = new Array();
par['companyMenu'] = "Company";
par['workMenu'] = "Work";
par['newsMenu'] = "News";
//par['companySubMenu'] = "s_our_serv";

var timeon;
var subtimeon;
var stMoving;
var wkMoving;
var nwMoving;

function menuOver(name) {
//	alert('menuOver');
	clearTimeout(timeon);
	main = par[name];
	hideAllMenus(name);
	//hideAllSubMenus();
	restoreAllImages(par[name]);
	showHideLayer(name, 'show');
	if (name == "companyMenu") {
		slideWkUp();
		slideNwUp();
		slideStDown();
	}
	else if (name == "workMenu") {
		slideStUp();
		slideNwUp();
		slideWkDown();
	}
	else if (name == "newsMenu") {
		slideStUp();
		slideWkUp();
		slideNwDown();
	}
}

function menuOut() {
//	alert('menuOut');
	timeon = setTimeout("oriStatus()", 500);
}

function subMenuOver(name) {
//	alert('menuOver');
	clearTimeout(timeon);
	clearTimeout(subtimeon);
	main = par[name];
	swap(par[name]);
	showHideLayer(name, 'show');
}

function subMenuOut() {
//	alert('menuOut');
	subtimeon = setTimeout("oriSubStatus()", 500);
}

function set(name) {
	ele = document.getElementById(name);
	if (ele.style) { 
    	ele = ele.style; 
	}
	rollY = parseInt(ele.top);
	ele.top = parseInt(ele.top) - rollY;
}

function slideStDown(){
	ele = document.getElementById("companyMenu");
	if (ele.style) { 
    	ele = ele.style; 
	}
	if (parseInt(ele.top) < topY){
		clearTimeout(stMoving);
		stMoving = setTimeout("slideStDown()", 15);
		ele.top = parseInt(ele.top) + 5;
	}
}

function slideStUp(){
	ele = document.getElementById("companyMenu");
	if (ele.style) { 
    	ele = ele.style; 
	}
	if (parseInt(ele.top) > minY['companyMenu']){
		clearTimeout(stMoving);
		stMoving = setTimeout("slideStUp()", 15);
		ele.top = parseInt(ele.top) - 5;
	}
}
function slideWkDown(){
	ele = document.getElementById("workMenu");
	if (ele.style) { 
    	ele = ele.style; 
	}
	if (parseInt(ele.top) < topY){
		clearTimeout(wkMoving);
		wkMoving = setTimeout("slideWkDown()", 15);
		ele.top = parseInt(ele.top) + 5;
	}
}

function slideWkUp(){
	ele = document.getElementById("workMenu");
	if (ele.style) { 
    	ele = ele.style; 
	}
	if (parseInt(ele.top) > minY['workMenu']){
		clearTimeout(wkMoving);
		wkMoving = setTimeout("slideWkUp()", 15);
		ele.top = parseInt(ele.top) - 5;
	}
}
function slideNwDown(){
	ele = document.getElementById("newsMenu");
	if (ele.style) { 
    	ele = ele.style; 
	}
	if (parseInt(ele.top) < topY){
		clearTimeout(nwMoving);
		nwMoving = setTimeout("slideNwDown()", 15);
		ele.top = parseInt(ele.top) + 5;
	}
}

function slideNwUp(){
	ele = document.getElementById("newsMenu");
	if (ele.style) { 
    	ele = ele.style; 
	}
	if (parseInt(ele.top) > minY['newsMenu']){
		clearTimeout(nwMoving);
		nwMoving = setTimeout("slideNwUp()", 15);
		ele.top = parseInt(ele.top) - 5;
	}
}

function showHideLayer(name, status) {
//	alert('showHideLayer');
	ele = document.getElementById(name);
	if (ele.style) { 
    	ele = ele.style; 
    	status = (status =='show') ? 'visible' : (status=='hide') ? 'hidden' : status; 
   	}
    ele.visibility = status; 	
}

function oriStatus() {
	slideStUp();
	slideWkUp();
	slideNwUp();
	//hideAllSubMenus();
	restoreAllImages();
}

function oriSubStatus() {
	//hideAllSubMenus();
	for (i = 0; i < subImgid.length; i++) {
		restore(subImgid[i]);	
	}
}

function hideAllMenus(except) {
	for (i = 0; i < menu.length; i++) {
		if (menu[i] != except) {
			showHideLayer(menu[i], 'hide');
		}
	}
}

function hideAllSubMenus(except) {
	for (i = 0; i < subMenu.length; i++) {
		if (subMenu[i] != except) {
			showHideLayer(subMenu[i], 'hide');
		}
	}
}

function restoreAllImages(except) {
	for (i = 0; i < imgid.length; i++) {
		if (imgid[i] != except) {
			restore(imgid[i]);
		}
	}
}

function restore(name) {
	obj = document.getElementById(name)
	if (obj != null)
		obj.src = imgoff[name];
}
	
function swap(name) {
	obj = document.getElementById(name)
	if (obj != null)
		obj.src = imgover[name];
}

function on(name) {
	obj = document.getElementById(name)
	if (obj != null)
		obj.src = imgon[name];
}

function hideAllShowCase() {
	showHideLayer(imgcase['showcase1'], 'hide');
	showHideLayer(imgcase['showcase2'], 'hide');
	showHideLayer(imgcase['showcase3'], 'hide');
	showHideLayer(imgcase['showcase4'], 'hide');
	showHideLayer(imgcase['showcase5'], 'hide');
}

function restoreAllImgCase() {
	restore("showcase1");
	restore("showcase2");
	restore("showcase3");
	restore("showcase4");
	restore("showcase5");
}

function swapShowcase(name) {
	hideAllShowCase();
	showHideLayer(imgcase[name], 'show');
	restoreAllImgCase();
	on(name);
}

function restoreImgCase(name) {
	ele = document.getElementById(imgcase[name]);
	if (ele.style) { 
    	ele = ele.style; 
   	}
    if (ele.visibility == 'hidden')
    	restore(name);
}

function swapImgCase(name) {
	ele = document.getElementById(imgcase[name]);
	if (ele.style) { 
    	ele = ele.style; 
   	}
    if (ele.visibility == 'hidden')
    	swap(name);
}
document.write('<DIV id=menuMain class="menu">');
document.write('<TABLE cellSpacing=0 cellPadding=0 width=580 bgColor=#ffffff border=0>');
document.write('<TBODY>');
document.write('	<TR><TD noWrap width=580 height=10><SPACER height="1" width="1" type="block"></TD></TR>');
document.write('</TBODY>');
document.write('</TABLE>');
document.write('</DIV>');
document.write('<!-- company menu -->');
document.write('<DIV id=companyMain class="mainmenu">');
document.write('<TABLE cellSpacing=0 cellPadding=0 width=189 border=0>');
document.write('<TBODY>');
document.write('	<TR><TD noWrap width=189 height=22><A onmouseover="menuOver(\'companyMenu\');swap(\'company\')" onmouseout=menuOut() href="javascript:;"><IMG id=company height=22 alt=company src="images/nav_company_off.gif" width=189 border=0 name=company></A></TD></TR>');
document.write('</TBODY>');
document.write('</TABLE>');
document.write('</DIV>');
document.write('<DIV id=companyMenu style="BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; Z-INDEX: 3; LEFT: 208px; VISIBILITY: hidden; BORDER-LEFT: #000000 1px; WIDTH: 189px; BORDER-BOTTOM: #000000 1px; POSITION: absolute; TOP: -53px; HEIGHT: 76px; BACKGROUND-COLOR: #f7f6f1; layer-background-color: F7F6F1">');
document.write('<TABLE cellSpacing=0 cellPadding=0 width=174 border=0>');
document.write('<TBODY>');
document.write('	<TR>');
document.write('		<TD noWrap width=10><SPACER height="1" width="1" type="block"></TD>');
document.write('		<TD><A onmouseover="menuOver(\'companyMenu\');swap(\'s_philosophy\')" onmouseout="restore(\'s_philosophy\');menuOut()" href="philosophy.html"><IMG id=s_philosophy height=23 alt=Philosophy src="images/nav_s_philosophy_off.gif" width=84 border=0 name=s_philosophy></A></TD>');
document.write('		<TD noWrap width=80><SPACER height="1" width="1" type="block"></TD>');
document.write('	</TR>');

document.write('	<TR>');
document.write('		<TD><SPACER height="1" width="1" type="block"></TD>');
//document.write('		<TD><A onmouseover="menuOver(\'companyMenu\');subMenuOver(\'companySubMenu\');swap(\'s_our_serv\')" onmouseout="restore(\'s_our_serv\');menuOut();subMenuOut()" href="javascript:;"><IMG id=s_our_serv height=16 alt="Our Services" src="images/nav_s_our_serv_off.gif" width=84 border=0 name=s_our_serv></A></TD>');
document.write('		<TD><A onmouseover="menuOver(\'companyMenu\');swap(\'s_our_serv\')" onmouseout="restore(\'s_our_serv\');menuOut()" href="services.html"><IMG id=s_our_serv height=16 alt="Our Services" src="images/nav_s_our_serv_off.gif" width=84 border=0 name=s_our_serv></A></TD>');
document.write('		<TD><SPACER height="1" width="1" type="block"></TD>');
document.write('	</TR>');
document.write('	<TR>');
document.write('		<TD><SPACER height="1" width="1" type="block"></TD>');
document.write('		<TD><A onmouseover="menuOver(\'companyMenu\');swap(\'s_the_team\')" onmouseout="restore(\'s_the_team\');menuOut()" href="team.html"><IMG id=s_the_team height=16 alt="The Team" src="images/nav_s_the_team_off.gif" width=84 border=0 name=s_the_team></A></TD>');
document.write('		<TD><SPACER height="1" width="1" type="block"></TD>');
document.write('	</TR>');
document.write('	<TR>');
document.write('		<TD><SPACER height="1" width="1" type="block"></TD>');
document.write('		<TD><A onmouseover="menuOver(\'companyMenu\');swap(\'s_contact\')" onmouseout="restore(\'s_contact\');menuOut()" href="contact_us.html"><IMG id=s_contact height=16 alt="Contact Us" src="images/nav_s_contact_off.gif" width=84 align=top border=0 name=s_contact></A></TD>');
document.write('		<TD><SPACER height="1" width="1" type="block"></TD>');
document.write('	</TR>');
document.write('</TBODY>');
document.write('</TABLE>');
document.write('</DIV>');
//document.write('<DIV id=companySubMenu style="BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; Z-INDEX: 5; LEFT: 303px; VISIBILITY: hidden; BORDER-LEFT: #000000 1px; WIDTH: 84px; BORDER-BOTTOM: #000000 1px; POSITION: absolute; TOP: 50px; HEIGHT: 33px; BACKGROUND-COLOR: #f7f6f1; layer-background-color: F7F6F1">');
//document.write('<TABLE cellSpacing=0 cellPadding=0 width=84 border=0>');
//document.write('<TBODY>');
//document.write('	<TR><TD><A onmouseover="subMenuOver(\'companySubMenu\');swap(\'s_design\')" onmouseout="restore(\'s_design\');menuOut();subMenuOut()" href="design.html"><IMG id=s_design height=16 alt=Design src="images/nav_s_design_off.gif" width=84 border=0 name=s_design></A></TD></TR>');
//document.write('	<TR><TD><A onmouseover="subMenuOver(\'companySubMenu\');swap(\'s_engin\')" onmouseout="restore(\'s_engin\');menuOut();subMenuOut()" href="engineering.html"><IMG id=s_engin height=16 alt=Engineering src="images/nav_s_engin_off.gif" width=84 border=0 name=s_engin></A></TD></TR>');
//document.write('</TBODY>');
//document.write('</TABLE>');
//document.write('</DIV>');
//document.write('<!-- end company menu -->');
document.write('<!-- work menu -->');
document.write('<DIV id=workMain style="BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; Z-INDEX: 9; LEFT: 403px; BORDER-LEFT: #000000 1px; WIDTH: 189px; BORDER-BOTTOM: #000000 1px; POSITION: absolute; TOP: 6px; HEIGHT: 22px; BACKGROUND-COLOR: #f7f6f1; layer-background-color: #F7F6F1">');
document.write('<TABLE cellSpacing=0 cellPadding=0 width=189 border=0>');
document.write('<TBODY>');
document.write('	<TR><TD noWrap width=189 height=22><A onmouseover="menuOver(\'workMenu\');swap(\'work\')" onmouseout=menuOut() href="javascript:;"><IMG id=work height=22 alt=Work src="images/nav_work_off.gif" width=189 border=0 name=work></A></TD></TR>');
document.write('</TBODY>');
document.write('</TABLE>');
document.write('</DIV>');
document.write('<DIV id=workMenu style="BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; Z-INDEX: 3; LEFT: 403px; VISIBILITY: hidden; BORDER-LEFT: #000000 1px; WIDTH: 189px; BORDER-BOTTOM: #000000 1px; POSITION: absolute; TOP: -23px; HEIGHT: 44px; BACKGROUND-COLOR: #f7f6f1; layer-background-color: F7F6F1">');
document.write('<TABLE cellSpacing=0 cellPadding=0 width=174 border=0>');
document.write('<TBODY>');
document.write('	<TR>');
document.write('		<TD noWrap width=10><SPACER height="1" width="1" type="block"></TD>');
document.write('		<TD><A onmouseover="menuOver(\'workMenu\');swap(\'w_client\')" onmouseout="restore(\'w_client\');menuOut()" href="client_list.html"><IMG id=w_client height=23 alt="Client List" src="images/nav_w_client_off.gif" width=84 border=0 name=w_client></A></TD>');
document.write('		<TD noWrap width=80><SPACER height="1" width="1" type="block"></TD>');
document.write('	</TR>');
document.write('	<TR>');
document.write('		<TD><SPACER height="1" width="1" type="block"></TD>');
document.write('	    <TD><A onmouseover="menuOver(\'workMenu\');swap(\'w_case\')" onmouseout="restore(\'w_case\');menuOut()" href="javascript:;"><IMG id=w_case height=16 src="images/nav_w_case_off.gif" width=84 border=0 name=w_case></A></TD>');
document.write('		<TD><SPACER height="1" width="1" type="block"></TD>');
document.write('	</TR>');
document.write('</TBODY>');
document.write('</TABLE>');
document.write('</DIV>');
document.write('<!-- end work menu -->');
document.write('<!-- news menu -->');
document.write('<DIV id=newsMain style="BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; Z-INDEX: 9; LEFT: 598px; BORDER-LEFT: #000000 1px; WIDTH: 189px; BORDER-BOTTOM: #000000 1px; POSITION: absolute; TOP: 6px; HEIGHT: 22px; BACKGROUND-COLOR: #f7f6f1; layer-background-color: #F7F6F1">');
document.write('<TABLE cellSpacing=0 cellPadding=0 width=189 border=0>');
document.write('<TBODY>');
document.write('	<TR><TD noWrap width=189 height=22><A onmouseover="menuOver(\'newsMenu\');swap(\'news\')"onmouseout=menuOut() href="javascript:;"><IMG id=news height=22 alt=News src="images/nav_news_off.gif" width=189 border=0 name=news></A></TD></TR>');
document.write('</TBODY>');
document.write('</TABLE>');
document.write('</DIV>');
document.write('<DIV id=newsMenu style="BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; Z-INDEX: 3; LEFT: 598px; VISIBILITY: hidden; BORDER-LEFT: #000000 1px; WIDTH: 189px; BORDER-BOTTOM: #000000 1px; POSITION: absolute; TOP: -38px; HEIGHT: 60px; BACKGROUND-COLOR: #f7f6f1; layer-background-color: F7F6F1">');
document.write('<TABLE cellSpacing=0 cellPadding=0 width=174 border=0>');
document.write('<TBODY>');
document.write('	<TR>');
document.write('		<TD noWrap width=10><SPACER height="1" width="1" type="block"></TD>');
document.write('		<TD><A onmouseover="menuOver(\'newsMenu\');swap(\'n_training\')" onmouseout="restore(\'n_training\');menuOut()" href="training.html"><IMG id=n_training height=23 alt=Training src="images/nav_n_training_off.gif" width=84 border=0 name=n_training></A></TD>');
document.write('		<TD noWrap width=80><SPACER height="1" width="1" type="block"></TD></TR>');
document.write('	<TR>');
document.write('		<TD><SPACER height="1" width="1" type="block"></TD>');
document.write('		<TD><A onmouseover="menuOver(\'newsMenu\');swap(\'n_press\')" onmouseout="restore(\'n_press\');menuOut()" href="javascript:;"><IMG id=n_press height=16 alt=Press src="images/nav_n_press_off.gif" width=84 border=0 name=n_press></A></TD>');
document.write('		<TD><SPACER height="1" width="1" type="block"></TD>');
document.write('	</TR>');
document.write('	<TR>');
document.write('		<TD><SPACER height="1" width="1" type="block"></TD>');
document.write('		<TD><A onmouseover="menuOver(\'newsMenu\');swap(\'n_careers\')" onmouseout="restore(\'n_careers\');menuOut()" href="careers.html"><IMG id=n_careers height=16 alt=Careers src="images/nav_n_careers_off.gif" width=84 border=0 name=n_careers></A></TD>');
document.write('		<TD><SPACER height="1" width="1" type="block"></TD>');
document.write('	</TR>');
document.write('</TBODY>');
document.write('</TABLE>');
document.write('</DIV>');
document.write('<!-- end New menu -->');
document.write('<!-- logo -->');
document.write('<TABLE cellSpacing=0 cellPadding=0 width=800 border=0>');
document.write('<TBODY>');
document.write('	<TR>');
document.write('		<TD noWrap width=6 height=6><SPACER height="1" width="1" type="block"></TD>');
document.write('		<TD noWrap width=97>');
document.write('			<A href="index.html"><IMG height=25 alt="Smart Insight" src="images/si_logo.gif" width=164  border=0></A>');
document.write('		</TD>');
document.write('		<TD noWrap width=691><SPACER height="1" width="1" type="block"></TD>');
document.write('		<TD noWrap width=6><SPACER height="1" width="1" type="block"></TD></TR>');
document.write('  <TR><TD noWrap colSpan=4 height=6><SPACER height="1" width="1"  type="block"></TD></TR>');
document.write('</TBODY>');
document.write('</TABLE>');
document.write('<!-- end logo -->');