function IEHoverPseudo() {
	var navItems = document.getElementById("header").getElementsByTagName("li");
	for (var i=0; i<navItems.length; i++) {
		if(navItems[i].className == "menuparent") {
			navItems[i].onmouseover=function() { 
      this.className += " over"; 
      this.style.zIndex=2000;
      }
			navItems[i].onmouseout=function() { this.className = "menuparent"; }
		}
	}

}
window.onload = IEHoverPseudo;

function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if ( node == null )
		node = document;
	if ( tag == null )
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}  

function toggleContent(obj) {
  var objArray = getElementsByClass(obj);
  for (var i=0; i<objArray.length; i++) {
    if (objArray[i].style.display != "block") {
      objArray[i].style.display = "block";
      document.getElementById("descriptionsLink").style.display = "none";
      document.getElementById("titlesLink").style.display = "block";
    }
    else {
      objArray[i].style.display = "none";
      document.getElementById("descriptionsLink").style.display = "block";
      document.getElementById("titlesLink").style.display = "none";
    }
  }
}

function hyperJump(dropNum) { 
var noCache = NoCacheURL();
var nstr = 'https://banking.mashreqbank.com/RBG.Net/aelogin.htm?' + noCache; 

	selection = "select"+dropNum;
	formname = "form"+dropNum;
	newURL = document[formname][selection].options[document[formname][selection].selectedIndex].value;
	if (newURL != "") {
	if(newURL =='http://www.mashreqonline.com'){
	window.open('/commercial/index.html');
	}
	else if(newURL =='../login.html'){

	  NewWindow(nstr,'name','790','520','yes');
	}
	else if(newURL =='login.html'){
	  NewWindow(nstr,'name','790','520','yes');
	}
	else if(newURL =='email'){
	  MM_openBrWindow('../emailus.asp?id=RBG&m=rbgwebrep&sh=1','email','width=420,height=470,left=200,top=70');
	}
	else if(newURL =='email2'){
	  MM_openBrWindow('emailus.asp?id=home&m=aboutus&sh=0','email','width=420,height=470,left=200,top=70');
	}
	else if(newURL =='feedback'){
	  MM_openBrWindow('feedback.asp?id=Feedback-Home&m=aboutus','email','width=420,height=470,left=200,top=70');
	}
	else if(newURL =='rbg_ch_dbc.html'){
	  MM_jumpMenuGo('select3','self',0);
	}
	else
		NewWindow(newURL,'name','790','520','yes');
		}
	}

	function NewWindow(mypage, myname, w, h, scroll) {
	
	 var winl = 0;
	 var wint = 0;
	 winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable,status'
	 win = window.open(mypage, myname, winprops)
	 //win.focus();
	}
	
	function onlink(linkURL){
	 var noCache = NoCacheURL();
	 var nstr = 'https://banking.mashreqbank.com/RBG.Net/aelogin.htm?' + noCache; 
	 var istr = 'https://banking.mashreqbank.com/ibank/login.asp?' + noCache; 
	
	 if (linkURL != "") {
	 if(linkURL =='http://www.mashreqonline.com'){
	 //window.open('/commercial/index.html');
	 NewWindow(istr,'name','790','520','yes');
	}
	 else if(linkURL =='../login.html'){
	 NewWindow(nstr,'name','790','520','yes');
	}
	 else if(linkURL =='login.html'){
	 NewWindow(nstr,'name','790','520','yes');
	}
	 else
	 NewWindow(linkURL,'name','790','520','yes');
	}
	}