function rollover(imagename, newsrc, oldsrc){


if (document.images[imagename].src!=newsrc)
{
document.images[imagename].src=newsrc
}

}


function rollout(imagename, newsrc, oldsrc,txtTag){

var sentence=document.URL;
if (sentence.indexOf(txtTag)!=-1)
{
document.images[imagename].src=newsrc
}

else
{
document.images[imagename].src=oldsrc
}


}






function init() {
  

//var sentence=self.document.location.hash.substring(1);

var sentence=document.URL;

if (sentence.indexOf("Home")!=-1)
{
rollover('mnuHome', 'http://www.wns.com/images/but_o_home.gif' , 'http://www.wns.com/images/but_home.gif');
}
else if (sentence.indexOf("AboutUs")!=-1)
{
rollover('mnuaboutus', 'http://www.wns.com/images/but_o_aboutus.gif', 'http://www.wns.com/images/but_aboutus.gif');
}

else if (sentence.indexOf("Services")!=-1)
{
rollover('mnuservices', 'http://www.wns.com/images/but_o_services.gif', 'http://www.wns.com/images/but_services.gif');
}

else if (sentence.indexOf("Insights")!=-1)
{
rollover('mnuinsights', 'http://www.wns.com/images/but_o_insights.gif', 'http://www.wns.com/images/but_insights.gif');
}

else if (sentence.indexOf("AnalystRelations")!=-1)
{
rollover('mnuanalyst', 'http://www.wns.com/images/but_o_analyst.gif', 'http://www.wns.com/images/but_analyst.gif');
}

else if (sentence.indexOf("WNSAdvantage")!=-1)
{
rollover('mnuwnsadvantage', 'http://www.wns.com/images/but_o_wnsadvantage.gif', 'http://www.wns.com/images/but_wnsadvantage.gif');
}

else if (sentence.indexOf("ClientSuccesses")!=-1)
{
rollover('mnusuccess', 'http://www.wns.com/images/but_o_clientsuccess.gif', 'http://www.wns.com/images/but_clientsuccess.gif');
}

else if (sentence.indexOf("NewsEvents")!=-1)
{
rollover('mnunewsevents', 'http://www.wns.com/images/but_o_newsevents.gif', 'http://www.wns.com/images/but_newsevents.gif');
}

else if (sentence.indexOf("InvestorRelations")!=-1)
{
rollover('mnuinvestor', 'http://www.wns.com/images/but_o_investor.gif', 'http://www.wns.com/images/but_investor.gif');
}

else if (sentence.indexOf("ContactUs")!=-1)
{
rollover('mnucontactus', 'http://www.wns.com/images/but_o_contactus.gif', 'http://www.wns.com/images/but_contactus.gif');
}

else
{
rollover('mnuHome', 'http://www.wns.com/images/but_home.gif', 'http://www.wns.com/images/but_home.gif');
}

//document.write (self.document.location.hash.substring(1));
   
   }
   
window.onload = init;

var menuaboutus=new Array()
menuaboutus[0]='<a href="http://www.wns.com/AboutUs/CorporateOverview/tabid/65/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;Corporate Overview</a>'
menuaboutus[1]='<a href="http://www.wns.com/AboutUs/MissionandValues/tabid/69/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;Mission and Values</a>'
menuaboutus[2]='<a href="http://www.wns.com/AboutUs/BoardofDirectors/tabid/64/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;Board of Directors </a>'
menuaboutus[3]='<a href="http://www.wns.com/AboutUs/ManagementTeam/tabid/70/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;Management Team</a>'
menuaboutus[4]='<a href="http://www.wns.com/AboutUs/IndustryRecognition/tabid/67/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;Industry Recognition</a>'
menuaboutus[5]='<a href="http://www.wns.com/AboutUs/ClientTestimonials/tabid/137/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;Client Testimonials</a>'
menuaboutus[6]='<a href="http://www.wns.com/AboutUs/CorporateSocialResponsibility/tabid/66/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;Corporate Social Responsibility</a>'

//menuaboutus[4]='<a href="http://www.wns.com/AboutUs/Locations/tabid/68/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;Locations</a>'

var menuServices=new Array()
menuServices[0]='<div style="color: #FFFFFF; background-color: #756755; width:250px; border-bottom-width:0px;">&nbsp;&nbsp;&nbsp;&nbsp;<font face="Arial" style="font-size: 11px" color="#ffffff">Industry Focused Solutions</font></div>'

menuServices[1]='<a href=" http://www.wns.com/Services/BankingandFinancialServices/tabid/71/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;- Banking and Financial Services  </a>'

menuServices[2]='<a href=" http://www.wns.com/Services/Communications/tabid/44169/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;- Communications  </a>'

menuServices[3]='<a href=" http://www.wns.com/Services/Healthcare/tabid/72/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;- Healthcare </a>'

menuServices[4]='<a href=" http://www.wns.com/Services/Insurance/tabid/133/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;- Insurance </a>'

menuServices[5]='<a href=" http://www.wns.com/Services/Logistics/tabid/73/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;- Logistics</a>'

menuServices[6]='<a href=" http://www.wns.com/Services/Manufacturing/tabid/134/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;- Manufacturing </a>'



menuServices[8]='<a href=" http://www.wns.com/Services/RetailandConsumerProducts/tabid/74/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;- Retail and Consumer Products </a>'

menuServices[9]='<a href=" http://www.wns.com/Services/TravelandLeisure/tabid/75/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;- Travel and Leisure</a>'

menuServices[10]='<a href=" http://www.wns.com/Services/UtilitiesandEnergy/tabid/76/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;- Utilities and Energy </a>'

menuServices[11]='<div style="color: #FFFFFF; background-color: #756755; width:250px; border-bottom-width:0px;">&nbsp;&nbsp;&nbsp;&nbsp;<font face="Arial" style="font-size: 11px" color="#ffffff">Cross Industry Solutions</font></div>'

menuServices[12]='<a href=" http://www.wns.com/Services/CustomerCare/tabid/136/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;- Customer Care </a>'

menuServices[13]='<a href=" http://www.wns.com/Services/FinanceandAccounting/tabid/78/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;- Finance and Accounting </a>'

menuServices[14]='<a href=" http://www.wns.com/Services/LegalServices/tabid/96/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;- Legal Services </a>'

menuServices[15]='<a href=" http://www.wns.com/Services/Procurement/tabid/80/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;- Procurement </a>'

menuServices[16]='<a href=" http://www.wns.com/Services/ResearchandAnalytics/tabid/77/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;- Research and Analytics  </a>'

menuServices[17]='<a href=" http://www.wns.com/Services/TechnologySolutions/tabid/89/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;- Transformation Solutions </a>'






var menuInsights=new Array()
menuInsights[0]='<a href="http://www.wns.com/Insights/Articles/tabid/81/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Articles</a>'
menuInsights[1]='<a href="http://www.wns.com/Insights/Whitepapers/tabid/82/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whitepapers </a>'
menuInsights[2]='<a href="http://www.wns.com/Insights/Webinars/tabid/83/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Webinars</a>'
menuInsights[3]='<a href="http://www.wns.com/Insights/Blogs/tabid/84/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Blogs</a>'
menuInsights[4]='<a href="http://www.wns.com/Insights/Podcasts/tabid/162/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Podcasts</a>'
menuInsights[5]='<a href=" http://www.wns.com/Insights/videos/tabid/44214/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Videos</a>' 	

var menuWNSAdvantage=new Array()
menuWNSAdvantage[0]='<a href="http://www.wns.com/WNSAdvantage/PartnershipApproach/tabid/97/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Partnership Approach</a>'
menuWNSAdvantage[1]='<a href="http://www.wns.com/WNSAdvantage/Deliveringbusinessvalue/tabid/98/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delivering Business Value </a>'
menuWNSAdvantage[2]='<a href="http://www.wns.com/WNSAdvantage/DeepDomainExpertise/tabid/138/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deep Domain Expertise</a>'
menuWNSAdvantage[3]='<a href="http://www.wns.com/WNSAdvantage/OperationalExcellence/tabid/139/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Operational Excellence  </a>'
menuWNSAdvantage[4]='<a href="http://www.wns.com/WNSAdvantage/GlobalDeliveryNetwork/tabid/144/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Global Delivery Network</a>'



var menuNewsEvents=new Array()
menuNewsEvents[0]='<a href="http://www.wns.com/NewsEvents/PressReleases/tabid/107/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Press Releases</a>'
menuNewsEvents[1]='<a href="http://www.wns.com/PressRoom/PressKit/tabid/44229/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Press Kit</a>'
menuNewsEvents[2]='<a href="http://www.wns.com/PressRoom/PressEnquiry/tabid/44230/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Press Enquiry</a>'
menuNewsEvents[3]='<a href="http://www.wns.com/NewsEvents/PressContacts/tabid/106/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Press Contacts</a>'

menuNewsEvents[5]='<a href="http://www.wns.com/PressRoom/WNSOnSocialMedia/tabid/44245/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WNS On Social Media</a>'
menuNewsEvents[4]='<a href="http://www.wns.com/NewsEvents/Events/tabid/104/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Events</a>'

var menuContactUs=new Array()
menuContactUs[0]='<a href="http://www.wns.com/ContactUs/Locations/tabid/99/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Locations</a>'
menuContactUs[1]='<a href="http://www.wns.com/ContactUs/RequestforServices/tabid/101/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Request for Services </a>'
menuContactUs[2]='<a href="http://www.wns.com/ContactUs/FeedbackandInquiries/tabid/127/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Feedback and Inquiries </a>'

var menuAnalystRelations =new Array()
menuAnalystRelations[0]='<a href="http://www.wns.com/AboutUs/CorporateOverview/tabid/65/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Corporate Overview </a>'
menuAnalystRelations[1]='<a href="http://www.wns.com//LinkClick.aspx?fileticket=oVrMkZQjLJI%3d&tabid=121">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WNS Fact sheet</a>'
menuAnalystRelations[2]='<a href="http://www.wns.com/Services/tabid/55/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Services Overview </a>'
menuAnalystRelations[3]='<a href="http://www.wns.com/WNSAdvantage/GlobalDeliveryNetwork/tabid/144/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Global Delivery Network</a>'
menuAnalystRelations[4]='<a href="http://www.wns.com/AboutUs/IndustryRecognition/tabid/67/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Industry Recognition</a>'
menuAnalystRelations[5]='<a href="http://www.wns.com/AboutUs/ManagementTeam/tabid/70/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Management Team </a>'
menuAnalystRelations[6]='<a href="http://www.wns.com/AboutUs/BoardofDirectors/tabid/64/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Board of Directors </a>'
menuAnalystRelations[7]='<a href="/NewsEvents/tabid/59/Default.aspx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;News and Events  </a>'
	
var menuInvestorRelations =new Array()
menuInvestorRelations[0]='<a href="http://ir.wns.com/phoenix.zhtml?c=200768&p=irol-irhome">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Investor Overview </a>'
menuInvestorRelations[1]='<a href="http://ir.wns.com/phoenix.zhtml?c=200768&p=irol-stockQuote">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stock Information </a>'
menuInvestorRelations[2]='<a href="http://ir.wns.com/phoenix.zhtml?c=200768&p=irol-news&nyo=0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Press Releases </a>'
menuInvestorRelations[3]='<a href="http://ir.wns.com/phoenix.zhtml?c=200768&p=irol-calendar">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calendar of Events </a>'
menuInvestorRelations[4]='<a href="http://ir.wns.com/phoenix.zhtml?c=200768&p=irol-presentations">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Webcasts and Presentations </a>'
menuInvestorRelations[5]='<a href="http://ir.wns.com/phoenix.zhtml?c=200768&p=irol-reportsAnnual">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Annual Meeting materials </a>'
menuInvestorRelations[6]='<a href="http://ir.wns.com/phoenix.zhtml?c=200768&p=irol-sec">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SEC Filings </a>'
menuInvestorRelations[7]='<a href="http://ir.wns.com/phoenix.zhtml?c=200768&p=irol-govHighlights">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Corporate Governance </a>'
menuInvestorRelations[8]='<a href="http://ir.wns.com/phoenix.zhtml?c=200768&p=irol-alerts">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Email Alerts  </a>'
menuInvestorRelations[9]='<a href="http://ir.wns.com/phoenix.zhtml?c=200768&p=irol-contact">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contact Us </a>'		
		
var menuwidth='165px' //default menu width
var menubgcolor='#ffffff'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")-0+"px"
dropmenuobj.style.top=dropmenuobj.y+obj.offsetHeight+0+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu
