var pic1= new Image(100,25); 
var pic2= new Image(100,25); 

var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i;
var blockedEmailIds = new Array("accenture", "yahoo", "gmail", "hotmail","rediffmail", "infosys","wipro","patni","tcs","cognizant","satyam");

function $() {
	var elements = new Array();
	for (var i = 0; i < arguments.length; i++) {
		var element = arguments[i];
		if (typeof element == 'string')
			element = document.getElementById(element);
		if (arguments.length == 1)
			return element;
		elements.push(element);
	}
	return elements;
}

var objTabContent, objTab, objCurTab;
var curtab=0;
var closetab=0, tmpclosetab=0, transtimer=0;

//var rootpath="http://fs4/hcltech/"
var rootpath="http://www.hcltech.com/"

function changeTab(tabid) {	
	closetab=0;
	stop_timer();

	if (curtab==tabid) return;
	objTabContent=document.getElementById("tabcontent");
	if (curtab==0) {
		objTabContent.style.display="";
		objTabContent.style.visibility="visible";
	}
	objTab=document.getElementById("mnuTab"+tabid);
	objCurTab=document.getElementById("mnuTab"+curtab);
	objTabContent.innerHTML="";
	objTabContent.style.height="289px";
	switch(tabid) {
		case 1:
			objTabContent.innerHTML+="<div class='tnav_box'><div class='heading i_services'><span class='hd'>Business Lines</span><br />Value is created by integrating services for optimization at interface points and greater end-business impact.</div><div class='mnulist_2c'><ul><li class='l1'><a href='"+rootpath+"engineering-services/'>Engineering and R&amp;D Services</a></li><li class='l2'><a href='"+rootpath+"engineering-services/hardware-engineering/'>Hardware Engineering</a>, <a href='"+rootpath+"engineering-services/embedded-engineering/'>Embedded Engineering</a>, <a href='"+rootpath+"engineering-services/mechanical-engineering/'>Mechanical Engineering</a>, <a href='"+rootpath+"engineering-services/software-product-engineering/'>Software Product Engineering</a> </li><li class='l1'><a href='"+rootpath+"enterprise-transformation-services/'>Enterprise Transformation Services</a></li><li class='l2'><a href='"+rootpath+"enterprise-transformation-services/business-transformation-services/'>Business Transformation</a>, <a href='"+rootpath+"enterprise-transformation-services/technology-transformation-services/'>Technology Transformation,</a> ...</li><li class='l1'><a href='"+rootpath+"bpo/'>Business Process Outsourcing</a></li></ul></div><div class='mnulist_2c'><ul><li class='l1'><a href='"+rootpath+"custom-application/'>Custom Application Services</a></li><li class='l2'><a href='"+rootpath+"custom-application/application-development/'>Application Development</a>, <a href='"+rootpath+"custom-application/application+re-engineering/'>Application Re-engineering &amp; Integration</a>, <a href='"+rootpath+"custom-application/application-maintenance/'>Application Support &amp; Maintenance,</a> ...</li><li class='l1'><a href='"+rootpath+"enterprise-application-services/'>Enterprise Application Services</a></li><li class='l2'><a href='"+rootpath+"enterprise-application-services/SAP/'>SAP</a>, <a href='"+rootpath+"enterprise-application-services/oracle/'>Oracle</a>, <a href='"+rootpath+"enterprise-application-services/microsoft-dynamics/'>Microsoft Dynamics,</a> ...</li><li class='l1'><a href='"+rootpath+"IT-infrastructure-management/'>IT Infrastructure Management</a></li></ul></div>";
			break;
		case 2:
			objTabContent.innerHTML+="<div class='tnav_box'><div class='heading i_is'><span class='hd'>Industry Sectors</span><br />Value is created by HCL's ability to combine technology with business knowledge.</div><div class='mnulist_3c'><ul><li class='l1'><a href='"+rootpath+"aerospace-and-defense/'>Aerospace and Defense</a></li><li class='l1'><a href='"+rootpath+"automotive/'>Automotive</a></li><li class='l1'><a href='"+rootpath+"consumer-electronics/'>Consumer Electronics</a></li><li class='l1'><a href='"+rootpath+"energy-and-utilities/'>Energy and Utilities</a></li><li class='l1'><a href='"+rootpath+"financial-services/'>Financial Services</a></li><li class='l1'><a href='"+rootpath+"government/'>Government</a></li></ul></div><div class='mnulist_3c'><ul><li class='l1'><a href='"+rootpath+"healthcare/'>Healthcare</a></li><li class='l1'><a href='"+rootpath+"isv/'>Independent Software Vendors </a></li><li class='l1'><a href='"+rootpath+"industrial-manufacturing/'>Industrial Manufacturing </a></li><li class='l1'><a href='"+rootpath+"life-science/'>Life Sciences</a></li><li class='l1'><a href='"+rootpath+"media-entertainment/'>Media & Entertainment </a></li><li class='l1'><a href='"+rootpath+"retail+consumer/'>Retail & Consumer</a></li></ul></div><div class='mnulist_3c'><ul><li class='l1'><a href='"+rootpath+"semiconductors/'>Semiconductors </a></li><li class='l1'><a href='"+rootpath+"server-and-storage/'>Server and Storage </a></li><li class='l1'><a href='"+rootpath+"telecom/'>Telecom  </a></li><li class='l1'><a href='"+rootpath+"transportation-and-logistics/'>Transportation & Logistics </a></li><li class='l1'><a href='"+rootpath+"travel-and-hospitality/'>Travel & Hospitality</a></li></ul></div>";
			break;
			
		case 3:
			objTabContent.innerHTML+="<div class='tnav_box bg_geo'><div class='heading i_geo'><span class='hd'>Geo Spread</span><br />HCL has global network of offices in 26 countries.</div><div class='mnulist_3c'><ul><li class='l1'><a href='"+rootpath+"geo-spread/anz/'>Australia &amp; New Zealand</a></li><li class='l1'><a href='"+rootpath+"geo-spread/Canada/'>Canada</a></li><li class='l1'><a href='"+rootpath+"geo-spread/china/'>China</a></li><li class='l1'><a href='"+rootpath+"geo-spread/europe/'>Europe</a></li><li class='l1'><a href='"+rootpath+"geo-spread/hong-kong/'>Hong Kong</a></li><li class='l1'><a href='"+rootpath+"geo-spread/india/'>India</a></li></ul></div><div class='mnulist_3c'><ul><li class='l1'><a href='"+rootpath+"geo-spread/japan/'>Japan</a></li><li class='l1'><a href='"+rootpath+"geo-spread/latin-america/'>Latin America</a></li><li class='l1'><a href='"+rootpath+"geo-spread/malaysia/'>Malaysia</a></li><li class='l1'><a href='"+rootpath+"geo-spread/middle-east/'>Middle East</a></li><li class='l1'><a href='"+rootpath+"geo-spread/singapore/'>Singapore</a></li><li class='l1'><a href='"+rootpath+"geo-spread/us/'>US</a></li></ul></div><div class='clear'></div>";			
			break;
		case 4:
			objTabContent.innerHTML+="<div class='tnav_box'><div class='heading i_everything'><span class='hd'>Everything HCL</span><br />Know more about HCL's team, history and work.</div><div class='mnulist_3c'><ul><li class='l1'><a href='"+rootpath+"about-us/'>About Us</a></li><li class='l1'><a href='http://www.hcltech.com/investors/corporate-governance/'>Corporate Governance</a></li><li class='l1'><a href='"+rootpath+"investors/'>Investors</a>&nbsp; <a href='"+rootpath+"investors/podcasts/index.asp'><img src='"+rootpath+"images/podcasts_btn.png' alt='Podcasts' style='border: 0px;' /></a>&nbsp; <a href='http://feeds.feedburner.com/HCL-Tech-InvestorsReleases'><img src='"+rootpath+"images/rss_bttn_small.gif' alt='RSS Feed' style='border: 0px;' /></a></li><li class='l1'><a href='"+rootpath+"services+/'>Services +</a></li><li class='l1'><a href='"+rootpath+"careers/'>Careers</a></li></ul></div><div class='mnulist_3c'><ul><li class='l1'><a href='"+rootpath+"hcl-research/'>HCL Research</a></li><li class='l1'><a href='http://www.hcltech.com/insighthcl/' target='_blank'>Analysts &amp; Advisors</a></li><li class='l1'><a href='"+rootpath+"media/'>News & Media</a>&nbsp; <a href='http://feeds.feedburner.com/HCL-Tech-PressReleases'><img src='"+rootpath+"images/rss_bttn_small.gif' alt='RSS Feed' style='border: 0px;' /></a></li><li class='l1'><a href='"+rootpath+"events/upcoming/'>Events</a></li><li class='l1'><a href='"+rootpath+"webinars/upcoming/'>Webinars</a></li></ul></div><div class='mnulist_3c'><ul><li class='l1'><a href='http://www.hcltech.com/power20/'>Power20 - Podcast Series</a></li><li class='l1'><a href='"+rootpath+"vineet/' target='_blank'>CEO Blog</a>&nbsp; <a href='http://feeds.feedburner.com/vineet' target='_blank'><img src='"+rootpath+"images/rss_bttn_small.gif' alt='RSS Feed' style='border: 0px;' /></a></li><li class='l1'><a href='http://www.unstructure.org/' target='_blank'>Unstructure</a></li><li class='l1'><a href='"+rootpath+"partners/'>Partners</a></li><li class='l2'><a href='"+rootpath+"emc-alliances/' target='_blank'>EMC</a>, <a href='"+rootpath+"microsoft/'>Microsoft</a>, <a href='"+rootpath+"SAP/partnership-status/'>SAP</a>, <a href='"+rootpath+"TIBCO/'>TIBCO</a>, <a href='"+rootpath+"oracle/'>Oracle</a>, <a href='"+rootpath+"partners/#hp'>HP</a>, <a href='"+rootpath+"partners/#ibm'>IBM</a></li></ul></div><div class='clear'></div>";
			break;
		default:
			objTabContent.innerHTML="<div class='tnav_box'><div class='heading i_search'><form name='frmsearch' id='searchbox_008057984962491765647:e_fui6yr338' method='get' action='"+rootpath+"search-anything/index.asp'><input type='hidden' name='cx' value='008057984962491765647:e_fui6yr338' /><input type='hidden' name='cof' value='FORID:11' /><input name='q' type='text' size='20' value='Click here to Search Anything' onfocus=\"this.value=''\" class='tnavsbox' />&nbsp;<input type='submit' class='tnavsbtn' id='sa' name='sa' value='Go' /><input type='hidden' name='client' value='google-csbe' /></form></div><div class='mnulist_1c'><ul><li class='l1'>Top Searches</li><li class='l2'><a href='"+rootpath+"search-anything/index.asp?keywordid=8&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Application development outsourcing&amp;sa=Search&amp;client=google-csbe' class='s4'>Application development outsourcing</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=12&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Application re-engineering&amp;sa=Search&amp;client=google-csbe' class='s2'>Application re-engineering</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=34&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Oracle ERP&amp;sa=Search&amp;client=google-csbe' class='s2'>Oracle ERP</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=38&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Peoplesoft payroll consultant&amp;sa=Search&amp;client=google-csbe' class='s2'>Peoplesoft payroll consultant</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=20&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Enterprise Application Services&amp;sa=Search&amp;client=google-csbe' class='s2'>Enterprise Application Services</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=14&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Onsite technical support&amp;sa=Search&amp;client=google-csbe' class='s2'>Onsite technical support</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=9&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Risk migration&amp;sa=Search&amp;client=google-csbe' class='s2'>Risk migration</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=161&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Voice and data communication&amp;sa=Search&amp;client=google-csbe' class='s2'>Voice and data communication</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=41&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Siebel crm&amp;sa=Search&amp;client=google-csbe' class='s1'>Siebel crm</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=159&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Semiconductor industry&amp;sa=Search&amp;client=google-csbe' class='s1'>Semiconductor industry</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=37&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Peoplesoft application engine development&amp;sa=Search&amp;client=google-csbe' class='s1'>Peoplesoft application engine development</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=153&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Hardware design engineering&amp;sa=Search&amp;client=google-csbe' class='s1'>Hardware design engineering</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=157&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Automotive technology&amp;sa=Search&amp;client=google-csbe' class='s1'>Automotive technology</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=40&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Oracle ebusiness consultants&amp;sa=Search&amp;client=google-csbe' class='s1'>Oracle ebusiness consultants</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=29&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=SAP ERP integration&amp;sa=Search&amp;client=google-csbe' class='s1'>SAP ERP integration</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=17&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Enterprise application integration&amp;sa=Search&amp;client=google-csbe' class='s1'>Enterprise application integration</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=44&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=SOA&amp;sa=Search&amp;client=google-csbe' class='s1'>SOA</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=84&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Why is IT governance important&amp;sa=Search&amp;client=google-csbe' class='s1'>Why is IT governance important</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=144&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=RFID software application for the retail industry&amp;sa=Search&amp;client=google-csbe' class='s1'>RFID software application for the retail industry</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=11&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Application engineering&amp;sa=Search&amp;client=google-csbe' class='s1'>Application engineering</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=16&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=Enterprise application&amp;sa=Search&amp;client=google-csbe' class='s1'>Enterprise application</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=24&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=SAP materials management&amp;sa=Search&amp;client=google-csbe' class='s1'>SAP materials management</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=23&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=SAP implementation&amp;sa=Search&amp;client=google-csbe' class='s1'>SAP implementation</a>, <a href='"+rootpath+"search-anything/index.asp?keywordid=22&amp;cx=008057984962491765647%3Ae_fui6yr338&amp;cof=FORID%3A11&amp;q=SAP software&amp;sa=Search&amp;client=google-csbe' class='s1'>SAP software</a></li></ul></div><div class='clear'></div>";

	}
	objTab.className+=" over";
	if (curtab>0) {
		objCurTab.className=objCurTab.className.replace(" over", "");
	}
	curtab=tabid;
}

function closeme() {
	closetab=1;
	tmpclosetab=0;
	closethistab();	
}

function closethistab() {
	transtimer=setTimeout("closethistab()",10);
	if (!closetab) {
		stop_timer();
	} else {
		if (tmpclosetab<100) {
			tmpclosetab++;
		} else {
			stop_timer();
			objTabContent=document.getElementById("tabcontent");
			objCurTab=document.getElementById("mnuTab"+curtab);
			objCurTab.className=objCurTab.className.replace(" over", "");			
			objTabContent.style.display="none";
			objTabContent.style.visibility="hidden";
			curtab=0;
		}
	}
}

function stop_timer() {
	clearTimeout(transtimer); transtimer=0;
	tmpclosetab=0;
	closetab=0;
}

function talktome() {
		if ($("txtname").value.replace(/^\s*|\s*$/g,"")==""){
			alert ("Enter your Name");
			$("txtname").focus();
			return;
		} else if (emailfilter.test($("txtemailid").value)==false) {
			alert ("Enter valid E-Mail ID");
			$("txtemailid").focus();
			return;
		} else if ($("txtphone").value.replace(/^\s*|\s*$/g,"")==""){
			alert ("Enter your Contact No.");
			$("txtphone").focus();
			return;
		} else if ($("txtcomments").value.replace(/^\s*|\s*$/g,"")==""){
			alert ("Enter your comments");
			$("txtcomments").focus();
			return;
		}
		
		document.frmttm.submit();
	}
	
function show_content(){	
		navRoot = document.getElementById("more_content");
	if (navRoot.className=="hidden_content"){
		navRoot.className="show_content";
	}
	else if (navRoot.className=="show_content"){
		navRoot.className="hidden_content";
		}	
}

function collapse(hd,des){
	if ($(hd).className=="hd expand") {
		$(hd).className="hd collapse";
		$(des).className="bnlnk over";
	} else {
		$(hd).className="hd expand";
		$(des).className="bnlnk";
	}
}


//Functions for display or hide a object
function showmore(objid, objmore, objless) {
	$(objid).style.display="block";
	$(objmore).style.display="none";
	$(objless).style.display="";
}

function showless(objid, objmore, objless) {
	$(objid).style.display="none";
	$(objmore).style.display="";
	$(objless).style.display="none";
}
/* END */

//Code for Right Navigation
function resetRNTab() {
	var v = document.getElementById("txtpageinfo").value;
	splitvalues = v.split("|");
	if (document.getElementById("rnav"+splitvalues[0])) {
		changeRNTab(splitvalues[1],splitvalues[2]);
		document.getElementById("rnav"+splitvalues[0]).className+=" active";
	}
}

function changeRNTab(actTabId, hideTabId) {	
	if (actTabId==0 || hideTabId==0) return;
	var actTab=document.getElementById("rntab"+actTabId);
	var hideTab=document.getElementById("rntab"+hideTabId);
	if (actTab.className=="active") return;
	actTab.className="active";
	hideTab.className="";
	
	var actContent=document.getElementById("rncontent"+actTabId);
	var hideContent=document.getElementById("rncontent"+hideTabId);
	
	actContent.className="active";
	hideContent.className="";
}
window.onload=resetRNTab;