var GarrAppeared=new Array(0,0,0);
var GarrAppearedC=new Array(0,0,0);

function fShowSubMenu(PintMenuNo)
{
	if(PintMenuNo>-1) {
		var LintNewLeft=fOffsetLeft(document.getElementById("GtblMainMenuTable"))+3;
		var LintNewTop=86+(PintMenuNo*30);
		GarrAppeared[PintMenuNo]=1;
		GarrAppearedC[PintMenuNo]=1;
	}
	if(PintMenuNo==0) {
		fDisappear(document.getElementById("GdivSubMenuProducts"));
		fDisappear(document.getElementById("GdivSubMenuServices"));
		fAppear(document.getElementById("GdivSubMenuAboutUs"));
		document.getElementById("GdivSubMenuAboutUs").style.left=LintNewLeft-document.getElementById("GtblSubMenuAboutUs").firstChild.firstChild.offsetWidth;
		document.getElementById("GdivSubMenuAboutUs").style.top=LintNewTop;
	}
	else if(PintMenuNo==1) {
		fDisappear(document.getElementById("GdivSubMenuAboutUs"));
		fDisappear(document.getElementById("GdivSubMenuServices"));
		fAppear(document.getElementById("GdivSubMenuProducts"));
		document.getElementById("GdivSubMenuProducts").style.left=LintNewLeft-document.getElementById("GtblSubMenuProducts").firstChild.firstChild.offsetWidth;
		document.getElementById("GdivSubMenuProducts").style.top=LintNewTop;
	}
	else if(PintMenuNo==2) {
		fDisappear(document.getElementById("GdivSubMenuProducts"));
		fDisappear(document.getElementById("GdivSubMenuServices"));
		fAppear(document.getElementById("GdivSubMenuServices"));
		document.getElementById("GdivSubMenuServices").style.left=LintNewLeft-document.getElementById("GtblSubMenuServices").firstChild.firstChild.offsetWidth;
		document.getElementById("GdivSubMenuServices").style.top=LintNewTop;
	}
	else {
		fDisappear(document.getElementById("GdivSubMenuAboutUs"));
		fDisappear(document.getElementById("GdivSubMenuProducts"));
		fDisappear(document.getElementById("GdivSubMenuServices"));
	}
}
function fHideSubMenu(PintMenuNo)
{
	GarrAppeared[PintMenuNo]=0;
	GarrAppearedC[PintMenuNo]=0;
	setTimeout("fHideSubMenuA("+PintMenuNo+")",1500);
}
function fHideSubMenuA(PintMenuNo)
{
	if(GarrAppearedC[PintMenuNo]==1)return;
	if(PintMenuNo==0) {
		fDisappear(document.getElementById("GdivSubMenuAboutUs"));
	}
	else if(PintMenuNo==1) {
		fDisappear(document.getElementById("GdivSubMenuProducts"));
	}
	else if(PintMenuNo==2) {
		fDisappear(document.getElementById("GdivSubMenuServices"));
	}
	else {
		return true;
	}
}

function fAppear(PobjSource)
{
	PobjSource.style.display="block";	//PobjSource.style.filter="progid:DXImageTransform.Microsoft.Fade()";PobjSource.filters[0].apply(); PobjSource.filters[0].play();
}
function fDisappear(PobjSource)
{
	PobjSource.style.display="none";
}

function fOverSubMenuP(PintMenuNo)
{
	GarrAppearedC[PintMenuNo]=1;
}
function fOutSubMenuP(PintMenuNo)
{
	GarrAppearedC[PintMenuNo]=0;
	setTimeout("fHideSubMenuA("+PintMenuNo+")",1500);
}

function fOverMenu(PRobjSource)
{
	PRobjSource.style.backgroundColor="rgb(205,230,250)";
	PRobjSource.style.borderLeftColor="rgb(150,200,240)";
}
function fOutMenu(PRobjSource)
{
	PRobjSource.style.backgroundColor="rgb(250,250,250)";
	PRobjSource.style.borderColor="rgb(200,200,200)";
}

function fOverSubMenu(PRobjSource)
{
	PRobjSource.style.backgroundColor="rgb(255,210,230)";
}
function fOutSubMenu(PRobjSource)
{
	PRobjSource.style.backgroundColor="rgb(250,250,250)";
}