// ********  methods to call the Other Functions **************//
function DisplayMenu()
{
	IncludeFile('Menu/Menu.htm', 'divMenu');	
	IncludeFile('UserControls/TopBar.htm', 'divTopBar');
	IncludeFile('UserControls/BottomBar.htm', 'divBottomBar');
	IncludeFile('UserControls/BottomNote.htm', 'divBottomNote');
	

}
function DisplayMenuInside()
{	

	IncludeFile('../Menu/MenuInside.htm', 'divMenu');	
	IncludeFile('../UserControls/TopBarInside.htm', 'divTopBar');
	IncludeFile('../UserControls/BottomBarInside.htm', 'divBottomBar');
	IncludeFile('../UserControls/BottomNoteInside.htm', 'divBottomNote');
	//IncludeFile('../UserControls/RightBarInside.htm', 'divRightBar');
	
}
function DisplayRightMenu(controlUrl)
{
	IncludeFile(controlUrl, 'divRightBar');		
}
function DisplayRightMenu1()
{
	IncludeFile('../UserControls/RightBarInside.htm', 'divRightBar');
}


// *********** Code Used for Menu Display Animation ************ //
// Show Menu - Show the div tag as a block element
// Hide Menu - Hide the div tag
// Hide -- Hide all the Tag
// Show - Depend on the divName hide and display the div tag menu items

var timerOn=false,timerID,timecount=1000;
function showMenu(mnu1,mnu2,mnu3)
{
	hide('divAboutUs');	
	
	hide('divServices');	
		
	hide('divQuality');	
	hideVisible('divQuality');
	
	hide('divProjects');
	
	hide('DivERP');
	hideVisible('DivERP');
	
	hide('DivHealth');
	hideVisible('DivHealth');
	
	hide('divPortals');	
	hideVisible('divPortals');
	
	//hide('divProjects2');
	//hideVisible('divProjects2');
	
	hide('Div1');	
	hideVisible('Div1');
	
	
	hide('divClients');
	
	hide('divDesigns');
	
	hide('divSupport');
		
	if (mnu1 != "NO")
	{
		show(mnu1);
	}		
	if (mnu2 != "NO")
	{
		show(mnu2);
		showVisible(mnu2);
	}	
	if (mnu3 != "NO")
	{
		show(mnu3);
		showVisible(mnu3);
	}		
}
function show(strName)
{
	document.getElementById(strName).style.display ="block";		  
}
function hide(strName)
{
	document.getElementById(strName).style.display = "none";		  
}
function hideVisible(strName)
{
	document.getElementById(strName).style.visibility = "hidden";
}
function showVisible(strName)
{
	document.getElementById(strName).style.visibility = "visible";
}
function startTime() 
{
	if (timerOn == false) 
	{
		timerID=setTimeout( "showMenu('NO','NO','NO')" , timecount);
		timerOn = true;
	}
}
function stopTime() 
{
	if (timerOn) 
	{
		clearTimeout(timerID);
		timerID = null;
		timerOn = false;
	}
}

// ************** HTML User Control ******************* //
// Get the URL and Location and Read the html content from the specified url
// and display in the specified location Works in both IE and Netscape

function IncludeFile(url,loc)			
{
	if ('undefined' == typeof(url)) 
		return false;
			
	var p,rnd;
	if (document.all)
	{
		// For IE, create an ActiveX Object instance 
		p = new ActiveXObject("Microsoft.XMLHTTP");
	} 
	else 
	{
		// For mozilla, create an instance of XMLHttpRequest.
		p = new XMLHttpRequest();
	}
 
	// Prevent browsers from caching the included page by appending a random  number
	rnd = Math.random().toString().substring(2);
	url = url.indexOf('?')>-1 ? url+'&rnd='+rnd : url+'?rnd='+rnd;
	// Open the url and write out the response
	p.open("GET",url,false);
	p.send(null);						
	document.getElementById(loc).innerHTML = p.responseText;				
}