/*************************************************************************************************************** 
	HomePageValidation.js
	Author: Mahip Kumar,Softvision Solution
	Created: 11/18/2005

	DESCRIPTION: 
		These are all of the javascript functions used in the home page

	PARAMETERS:
		oCtl		-
		ControlName - ControlName
		

***************************************************************************************************************/ 
//first param is Active and second is the one to disable
function tabClicked(divToShow, divToHide, tabToShow, tabToHide, image1, image2)
{
	var divShow = document.getElementById(divToShow);
	var divHide = document.getElementById(divToHide);
	var tabShow = document.getElementById(tabToShow);
	var tabHide = document.getElementById(tabToHide);
	var image1	= document.getElementById(image1);
	var image2	= document.getElementById(image2);
	
	divShow.style.display = 'block';
	divHide.style.display = 'none';
	
	switch(divToShow)
	{
		case 'tabLogInDiv':
				changeRight();
				break;							
			
		case 'tabCreateProfileDiv':
				changeLeft();
				break;
				
		case 'tabMyTripDiv':
				changeRight();
				break;							
			
		case 'tabEmailDiv':
				changeLeft();
				break;
					
		case 'tabWebCheckInDiv':
				changeRight();
				break;							
			
		case 'tabFlifoDiv':
				changeLeft();
				break;
				
		case 'homePageQuickLinksWeatherEntry_panelQuickLinks':
				changeRight();
				break;	
				
		case 'homePageQuickLinksWeatherEntry_panelWeather':
				changeLeft();
				break;
	}
	
	function changeLeft()
	{
		image1.src = 'Softvision_Solution_Home_files/be_right_wedge_mid_dkgrey.gif';
		image2.src = 'Softvision_Solution_Home_files/be_right_wedge_grey.gif';
		tabShow.className = 'righttab bgltgray bebold';
		tabHide.className = 'lefttab  bgdkgray bebold white none';
	}
	
	function changeRight()
	{
		image1.src = 'Softvision_Solution_Home_files/be_right_wedge_mid_grey.gif';
		image2.src = 'Softvision_Solution_Home_files/be_right_wedge_dkgrey.gif';
		tabShow.className = 'lefttab bgltgray bebold';
		tabHide.className = 'righttab bgdkgray bebold white none';
	}
}

function fnKeyPress(buttonID)
{
	if (event.keyCode == 13)
	{	
		var imgButton		= document.getElementById(buttonID);
		imgButton.focus(); 
		imgButton.click();	
	}
}