
var SkyMMenu = new Array();
SkyMMenu[SkyMMenu.length] = new objMenuSky("Airline Passenger Solutions ", new Array('Sales,Marketing,and Distribution ', 'Reservations', 'Loyalty Programs'));
SkyMMenu[SkyMMenu.length] = new objMenuSky("Airline Revenue Solutions", new Array('Finance', 'Revenue Accounting', 'Revenue Management'));
SkyMMenu[SkyMMenu.length] = new objMenuSky("Airline & Airport Operational Solutions", new Array('Flight Operations and Dispatch', 'Maintenance and Repair', 'Airport Operations', 'Freight and Mail'));
SkyMMenu[SkyMMenu.length] = new objMenuSky("Airline Consulting Services", new Array('Systems Integration', 'Operations Research & Statistics', 'Infrastructure and Architectural','Testing, QA, PMO'));
var currentExpandedDivIndex = 0;
var objMenuURLMain = new Array("airlinePsngrSolutions.html","airlineRevSolutions.html","airlineAndAirportOperationalSolutions.html","airlineConsultingServices.html");


function objMenuSky(MainMenu, SubMenu)
{
	this.MainMenu = MainMenu;
	this.SubMenu = SubMenu;
}

var SubMnuURL = new Array();
SubMnuURL[SubMnuURL.length] = new objMnuURL(1, new Array('smd.html', 'reservations.html', 'loyaltyPrograms.html'));
SubMnuURL[SubMnuURL.length] = new objMnuURL(2, new Array('finance.html', 'revenueAccounting.html', 'revenueManagement.html'));
SubMnuURL[SubMnuURL.length] = new objMnuURL(3, new Array('flightOperationsDispatch.html','mRO.html', 'airportOperations.html', 'freightandMail.html'));
SubMnuURL[SubMnuURL.length] = new objMnuURL(4, new Array('systemsIntegration.html','operationsResearch.html', 'infrastructureArchitecturalSupport.html','testingQAPMOffice.html'));

function objMnuURL(Index, SubMnuUrl)
{
	this.Index = Index;
	this.SubMnuUrl = SubMnuUrl;
}

function openURL(MnuIndx, SubMnuIndx)
{
	//Write your own function here;
		//alert("came here"+indx);
	window.location.href  =  SubMnuURL[MnuIndx].SubMnuUrl[SubMnuIndx];
}

function SkyMenuExpandDiv(indx, noncolapseIndx)
{
	if(indx == null) currentExpandedDivIndex = 0;
	else currentExpandedDivIndex = indx;
	var divId;
	var imgId;
	for (var i = 0; i < SkyMMenu.length; i++)
	{
		divId = "ParentDiv" + i;
		imgId = "IMG"+i;
		if(currentExpandedDivIndex == i)
		{

			document.getElementById(divId).className = "ExpandedDiv";
			document.images[imgId].src = "image/selectedArrow.gif";
			document.getElementById("DataDiv"+i).style.display = "block";
		}
		else if (noncolapseIndx != i)
		{
			document.getElementById(divId).className = "SkyCollapsedDiv";
			document.images[imgId].src = "image/unselectedArrow.gif";
			document.getElementById("DataDiv"+i).style.display = "none";
		}
	}
	SkyMenuAdjustDivs();
}

function SkyMenuAdjustDivs()
{
	var divID;
	var heightVal = 540;
	for (var i = (SkyMMenu.length - 1); i > -1; i--)
	{
		divID = "ParentDiv" + i;
		if( i == currentExpandedDivIndex)
		{
			heightVal -= 440;
		}
		document.getElementById(divID).style.top = heightVal;
		heightVal -= 25;
	}
}

function collapseDiv(indx)
{
	//element.style.position = "relative";
	//element.style.display = "none";
	//alert("came here"+indx);
	var currInd = "DataDiv"+indx;
	var imgId   = "IMG"+indx;
	document.getElementById(currInd).style.display	 = "none";
	document.images[imgId].src	 = "image/unselectedArrow.gif";
}

///////////////////////////
function expandedMenu(indx) 
{
	document.write('<DIV id="ParentDiv' + indx + '" Class="ExpandedDiv">');			
				
	document.write('<Div id="Div' + indx + '" class="DivHeading" ><table width=100%  border ="0" bordercolor="#07549A" cellspacing="1" cellpadding="1" ><tr><td width="10"><IMG id="IMG' + indx + '" src="image/unselectedArrow.gif"></td><td bgcolor="#07549A"><font face="Arial,Helvetica,verdana" color="#ffffff"><a href="'+objMenuURLMain[indx]+'">'+ SkyMMenu[indx].MainMenu +'</a></td></tr></table></Div>');
	
	document.write('<Div class="SkyDivDataStyle" id="DataDiv'+ indx +'" style="border:#07549A 0pt solid;">');
	for (var j = 0; j < SkyMMenu[indx].SubMenu.length; j++)
	{
		document.write('<div id=subMenu_'+ j +'_'+ indx +' class="SubMenu">&nbsp;<img src="image/smlArrwblak.gif"><span style="CURSOR:hand;" title="'+ SubMnuURL[indx].SubMnuUrl[j] +'">&nbsp;<A class="plain" href="#" onClick="openURL('+ indx +','+ j +')">'+ SkyMMenu[indx].SubMenu[j] +'</A></span></div>');
	}
	document.write('</Div>');
	
	document.getElementById("ParentDiv"+indx).className = "ExpandedDiv";
	document.images["IMG"+indx].src = "image/selectedArrow.gif";
	document.getElementById("DataDiv"+indx).style.display = "block";

	document.write('</DIV>');
}

function collapsedMenu(indx, noncolapseIndx) 
{
	document.write('<DIV id="ParentDiv' + indx + '" Class="SkyCollapsedDiv" onMouseOver="SkyMenuExpandDiv(' + indx + ','+ noncolapseIndx +')"  onmouseout="collapseDiv('+indx+')">');

	document.write('<Div id="Div' + indx + '" class="DivHeading" ><table width=100%  border ="0" bordercolor="#07549A" cellspacing="1" cellpadding="1" ><tr><td width="10"><IMG id="IMG' + indx + '" src="image/unselectedArrow.gif"></td><td bgcolor="#07549A"><font face="Arial,Helvetica,verdana" color="#ffffff"><a href="'+objMenuURLMain[indx]+'">'+ SkyMMenu[indx].MainMenu +'</a></td></tr></table></Div>');

	document.write('<Div class="SkyDivDataStyle" id="DataDiv'+ indx +'" style="border:#07549A 0pt solid;">');
	for (var j = 0; j < SkyMMenu[indx].SubMenu.length; j++)
	{
		document.write('<div id=subMenu_'+ j +'_'+ indx +' class="SubMenu">&nbsp;<img src="image/smlArrwblak.gif"><span style="CURSOR:hand;" title="'+ SubMnuURL[indx].SubMnuUrl[j] +'">&nbsp;<A class="plain" href="#" onClick="openURL('+ indx +','+ j +')">'+ SkyMMenu[indx].SubMenu[j] +'</A></span></div>');
	}
	document.write('</Div>');

	document.write('</DIV>');
}
/////////////////////////////

//for search engine script

var item = new Array();

c=0; item[c]=new Array("home.html","","Home","skytech,passenger,solutions,revenue,airline,airport,operational,consulting,sales,marketing,distribution,reservations,loyalty,programs,flight,operations,dispatch,mro,freight,mail,systems,integration,infrastructure,architectural,support,data,analysis,decision,support,testing,quality,assurance,program,management,office,conference,summit,partner,client,chennai,efficiency,costs,global,consultancy,instrumental,performance,leakage,unisys,odc");
c++; item[c]=new Array("ourCompny.html","","Our Company","skytech,the,chatterjee,group,tcg,global,delivery,model,kolkata,mumbai,chennai,chicago,offshore,development,center,odc,iso,9001:2000,sei,cmm,level,5,vpn,on-site,knowledge,management,technology,management,infrastructure,delivery,cost,united,airlines,unisys,us,airways,america,west,ameniti,star,alliance,calidris,sita,navitaire,lh,systems,air,india,integres,computer,guidance,corporation");
c++; item[c]=new Array("news.html","","News","skytech,offshore,development,center,tpf,center,excellence,apollo,domain,specialized,passenger,services,research,operations2008,beijing,olympic,games,airport,technologies,emergency,controlling,system,ground,handling,contract,computer,guidance,corporation,cgc");
c++; item[c]=new Array("airlinePsngrSolutions.html","","Airline Passenger Solutions","skytech,e-ticketing,check-in,reservations,departure,control,loyalty,programs,RFID,frequent,flier,ffp,tpf,mainframe,booking,engine,gds,web");
c++; item[c]=new Array("airlineRevSolutions.html","","Airline Revenue Solutions","skytech,revenue,accounting,revenue,management,finance,report,migration,oracle,financials,interline,re-engineering,isv,legacy,inventory");
c++; item[c]=new Array("airlineAndAirportOperationalSolutions.html","","Airline and Airport Operational Solutions","skytech,flight,operations,ramp,dispatch,mro,spare,partsengine,material,inventory,legacy,airport,operations,freight,cargo,mail,scheduling,flight,navigation,manpower,resource,planning,scm,stores,crew,unimatic,demand,forecasting,gate,assignment,staff,rostering,staff,allocation,postal,track,on,time,performance");
c++; item[c]=new Array("airlineConsultingServices.html","","Airline Consulting Solutions","skytech,consultancy,systems,integration,architectural,support,testing,quality,assurance,middleware,messaging,legacy,message,oriented,middleware,operations,research,statistics,data,analysis,decision,support,fleeting,routing,crew,planning,crew,scheduling,crew,pairing,generator,forecasting,modeling,production,support,database,support,database,competency,center,software,validation,quality,reliability,test,automation,performance,engineering,software,qa,consulting,functional,testing,database,testing,security,testing,compatibility,testing,installation,testing,usability,testing,reliability,testing,platform,testing,program,management,office");
c++; item[c]=new Array("careers.html","","Careers","skytech,career,careers,workplace,environment,cv,resume,performance,team,diversity,people,opportunity,culture,employee,training,benefit,compensation,professional,reward");


function searchString()
{
	page="<html><head><title>Search Results</title></head><body bgcolor='white'><left><table border=0 cellspacing=10 width=80%>";

	document.all.srch.innerHTML="";
	//win = window.open("","","scrollbars");
	var locate = window.location
	document.sky.burns.value = locate
	var text = document.sky.burns.value;
	theleft = text.indexOf("=") + 1;
	theright = text.indexOf("&");
	if(theright == -1)
		theright=text.length;
	text = text.substring(theleft, theright);
	//alert(text.indexOf("+"));
	text = text.replace(/\+/g," ");
	disptext = text.replace(/\%2B/,"+");
	text = disptext.replace(/\+/g," ");

	//alert(text);

	txt = text.split(" ");

	fnd = new Array();
	total=0;
	for (i = 0; i < item.length; i++)
	{
		fnd[i] = 0;
		//order = new Array(0, 4, 2, 3);
		order = new Array(0, 2, 3);
		for (j = 0; j < order.length; j++)
		for (k = 0; k < txt.length; k++)
		if (item[i][order[j]].toLowerCase().indexOf(txt[k].toLowerCase()) > -1 && txt[k] != "")
		fnd[i] += (j+1);
	}
	page += "<tr><td><font color='blue'><b>Search result(s) for <font color='red'>"+ disptext +"</font></b></font> </td></tr>"
	for (i = 0; i < fnd.length; i++)
	{
		n = 0; w = -1;
		for (j = 0;j < fnd.length; j++)
		if (fnd[j] > n)
		{
			n = fnd[j]; w = j;
		};
		if (w > -1)
		{
			//total += show(w, n);
			total += 1;
			linePrint1 = linePrint(w, n);
			//alert(linePrint1);
			page += linePrint1;

		}
		fnd[w] = 0;
	}

	page += "</table><br>Total found: "+total+"<br></body></html>"
	//document.write("</table><br>Total found: "+total+"<br></body></html>");
 	//alert(page);
	document.getElementById("srch").innerHTML = page;

}

function show(which,num)
{
	link = item[which][1] + item[which][0];
	line = "<tr><td><a href='"+link+"'>"+item[which][2]+"</a><br>";
	line += item[which][4] + "<br>"+link+"</td></tr>";
	return 1;
}
function linePrint(which,num)
{
	link = item[which][1] + item[which][0];
	//line = "<tr><td><a href='"+link+"'>"+item[which][2]+"</a><br>";
	line = "<tr><td><a href='"+link+"'>"+"SkyTECH Solutions - "+item[which][2]+"</a></td></tr>";
	//line += item[which][4] + "<br>"+link+"</td></tr>";
	return line;
}

//end script for search engine