// JavaScript Document

var JTS = new Array();
JTS[0]=['Defence & Security','defence-security.html'];
JTS[1]=['Jash IT Division','it-products-and-business-solutions.html'];
JTS[2]=['Facility Management Division','facility-management-division.html'];





document.write('<div id="div0" class="menu">');
for(i=0; i<JTS.length; i++)
{document.write('<a href="'+JTS[i][1]+'">'+JTS[i][0]+'</a>')}
document.write('</div>');



var ie4=document.all;
var dom=document.getElementById &&! ie4;
var ns4 = document.layers;
var opera = navigator.userAgent.indexOf('opera') != -1

var menuobj = null;

function iecompat()
{ return (document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body; }

function gety(what)
{ var objtop = what.offsetTop;
  var objp = what.offsetParent;
  
  while(objp)
  { objtop = objtop+objp.offsetTop;
    objp = objp.offsetParent;
  }
  return objtop;

}

function gettoppos(what, offsettype)
{ var topy = gety(what);
  var winheight = (!opera)? iecompat().scrollTop+iecompat().clientHeight : window.pageYOffset+window.innerHeight;
  var maxheight = topy+menuobj.offsetHeight;
  
 /*  if(winheight < maxheight)
  { var objy = (topy+what.offsetHeight)-(menuobj.offsetHeight);
 }
  else{objy = topy+what.offsetHeight;}
  */
  objy = topy;
  return objy;
}

function getx(what)
{ var objleft = what.offsetLeft;
  var objp = what.offsetParent;
  while(objp)
  { objleft = objleft+objp.offsetLeft;
    objp = objp.offsetParent;
  }
	return objleft;	
}

function getleftpos(what, offsettype)
{ var leftx = getx(what);
  var winwidth = (!opera)? iecompat().scrollLeft+iecompat().clientWidth : window.pageXOffset+window.innerWidth;
  var maxwidth = leftx+menuobj.offsetWidth;
  
  /* if(winwidth < maxwidth)
  { var objx = (winwidth) - (menuobj.offsetWidth+what.offsetWidth);}
  else
  {objx = leftx;} */
  
  objx = leftx - menuobj.offsetWidth;
  return objx; 
}


function dropmenu(obj,e)
{  if(window.event) window.event.cancelBubble=true;
   else if(e.stopPropagation) e.stopPropagation();
   
   if(menuobj != null)
   {hidemenu();}
   
   menuobj = document.getElementById(obj.rel)
   cleardelay()
   
   if(ie4 || dom)
   {menuobj.style.visibility="visible";
    menuobj.style.top = gettoppos(obj,"top")+"px"; 
	menuobj.style.left = getleftpos(obj,"left")+"px"; 
	}
	
	if(ns4)
   {menuobj.visibility="visible";
    menuobj.clip.top = gettoppos(obj,"top")+"px"; 
	menuobj.clip.left = getleftpos(obj,"left")+"px"; 
	}
	
	if(opera)
   {menuobj.style.visibility="visible";
    menuobj.style.pixelTop = gettoppos(obj,"top")+"px"; 
	menuobj.style.pixelLeft = getleftpos(obj,"left")+"px"; 
	}
   
   menuobj.onmouseover=function()
   {cleardelay();
   // prev = obj.className;
   	//obj.className = "current"; 
	}
	
   menuobj.onmouseout=function()
   {delayhide();
   //obj.className = prev ;
   }


}

function delayhide()
{stopit = setTimeout('hidemenu()',200);}

function hidemenu()
{menuobj.style.visibility="hidden";}

function cleardelay()
{ if(typeof stopit != "undefined")
	clearTimeout(stopit);
}

/* -------------------------------------------------------------------------------------- */

function imagewin(img,w,h)
{   if (typeof win != "undefined")
    { win.close(); }
	
	 var topy = parseInt((window.screen.availHeight / 2) - (h / 2));
    var leftx = parseInt((window.screen.availWidth / 2) - (w / 2));
	
	var win = window.open('','','width='+w+',height='+h+',top=' + topy + ',left=' + leftx + ',screenX=' + leftx + ',screenY=' + topy + ',scrollbars=yes ');
	
	win.document.open();
	win.document.write('<html><body topmargin="0px" leftmargin="0px"><img src="'+img+'" /></body></html>');
	win.document.close();
	win.focus();
}
