﻿//Added By Mahendra on 08/July/2010

//This function is used to make session for the Awards & Recognition page
function GenerateSession(oitem)
{ var WardsDetailsId = oitem;
document.getElementById("hdnWardsDetailsId").value = WardsDetailsId;   
var ie=navigator.appName;//this code checks for Internet Explorer browser
var mozilla=navigator.userAgent.toLowerCase(); //this code checks for mozilla browser
if(ie.indexOf('Microsoft Internet Explorer')!=-1){window.document.getElementById("LinkButton1").click();}
else if(mozilla.indexOf('mozilla')!=-1){__doPostBack('LinkButton1','');}
}


//This function is used to make session for the AboutUs page
function GenerateSessAboutUs(oitem)
{ var AboutUsId = oitem; document.getElementById("hdnAboutUsId").value = AboutUsId;  
var ie=navigator.appName;//this code checks for Internet Explorer browser
var mozilla=navigator.userAgent.toLowerCase(); //this code checks for mozilla browser
if(ie.indexOf('Microsoft Internet Explorer')!=-1){window.document.getElementById("lnkAboutUs").click();}
else if(mozilla.indexOf('mozilla')!=-1){__doPostBack('lnkAboutUs','');}
}


//This function is used to make session for the ucTop page
function GenerateSessucTop(oitem)
{ 
var AboutUsId = oitem; document.getElementById("ucTop_hdnAboutUsId").value = AboutUsId;
var ie=navigator.appName;//this code checks for Internet Explorer browser
var mozilla=navigator.userAgent.toLowerCase(); //this code checks for mozilla browser
if(ie.indexOf('Microsoft Internet Explorer')!=-1){window.document.getElementById("ucTop_lnkAboutUs").click();}
else if(mozilla.indexOf('mozilla')!=-1){__doPostBack('ucTop_lnkAboutUs','');}
}


//This function is used to make session for the AboutUs page
function GenerateSessPress(oitem,otype)
{ 
var PressDtlId = oitem; document.getElementById("hdnPressDtlId").value = PressDtlId;  document.getElementById("hdnPageType").value = otype;
var ie=navigator.appName;//this code checks for Internet Explorer browser
var mozilla=navigator.userAgent.toLowerCase(); //this code checks for mozilla browser
if(ie.indexOf('Microsoft Internet Explorer')!=-1){window.document.getElementById("lnkPress").click();}
else if(mozilla.indexOf('mozilla')!=-1){__doPostBack('lnkPress','');}
}

function GenerateSessn(oitem)
{
var PressDtlId = oitem; document.getElementById("hdnPressDtlId").value = PressDtlId;
var ie=navigator.appName;//this code checks for Internet Explorer browser
var mozilla=navigator.userAgent.toLowerCase(); //this code checks for mozilla browser
if(ie.indexOf('Microsoft Internet Explorer')!=-1){window.document.getElementById("lnkPress").click();}
else if(mozilla.indexOf('mozilla')!=-1){__doPostBack('lnkPress','');}
}
//End of Added By Mahendra on 08/July/2010

//This apply css to the top menu 
function ApplyucTopCss(oitem){
var ObjGrid = oitem.id;var agt=navigator.appName;var agt1=navigator.userAgent.toLowerCase();
if(agt.indexOf('Microsoft Internet Explorer')!=-1)
{
if(ObjGrid=="ucTop_liAboutUs"){document.getElementById("ucTop_hrefAboutUs").setAttribute('className','');
document.getElementById("ucTop_hrefAboutUs").setAttribute('className','jqueryslidemenuActive');}
else if(ObjGrid=="ucTop_liAwards"){document.getElementById("ucTop_hrefAwards").setAttribute('className','');
document.getElementById("ucTop_hrefAwards").setAttribute('className','jqueryslidemenuActive');}
}
else if(agt1.indexOf('mozilla')!=-1)
{
if(ObjGrid=="ucTop_liAboutUs"){document.getElementById("ucTop_hrefAboutUs").setAttribute('class','');
document.getElementById("ucTop_hrefAboutUs").setAttribute('class','jqueryslidemenuActive');}
else if(ObjGrid=="ucTop_liAwards"){document.getElementById("ucTop_hrefAwards").setAttribute('class','');
document.getElementById("ucTop_hrefAwards").setAttribute('class','jqueryslidemenuActive');}
}
}

//This Remove css to the top menu 
function RemoveucTopCss(oitem)
{ 
var ObjGrid = oitem.id;var agt=navigator.appName;var agt1=navigator.userAgent.toLowerCase(); 
var parent = oitem.ownerDocument.location.pathname;
var temp = new Array();
temp = parent.split('/');
var rw;
for(var j=0;j<temp.length;j++){if(temp[j].indexOf("aspx")!=-1){rw = temp[j].replace(".aspx", "");}} 
if(agt.indexOf('Microsoft Internet Explorer')!=-1)
{if(ObjGrid=="ucTop_liAboutUs"){if(Checkpage(rw,"AboutUsarray")==1)document.getElementById("ucTop_hrefAboutUs").setAttribute('className','');}
else if(ObjGrid=="ucTop_liAwards"){if(Checkpage(rw,"Awardsarray")==1)document.getElementById("ucTop_hrefAwards").setAttribute('className','');}
}
else if(agt1.indexOf('mozilla')!=-1)
{if(ObjGrid=="ucTop_liAboutUs"){if(Checkpage(rw,"AboutUsarray")==1)document.getElementById("ucTop_hrefAboutUs").setAttribute('class','');}
else if(ObjGrid=="ucTop_liAwards"){if(Checkpage(rw,"Awardsarray")==1)document.getElementById("ucTop_hrefAwards").setAttribute('class','');}
}
}
function Checkpage(ostring,otype)
{
var flag = 1;
var AboutUsarray =new Array("OurHistory","CoreIdeologies","OurProcess","CEOMessage","OurPeople","CareerOpportunities");
var Awardsarray =new Array("Awards","Testimonials","AwardDetails");
if(otype == "AboutUsarray"){
for(var i=0; i<AboutUsarray.length; i++)
{if(AboutUsarray[i]== ostring)flag=-1; }}
if(otype == "Awardsarray"){
for(var i=0; i<Awardsarray.length; i++)
{if(Awardsarray[i]== ostring)flag=-1;}}
return flag;
}

