// JavaScript Document
<!--
// 
 NS4 = (document.layers);
 NS6 =  ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 5))
 IE4 = (document.all);
 ver4 = (NS4 || IE4);
 MAC45 = (navigator.appVersion.indexOf("MSIE 4.5") != -1)
 isMac = (navigator.appVersion.indexOf("Mac") != -1);
 menuHeight=0;
 menuOffset=0;
 menuBarHeight=0;
var overmenu = false;
var openmenu = null;
var overcheck = null;
var loaded = false;

function stripCharsNotInBag (s, bag)

{   var i;
    var returnString = "";

    // Search through string's characters one by one.
    // If character is in bag, append to returnString.

    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) != -1) returnString += c;
    }

    return returnString;
}
 
 
function getRealLeft(img) {
// Find Position of Image File
	xPos = img.offsetLeft;
	tempEl = img.offsetParent;
  	while (tempEl != null) {
  		xPos += tempEl.offsetLeft;
  		tempEl = tempEl.offsetParent;
  	}
	return xPos;
}

function getRealTop(img) {
// Find Position of Image File
	yPos = img.offsetTop;
	tempEl = img.offsetParent;
	while (tempEl != null) {
  		yPos += tempEl.offsetTop;
  		tempEl = tempEl.offsetParent;
  	}
	if (MAC45) yPos=menuOffset;
	return yPos;
	}

function findloc (imgname)
// Find Position of Image File
{
var holdingImage = document.images[imgname];
var canvasLeft = (NS4) ? holdingImage.x : getRealLeft(holdingImage);
var canvasTop = (NS4) ? holdingImage.y : getRealTop(holdingImage);
var canvasWidth = holdingImage.width;
var canvasHeight = holdingImage.height;
return ([canvasLeft,canvasTop,canvasHeight]);
}

function showMenu(imgname) 
// Show Menu Layer
{	if (NS4 || loaded)
	{
		if (NS6) 
			menu=document.getElementById(imgname+"layer")
		else if (NS4)
			menu=eval("document.layers."+imgname+"layer")
		else
			menu=eval(imgname+"layer");
	}
	if (NS4) menu.visibility = "show"
	else menu.style.visibility = "visible"
	openmenu=imgname;
}

function hideMenu() 
// Hide Menu Layer
{
if (openmenu != null)
	{
		if (NS6) 
			menu=document.getElementById(openmenu+"layer")
		else if (NS4)
			menu=eval("document.layers."+openmenu+"layer")
		else
			menu=eval(openmenu+"layer");
	    if (NS4) menu.visibility = "hide"
	    else menu.style.visibility = "hidden"
		img_inact(openmenu)
	}
}

function popup (imgname)
// Pop Up Menu
{
	if (NS6) 
		menu=document.getElementById(imgname+"layer")
	else if (NS4)
		menu=eval("document.layers."+imgname+"layer")
	else
		menu=eval(imgname+"layer");
if (NS4)
{
	menu.top = findloc(imgname)[1]+1+menuBarHeight;
	menu.left = findloc(imgname)[0];
}
else if (NS6)
{
	menu.style.top = findloc(imgname)[1]+1+menuBarHeight;
	menu.style.left = findloc(imgname)[0];
}
else
{
	menu.style.pixelTop = findloc(imgname)[1]+1+menuBarHeight;
	menu.style.pixelLeft = findloc(imgname)[0];
}
showMenu(imgname);
}

function checkmenu (openmenu,check)
// Check to see if menu is open but not used, if so it is closed
{
if ((overmenu == 0) && (check == overcheck))
{
		if (NS6) 
			menu=document.getElementById(openmenu+"layer")
		else if (NS4)
			menu=eval("document.layers."+openmenu+"layer")
		else
			menu=eval(openmenu+"layer");
	    if (NS4) menu.visibility = "hide"
	    else menu.style.visibility = "hidden"
		img_inact(openmenu)
}
}

function menutimeout (openmenu)
// Set a .5 second timeout when the menu is not being used to close
{
overcheck=overcheck+1;
setTimeout("checkmenu(openmenu,"+overcheck+")",500);
}

function tocItem (name) {
this.on = new Image();
this.on.src = "images/" + name + "_on.gif"
this.off = new Image();
this.off.src = "images/" + name + "_off.gif"
}

function toc_new (name) {
tocItem[name] = new tocItem(name);
}

function img_act (imgName)
// Show Image
{
if (document.images) 
	document[imgName].src = tocItem[imgName].on.src
}

function img_inact (imgName, openmenu)
// Hide Image
{
if (document.images) 
    document[imgName].src = tocItem[imgName].off.src;
}

function menuimg_act(imgName, openmenu) {
if (document.images) {
if ((openmenu == null) || (IE4) || (NS6))
	img_act(imgName)
else
	{
	image= eval("document.layers."+openmenu+"layer.document.images['"+imgName+"']");
	image.src = tocItem[imgName].on.src;
	}
}
overmenu=1;
}

function menuimg_inact(imgName, openmenu, main) {
if (document.images) {
if ((openmenu == null) || (IE4) || (main != null) || (NS6))
	img_inact(imgName)
else
	{
	image= eval("document.layers."+openmenu+"layer.document.images['"+imgName+"']");
	image.src = tocItem[imgName].off.src;
	}
}
menutimeout(openmenu);
overmenu=0;
}

if (document.images != null) {
toc_new('about');
toc_new('services');
toc_new('showcase');
toc_new('investers');
toc_new('partners');
toc_new('aboutoversec');
toc_new('aboutinvestsec');
toc_new('ebusiness');
toc_new('techconsultsec');
toc_new('mobileapplisec');
toc_new('educationsec');
toc_new('wirelesssec');
toc_new('finaapplisec');

toc_new('investoversec');
toc_new('presseventssec');
toc_new('reportssec');
toc_new('partnersoversec');
toc_new('alliancessec');


}

// -->

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
