/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="company-profile.html">Company Profile</a>'
menu1[1]='<a href="vision.html">Vision</a>'
menu1[2]='<a href="management.html">Management</a>'
menu1[3]='<a href="alliances.html">Alliances</a>'
//menu1[4]='<a href="contracts.html">Contracts</a>'
menu1[5]='<a href="careers.html">Careers</a>'
menu1[6]='<a href="quality-policy.html">Quality Policy</a>'
menu1[7]='<a href="simigon-faq.html">SimiGon FAQ</a>'

//Contents for menu 2
var menu2=new Array()
menu2[0]='<a href="overview.html">Overview</a>'
menu2[1]='<a href="spp.html">Partnership Program</a>'
menu2[2]='<a href="aviation-training.html">Aviation Training</a>'
menu2[3]='<a href="ground-forces-training.html">Ground Forces Training</a>'
menu2[4]='<a href="maritime-training.html">Maritime Training</a>'

//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href="http://www.simbox.com">SIMbox</a>'
menu3[1]='<a href="airbook.html">AirBook</a>'
menu3[2]='<a href="content-tools.html">Content Tools</a>'
menu3[3]='<a href="developer-tools.html">Developer Tools</a>'
menu3[4]='<a href="d-brief-pc.html">D-Brief PC</a>'
menu3[5]='<a href="LMS.html">LMS / LCMS</a>'
menu3[6]='<a href="airtrack.html">AirTrack</a>'
menu3[7]='<a href="websimwindow.html">Web Simulation (Beta)</a>'

//Contents for menu 4
var menu4=new Array()
menu4[0]='<a href="company-overview.html">Company Overview</a>'
menu4[1]='<a href="board-of-directors.html">Board of Directors</a>'
menu4[2]='<a href="management.html">Senior Management</a>'
menu4[3]='<a Target="_blank" href="http://www.londonstockexchange.com/exchange/prices-and-news/stocks/summary/company-summary.html?fourWayKey=IL0010991185GBGBXAIMI">Stock Information</a>'
menu4[4]='<a href="financial-information.html">Financial information</a>'
menu4[5]='<a href="ir-contact.html">IR Contact</a>'
menu4[5]='<a href="aimrule26.html">AIM Rule 26</a>'

//Contents for menu 5
var menu5=new Array()
menu5[0]='<a href="photo-gallery.html">Photo Gallery</a>'
menu5[1]='<a href="videos_content.html">Content Videos</a>'
menu5[2]='<a href="Product videos.html">Product Videos</a>'
menu5[3]='<a href="videos_maritime.html">Maritime Videos</a>'
menu5[4]='<a href="videos.html">Training Videos</a>'

//Contents for menu 6
var menu6=new Array()
menu6[0]='<a href="end-user-faq.html">End User FAQ</a>'
menu6[1]='<a href="contact-support.html">Contact Support</a>'
menu6[2]='<a href="developers-section.html">Developer Section</a>'

//Contents for menu 7
var menu7=new Array()
menu7[0]='<a href="contact.html">Contact</a>'
		
var menuwidth='185px' //default menu width
var menubgcolor='whitew'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editing needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

function launch(newURL, newName, newFeatures, orgName) {
  var remote = open(newURL, newName, newFeatures);
  if (remote.opener == null)
    remote.opener = window;
  remote.opener.name = orgName;
  return remote;
}

function EmbedFlash(){
document.write(
'<embed src="images/index/intro.swf" menu="false" quality="high" devicefont="true" bgcolor="#FFFFFF" width="768" height="248" wmode="transparent"type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">\n</embed>');
}

function gallery(URL, WIDTH, HEIGHT) {
windowprops = "left=10,top=10,width=" + (WIDTH) + ",height=" + (HEIGHT);

var text = "<html><head><title>Preview</title></head><body marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 bgcolor='white'><center><img src='" + URL + "'></center></body></html>";

preview = window.open("", "preview", windowprops);
preview.document.open();
preview.document.write(text);
preview.document.close();
}
