function activateMenu(path)
	{
	chNodeBgcolor("menu_"+path, "#ffffff");
	}

function deActivateMenu(path)
	{
	chNodeBgcolor("menu_"+path, "#696969");
	}

function showFullMenu(path)
	{
	clearTimeout(mainMenuHideTimeout);
	mainMenuShowTimeout=setTimeout('forShowFullMenu("'+path+'")', "150");
	}


function hideFullMenu(path)
	{
	clearTimeout(mainMenuShowTimeout);

	mainMenuHideTimeout=setTimeout('forHideFullMenu("'+path+'")', "1000");
	}

function hideFullMenuTitle(path)
	{
	clearTimeout(mainMenuShowTimeout);
	mainMenuHideTimeout=setTimeout('forHideFullMenu("'+path+'");forShowFullMenu("portfolio")', "1000");
	}


function forHideFullMenu(path)
	{
	hideNode("main_menu_"+path);
	chNodeSrc("under_"+path, "/img/spacer.gif");
	}

function forShowFullMenu(path)
	{
	if(mainMenuCurrent!=path)	

		{forHideFullMenu(mainMenuCurrent);}
	showNode("main_menu_"+path);
	chNodeSrc("under_"+path, "/img/next/under_"+path+".gif");
	mainMenuCurrent=path;
	}





//////////////////////////////////////////////////////////////////////////////////////////////
function nextMenuActivate(path)
	{
	if(path!=mainMenuCurrent)
		{
		clearTimeout(mainMenuHideTimeout);
		mainMenuShowTimeout=setTimeout('forNextMenuActivate("'+path+'")', "150");
		}
	}

function nextMenuDeactivate(path)
	{
	if(path!=mainMenuCurrent)
		{
		clearTimeout(mainMenuShowTimeout);
		mainMenuHideTimeout=setTimeout('forNextMenuDeactivate("'+path+'")', "400");
		}
	}


function forNextMenuActivate(path)
	{
	showNode("main_menu_"+path);
	hideNode("main_menu_"+mainMenuCurrent);
	chNodeSrc("under_"+path, "/img/next/under_"+path+".gif");
	chNodeSrc("under_"+mainMenuCurrent, "/img/spacer.gif");
	}

function forNextMenuDeactivate(path)
	{
	hideNode("main_menu_"+path);
	showNode("main_menu_"+mainMenuCurrent);
	chNodeSrc("under_"+mainMenuCurrent, "/img/next/under_"+path+".gif");
	chNodeSrc("under_"+path, "/img/spacer.gif");
	}
////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////////////////////
function nextMenuL2Activate(path)
	{
	clearTimeout(nextMenuL2HideTimeout);

	forNextMenuL2DeActivate(mainMenuCurrent2Prev);

	chNodeBgcolor("menu_"+mainMenuCurrent2, "#696969");
	chNodeBgcolor("menu_"+path, "#ffffff");
	}


function nextMenuL2DeActivate(path)
	{
	nextMenuL2HideTimeout=setTimeout('forNextMenuL2DeActivate("'+path+'")', 500);
	mainMenuCurrent2Prev=path;

	//forNextMenuL2DeActivate(path);
	}

function forNextMenuL2DeActivate(path)
	{
	chNodeBgcolor("menu_"+path, "#696969");
	chNodeBgcolor("menu_"+mainMenuCurrent2, "#ffffff");
	}
/////////////////////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////
function activatePortfolio(path)
	{
	hideNode("active"+mainMenuCurrent3);
	showNode("unActive"+mainMenuCurrent3);

	hideNode("unActive"+path);
	showNode("active"+path);
	}


function deActivatePortfolio(path)
	{
	hideNode("active"+path);
	showNode("unActive"+path);

	hideNode("unActive"+mainMenuCurrent3);
	showNode("active"+mainMenuCurrent3);
	}





////////////////////////////////////////////////////////



function hideContacts()
	{
	chNodeBgParam("fullBg", "/img/content/contacts/closed_letter_full.jpg", "top center no-repeat");
	setTimeout('hideNode("contacts_inf_1")', 10);
	setTimeout('hideNode("contacts_inf_2")', 25);
	setTimeout('hideNode("contacts_inf_3")', 50);
	setTimeout('hideNode("contacts_inf_4")', 75);
	setTimeout('hideNode("contacts_inf_5")', 100);
	setTimeout('hideNode("contacts_inf_6")', 125);
	setTimeout('hideNode("contacts_inf_7")', 150);
	setTimeout('hideNode("contacts_inf_8")', 175);
	setTimeout('hideNode("contacts_inf_9")', 200);
	//setTimeout('chNodeBgParam("contacts_inf_10", "/img/content/contacts/closed_letter_full.jpg", "top center no-repeat")', 225);
	setTimeout('chNodeWH("contacts_inf_11", "439", "120")', 250);
	setTimeout('chNodeWH("contacts_inf_11", "439", "80")', 275);
	setTimeout('chNodeWH("contacts_inf_11", "439", "40")', 300);
	setTimeout('showNode("contactsClosed")', 325);
	setTimeout('hideNode("contactsOpened")', 325);
	setTimeout('chNodeBgParam("fullBg", "/img/content/contacts/closed_letter_full.jpg", "top center no-repeat")', 325);
	hideNode("contacts_inf_12");
	showNode("contacts_inf_13");
	}

function hideContactsEng()
	{
	chNodeBgParam("fullBg", "/img/content/contacts/closed_letter_full_eng.jpg", "top center no-repeat");
	setTimeout('hideNode("contacts_inf_1")', 10);
	setTimeout('hideNode("contacts_inf_2")', 25);
	setTimeout('hideNode("contacts_inf_3")', 50);
	setTimeout('hideNode("contacts_inf_4")', 75);
	setTimeout('hideNode("contacts_inf_5")', 100);
	setTimeout('hideNode("contacts_inf_6")', 125);
	setTimeout('hideNode("contacts_inf_7")', 150);
	setTimeout('hideNode("contacts_inf_8")', 175);
	setTimeout('hideNode("contacts_inf_9")', 200);
	//setTimeout('chNodeBgParam("contacts_inf_10", "/img/content/contacts/closed_letter_full_eng.jpg", "top center no-repeat")', 225);
	setTimeout('chNodeWH("contacts_inf_11", "439", "120")', 250);
	setTimeout('chNodeWH("contacts_inf_11", "439", "80")', 275);
	setTimeout('chNodeWH("contacts_inf_11", "439", "40")', 300);
	setTimeout('showNode("contactsClosed")', 325);
	setTimeout('hideNode("contactsOpened")', 325);
	setTimeout('chNodeBgParam("fullBg", "/img/content/contacts/closed_letter_full_eng.jpg", "top center no-repeat")', 325);
	hideNode("contacts_inf_12");
	showNode("contacts_inf_13");
	}

function showContacts()
	{
	showNode("contactsOpened");
	hideNode("contactsClosed");

	setTimeout('chNodeWH("contacts_inf_11", "439", "80")', 10);
	setTimeout('chNodeWH("contacts_inf_11", "439", "120")', 35);
	setTimeout('chNodeWH("contacts_inf_11", "439", "165")', 60);

	
	hideNode("contacts_inf_13");
	showNode("contacts_inf_12");

	$t=60;


	setTimeout('showNode("contacts_inf_9")', ($t+10));
	setTimeout('showNode("contacts_inf_8")', ($t+50));
	setTimeout('showNode("contacts_inf_7")', ($t+50));
	setTimeout('showNode("contacts_inf_6")', ($t+100));
	setTimeout('showNode("contacts_inf_5")', ($t+150));
	setTimeout('showNode("contacts_inf_4")', ($t+150));
	setTimeout('showNode("contacts_inf_3")', ($t+200));
	setTimeout('showNode("contacts_inf_2")', ($t+250));
	setTimeout('showNode("contacts_inf_1")', ($t+250));


	}

/////////////////////////////////

function lightningCompany()
	{
	chNodeSrc("main_company", "/img/next/company_a.gif");
	setTimeout('chNodeSrc("main_company", "/img/next/company.gif")', 2000);
	}

function lightningPortfolio()
	{
	chNodeSrc("main_portfolio", "/img/next/portfolio_a.gif");
	setTimeout('chNodeSrc("main_portfolio", "/img/next/portfolio.gif")', 2000);
	}

function lightning()
	{
	setTimeout('lightningCompany()', 500);
	setTimeout('lightningPortfolio()', 7500);
	setTimeout('lightning()', 18000);
	}


creativeBg = new Array();
creativeBg[0]="#ffffff";
creativeBg[1]="#efefef";
creativeBg[2]="#e8e8e8";
creativeBg[3]="#dfdfdf";
creativeBg[4]="#d8d8d8";
creativeBg[5]="#cfcfcf";



function creativeActivate(nodeId, nom, nomRow)
	{
	creativeBorderActivate(nodeId, nom);
	}

function creativeDeactivate(nodeId, nom, nomRow)
	{
	creativeBorderDeactivate(nodeId, nom);
	}


function creativeBorderActivate(nodeId, nom)
	{
	if(node=getNode("creative_table_"+nodeId))
		{
		if(nom>0)
			{
			nom--;
			clearTimeout(creativeTables[nodeId]['timeoutDeactivate']);
			node.style.background=creativeBg[nom];
			creativeTables[nodeId]['timeoutActivate']=setTimeout('creativeBorderActivate("'+nodeId+'", '+nom+')', 30);
			}
		}
	}

function creativeBorderDeactivate(nodeId, nom)
	{
	nom++;
	if(node=getNode("creative_table_"+nodeId))
		{
		if(nom<6)
			{
			node.style.background=creativeBg[nom];
			clearTimeout(creativeTables[nodeId]['timeoutActivate']);
			creativeTables[nodeId]['timeoutDeactivate']=setTimeout('creativeBorderDeactivate("'+nodeId+'", '+nom+')', 30);
			}
		}
	
	}

function showHidePartnershipForm()
	{
	if(node_id=getNode("partnership_form_0"))
		{
		if(node_id.style.display=="block")
			{hidePartnershipForm();}
		else
			{showPartnershipForm();}
		}
	}


function hidePartnershipForm()
	{
	tn=5;
	t=tn;
	

	hidePartnershipNode(10, (t+=tn*2), tn);
	hidePartnershipNode(8, (t+=tn*2), tn);
	hidePartnershipNode(6, (t+=tn*2), tn);
	hidePartnershipNode(4, (t+=tn*2), tn);
	hidePartnershipNode(2, (t+=tn*2), tn);
	hidePartnershipNode(0, (t+=tn*2), tn);
	}


function hidePartnershipNode(nodeNom, timeOut, tn)
	{
	next=Number(nodeNom)+1;
	setTimeout('hideNode("partnership_form_'+nodeNom+'")', timeOut);
	setTimeout('showNode("partnership_form_'+next+'")', timeOut);
	setTimeout('hideNode("partnership_form_'+next+'")', (timeOut+tn));
	}


function showPartnershipForm()
	{
	tn=5;
	t=tn;

	showPartnershipNode(0, (t+=tn*2), 5);
	showPartnershipNode(2, (t+=tn*2), tn);
	showPartnershipNode(4, (t+=tn*2), tn);
	showPartnershipNode(6, (t+=tn*2), tn);
	showPartnershipNode(8, (t+=tn*2), tn);
	showPartnershipNode(10, (t+=tn*2), tn);
	}

function showPartnershipNode(nodeNom, timeOut, tn)
	{
	next=Number(nodeNom)+1;

	setTimeout('showNode("partnership_form_'+next+'")', timeOut);
	setTimeout('showNode("partnership_form_'+nodeNom+'")', (timeOut+=tn));
	setTimeout('hideNode("partnership_form_'+next+'")', (timeOut));
	}
