// JScript File

//Added by  :   Vilas Palve
//Date      :   03-09-2007
//Purpose   :   for the use iframes

var SelectedLink="";

//function for SiteMap page
//give link

function ShowSiteLink(LinkName)
{  

//for eRecruit
    if(LinkName.substring(0,2)=='eR')
    {
        //for sub menu
        if(LinkName=='eRAboutUs')
        {
            open("http://www.erecruit.co.in/Erec/Index.asp?Id=AboutUs","_parent"); 
            //open("Erec/Index.asp?Id=AboutUs","_parent");            
        }
        else
        {           
           var TempLink=LinkName.substr(2);
           open("http://www.erecruit.co.in/Erec/Index.asp?Id="+TempLink,"_parent");                   
        }
        
     }   
//for Gains    
    if(LinkName.substring(0,2)=='eG')
    {
        var TempLink=LinkName.substr(2);            
        open("http://www.erecruit.co.in/Gains/Index.asp?Id="+TempLink,"_parent");        
    }
    
}

function ShowDetails(LinkName,Bgfor)
{
  if(LinkName=='AWINDFALL_EREC' || LinkName=='AWINDFALL_GAINS' || LinkName=='Home.htm' )
  {
        if(LinkName=='Home.htm')        
        {          
            open(LinkName,"_parent");                                   
        }        
       else if(LinkName=='AWINDFALL_EREC')        
        {   
            open("http://www.erecruit.co.in","_parent");            
        }
        else if(LinkName=='AWINDFALL_GAINS')
        {
            open("http://www.erecruit.co.in/GAINS/Index.asp?Id=AboutUs","_parent");            
        }
    }
    else
    {
        if(LinkName=='WEmail') 
        {
          
        }
        else
        {   
        //Load selected page in the iframe        
            open(LinkName,"MainFrm","","target=MainFrm");
        
            if(SelectedLink=="")
            {
            }
            else
            {
	  if(document.getElementById(SelectedLink) != null)//
	    {
	                document.getElementById(SelectedLink).style.color='#000000';
	     }
            }  
            SelectedLink=Bgfor;    
	if(document.getElementById(Bgfor) != null)//
	    {                       
            	        document.getElementById(Bgfor).style.color='#669900'; //'#669900';//'#b22222';  
	     }
        } 
     }
    
}
function setOverColor(param,ColParam)
{   
    var SetColor=0;    
    //for ERec
    if(param.substring(0,2)=='eR')    
    {
       document.getElementById(param).style.color='#0033CC';   
       SetColor=1;
    }
    //for Gains
    else if(param.substring(0,2)=='eG')
    {//#FF8C00 - old color
       document.getElementById(param).style.color='#b22222';   
       SetColor=1;
    }     
    //for Windfall
    if(SetColor==0)
    {    
       document.getElementById(param).style.color='#669900';   
    }
    
}

function setOutColor(param,ColParam)
{
    if(SelectedLink!=param)
    {
        document.getElementById(param).style.color=ColParam;      
    }
}

function SetDefault()
{
    //ShowDetails('Aboutus.htm',''
    open('Aboutus.htm',"MainFrm","","target=MainFrm");
    ShowDetails('Aboutus.htm','Aboutus');    
}
    


