//#########################################################################################################  
//    # File Name: index.js
//    # File Version: v 1.0
//    # Created By: Amit Sankhala
//    # Created On: 16 December 2008
//    # Last Modified By:
//    # Last modified On:
//######################################################################################################### 

//==================================================================================================== 
//  Function Name : tabber 
//    # Created By: Amit Sankhala
//    # Created On: 16 December 2008
//    Last Modified By:
//    Last modified On:
//  Purpose : Toggle Tabs of Index Page.
//  Parameters:  id : id of the element to show.
//----------------------------------------------------------------------------------------------------
function tabber(id)
{
    if(id == 'about')
    {
    //set visibility.
        $(id).show();
        $("professional").hide();
        $("schools").hide();
        $("Apply").hide();
		$("corporate").hide();
        
        //set classes.
        toggleAboutTab('active');
		toggleProfTab('Inactive');
		toggleSchoolTab('Inactive');
		toggleApplyTab('Inactive'); 
		toggleCorporateTab('Inactive');
    }
    else if(id == 'professional')
    {
    //set visibility.
        $("about").hide();
        $(id).show();
        $("schools").hide();
        $("Apply").hide();
		$("corporate").hide();
        
        //set classes.
        toggleAboutTab('Inactive');
		toggleProfTab('active');
		toggleSchoolTab('Inactive');
		toggleApplyTab('Inactive');
		toggleCorporateTab('Inactive');
    }
    else if(id == 'schools')
    {
    //set visibility.
        $("about").hide();
        $("professional").hide();
        $("schools").show();
        $("Apply").hide();
		$("corporate").hide();
        
        //set classes.
        toggleAboutTab('Inactive');
		toggleProfTab('Inactive');
		toggleSchoolTab('active');
		toggleApplyTab('Inactive');
		toggleCorporateTab('Inactive');
    }
    else if(id == 'Apply')
    {
    //set visibility.
        $("about").hide();
        $("professional").hide();
        $("schools").hide();
        $("Apply").show();
    	$("corporate").hide();
        
       //set classes.
        toggleAboutTab('Inactive');
		toggleProfTab('Inactive');
		toggleSchoolTab('Inactive');
		toggleApplyTab('active');
		toggleCorporateTab('Inactive');
    }
	else if(id == 'corporate')
	{
		//set visibility.
        $("about").hide();
        $("professional").hide();
        $("schools").hide();
        $("Apply").hide();
		$("corporate").show();
        
       //set classes.
        toggleAboutTab('Inactive');
		toggleProfTab('Inactive');
		toggleSchoolTab('Inactive');
		toggleApplyTab('Inactive');
		toggleCorporateTab('active');
	}
}
//==================================================================================================== 
//  Function Name : toggleCorporateTab 
//    # Created By: Amit Sankhala
//    # Created On: 30 January 2008
//    Last Modified By:
//    Last modified On:
//	Parameter : status : Status whether it is active tab or inactive tab.
//  Purpose : Toggle Tabs of About Tab of the Index Page.
//----------------------------------------------------------------------------------------------------
function toggleCorporateTab(status)
{
	if(status == 'Inactive')
	{
        $("corporate_td").removeClassName('current_tab');        
		$('corporate_td').addClassName('other_tab');
	}
	else
	{
		$('corporate_td').removeClassName('other_tab');
		$('corporate_td').addClassName('current_tab');
	}
}
//==================================================================================================== 
//  Function Name : toggleAboutTab 
//    # Created By: Amit Sankhala
//    # Created On: 21 January 2008
//    Last Modified By:
//    Last modified On:
//	Parameter : status : Status whether it is active tab or inactive tab.
//  Purpose : Toggle Tabs of About Tab of the Index Page.
//----------------------------------------------------------------------------------------------------
function toggleAboutTab(status)
{
	if(status == 'Inactive')
	{
        $("about_td").removeClassName('current_tab');        
		$('about_td').addClassName('other_tab');
	}
	else
	{
		$('about_td').removeClassName('other_tab');
		$('about_td').addClassName('current_tab');
	}
}
//==================================================================================================== 
//  Function Name : toggleProfTab 
//    # Created By: Amit Sankhala
//    # Created On: 21 January 2008
//    Last Modified By:
//    Last modified On:
//	Parameter : status : Status whether it is active tab or inactive tab.
//  Purpose : Toggle Tabs of Professinals Tab of the Index Page.
//----------------------------------------------------------------------------------------------------
function toggleProfTab(status)
{
	if(status == 'Inactive')
	{
        $("professional_td").removeClassName('current_tab');        
		$('professional_td').addClassName('other_tab');
	}
	else
	{
		$('professional_td').removeClassName('other_tab');
		$('professional_td').addClassName('current_tab');
	}
}
//==================================================================================================== 
//  Function Name : toggleSchoolTab 
//    # Created By: Amit Sankhala
//    # Created On: 21 January 2008
//    Last Modified By:
//    Last modified On:
//	Parameter : status : Status whether it is active tab or inactive tab.
//  Purpose : Toggle Tabs of Schools Tab of the Index Page.
//----------------------------------------------------------------------------------------------------
function toggleSchoolTab(status)
{
	if(status == 'Inactive')
	{
        $("schools_td").removeClassName('current_tab');        
		$('schools_td').addClassName('other_tab');
	}
	else
	{
		$('schools_td').removeClassName('other_tab');
		$('schools_td').addClassName('current_tab');
	}
}
//==================================================================================================== 
//  Function Name : toggleApplyTab 
//    # Created By: Amit Sankhala
//    # Created On: 21 January 2008
//    Last Modified By:
//    Last modified On:
//	Parameter : status : Status whether it is active tab or inactive tab.
//  Purpose : Toggle Tabs of Apply Tab of the Index Page.
//----------------------------------------------------------------------------------------------------
function toggleApplyTab(status)
{
	if(status == 'Inactive')
	{
        $("Apply_td").removeClassName('current_tab');        
		$('Apply_td').addClassName('other_tab');
	}
	else
	{
		$('Apply_td').removeClassName('other_tab');
		$('Apply_td').addClassName('current_tab');
	}
}