var srcEle;
var mOutColor;
var mOverColor;

function start_Timeout(){
	if (timer) window.clearTimeout(timer);
	timer = window.setTimeout("resetAll()",50);
}

function clear_Timeout(){
	if (timer) window.clearTimeout(timer);
}

function resetAll(){
	//document.getElementById('servNavService').className = 'hideLayer';
	//document.getElementById('servNavPlusService').className = 'servNavPlus';
	//document.getElementById('servNavServiceWrap').className = 'servNavLinksWrap';
}

function showLayer(idLayer,idTrigger,wrapper){
	document.getElementById(idLayer).className = 'showLayer';
	document.getElementById(idTrigger).className = 'servNavPlusHover';
	document.getElementById('servNav'+wrapper+'Wrap').className = 'servNav'+wrapper+'WrapHover';
}
function hideLayer(idLayer,idTrigger){
	if (timer) window.clearTimeout(timer);
	layerObj = idLayer;
	triggerObj = idTrigger;
	timer = window.setTimeout("resetAll()", 50);
}

function doLoad() {
	//loaded = true;
	resetAll();// dropdowns made visible via javascript - without js they are visible all the time
	//document.getElementById("servNavService").onmouseout = start_Timeout;
	//document.getElementById("servNavService").onmousemove = clear_Timeout;
	//document.getElementById("servNavPlusService").onmouseover = changeService;
	//document.getElementById("servNavPlusService").onfocus = changeService;
	//document.getElementById("servNavPlusService").onmouseout = start_Timeout;
	//document.getElementById("servNavPlusService").onmousemove = clear_Timeout;
}

function changeLinks(){
	showLayer('servNavlinks','servNavPlusLinks','Links')
}
function changeService(){
	showLayer('servNavService','servNavPlusService','Service')
}

var timer = 1;


window.onload = doLoad;

function jump() 
	{
		var selectedIndex = document.laender.land.selectedIndex;
		if (selectedIndex > 0)
		{	var selection = document.laender.land.options[selectedIndex].value;
			window.open(selection);
		}
	}
	
//---------------drop down menu script----------------------------------//
var menu1=new Array()
menu1[0]='<a href="Company.html" class="textContentWhiteNormal">Overview</a>'
menu1[1]='<a href="History.html" class="textContentWhiteNormal">History</a>'
menu1[2]='<a href="Management.html" class="textContentWhiteNormal">Management</a>'
menu1[3]='<a href="WhyUs.html" class="textContentWhiteNormal">WhyUs</a>'

var menu2=new Array()
menu2[0]='<a href="TechnologyConsulting.html" class="textContentWhiteNormal">Technology Consulting</a>'
menu2[1]='<a href="SoftwareDevelopment.html" class="textContentWhiteNormal">Software Development</a>'
menu2[2]='<a href="ApplicationMaintainance.html" class="textContentWhiteNormal">Application Maintenance</a>'
menu2[3]='<a href="TestingQAServiesc.html" class="textContentWhiteNormal">Testing / QA Services</a>'
menu2[4]='<a href="SoftwareReEngineering.html" class="textContentWhiteNormal">Software Re-engineering</a>'
menu2[5]='<a href="ValuePosition.html" class="textContentWhiteNormal">Value Proposition</a>'
menu2[6]='<a href="Infrastructure.html" class="textContentWhiteNormal">Infrastructure</a>'

var menu3=new Array()
menu3[0]='<a href="SkillAreas.html" class="textContentWhiteNormal">Skill Areas</a>'
menu3[1]='<a href="RecruitingTopTalent.html" class="textContentWhiteNormal">Recruiting Top Talent</a>'
menu3[2]='<a href="ValuePosition.html" class="textContentWhiteNormal">Value Position</a>'
menu3[3]='<a href="Clients.html" class="textContentWhiteNormal">Clients</a>'

var menu4=new Array()
menu4[0]='<a href="ContentManagement.html" class="textContentWhiteNormal">Content Management</a>'
menu4[1]='<a href="FormsProcessing.html" class="textContentWhiteNormal">Forms Processing</a>'
menu4[2]='<a href="TransactionProcessing.html" class="textContentWhiteNormal">Transaction Processing</a>'

var menu5=new Array()

var menu6=new Array()


var mw='165px' 
var mc=''  
var delay=200  
var OnCLickHide="yes" 

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="myMenu" style="visibility:hidden;width:'+mw+';background-color:'+mc+'" onMouseover="putOffHideMenu()" onMouseout="hideMenuDynamically(event)"></div>')

function collectOffSet(ele, ot){
	var tos=(ot=="left")? ele.offsetLeft : ele.offsetTop;
	var pl=ele.offsetParent;
	while (pl!=null){
		tos=(ot=="left")? tos+pl.offsetLeft : tos+pl.offsetTop;
		pl=pl.offsetParent;
	}
return tos;
}


function alterAppearance(ele, evnt, visible, hidden, mw){
	if (ie4||ns6)
		dmo.style.left=dmo.style.top="-500px"
	if (mw!=""){
		dmo.widthobj=dmo.style
		dmo.widthobj.width=mw
	}
	if (evnt.type=="click" && ele.visibility==hidden || evnt.type=="mouseover")
		ele.visibility=visible
	else if (evnt.type=="click")
		ele.visibility=hidden
}

function iecompattest(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function knockoffbrowseredge(ele, browseredge){
	var edgeoffset=0
	if (browseredge=="rightedge"){
		var wedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
		dmo.contentmeasure=dmo.offsetWidth
		if (wedge-dmo.x < dmo.contentmeasure)
			edgeoffset=dmo.contentmeasure-ele.offsetWidth
	}
	else{
		var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
		var wedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
		dmo.contentmeasure=dmo.offsetHeight
		if (wedge-dmo.y < dmo.contentmeasure){ 
			edgeoffset=dmo.contentmeasure+ele.offsetHeight
			if ((dmo.y-topedge)<dmo.contentmeasure) 
				edgeoffset=dmo.y+ele.offsetHeight-topedge
		}
	}
	return edgeoffset
}

function popUpDropDownMenu(ele){
	if (ie4||ns6)
		dmo.innerHTML=ele.join("")
}


function AppearMenu(ele, evnt, mconts,mw, t,l){
	disappearMenu();
	srcEle = ele;
	mOverColor = t;
	mOutColor = l;
	srcEle.bgColor = mOverColor;
	if (window.event) 
		event.cancelBubble=true
	else if (evnt.stopPropagation) 
		evnt.stopPropagation()
	putOffHideMenu()
	dmo=document.getElementById? document.getElementById("myMenu") : myMenu
	popUpDropDownMenu(mconts)
	if (ie4||ns6){
		alterAppearance(dmo.style, evnt, "visible", "hidden", mw)
		dmo.x=collectOffSet(ele, "left")
		dmo.y=collectOffSet(ele, "top")
		dmo.style.top=dmo.y-knockoffbrowseredge(ele, "bottomedge")+ele.offsetHeight+"px";
		dmo.style.left=dmo.x-knockoffbrowseredge(ele, "rightedge")-1+"px";
	}
	return OnClickReturn()
}

function OnClickReturn(){
	if (ie4||ns6) return false
	else return true
}

function Does_ns_6Contains(ct, rt) {
	while (rt.parentNode)
		if ((rt = rt.parentNode) == ct)
			return true;
	return false;
}

function hideMenuDynamically(evnt){
	if (ie4&&!dmo.contains(evnt.toElement))
		hideMenuAfterInterval()
	else if (ns6&&evnt.currentTarget!= evnt.relatedTarget&& !Does_ns_6Contains(evnt.currentTarget, evnt.relatedTarget))
		hideMenuAfterInterval()
}

function disappearMenu(evnt){
	if (typeof dmo!="undefined"){
		if (ie4||ns6){
			dmo.style.visibility="hidden"
			srcEle.bgColor = mOutColor;
		}
	}
}

function hideMenuAfterInterval(){
	if (ie4||ns6)
		hideInterval=setTimeout("disappearMenu()",delay)
}

function putOffHideMenu(){
	if (typeof hideInterval!="undefined")
		clearTimeout(hideInterval)
}

if (OnCLickHide=="yes")
document.onclick=disappearMenu

