<!--
// Author: Ron Grafe grafer@columbus.rr.com http://www.gdevresources.com/Pages/Scripts/Hovermenu/hovermenu.htm
// Permission granted to SimplytheBest.net to feature script in its
// DHTML script collection at http://simplythebest.net/scripts/dhtml_scripts.html
<!-- Browser Check -->
iens6=document.all||document.getElementById
ns4=document.layers
<!--DEFINE CONTENT-->
<!--PLACE ALL YOU BOX TITLES HERE - Just add another element to the array -->
var titleArray = new Array
//titleArray[1]="<b><a class=pathlink href='http://simplythebest.net/info/dhtml_menus.html'>DHTML Scripts</a></b>"
titleArray[2]="<img src='https://www.metro.com.sg/storefront/Static/homepage/03July/images/spacer.gif' border='0' height='1' align='left'><img src='https://www.metro.com.sg/storefront/Static/homepage/03July/images/spacer.gif' border='0' height='1' align='right'>"
<!--PLACE ALL YOU BOX CONTENT HERE - Make sure you use a += after the first line -->
var linkArray = new Array
linkArray[2]="<img src='https://www.metro.com.sg/storefront/Static/homepage/03July/images/spacer.gif' border='0' height='1'>"
linkArray[2]+="<a class=tx1 href='https://www.metrocard.com.sg/mu/login.asp'><img src='https://www.metro.com.sg/storefront/Static/homepage/03July/images/spacer.gif' width='10' border='0'>METRO UOB VISA GOLD</a><br><br>"
linkArray[2]+="<a class=tx1 href='https://www.metrocard.com.sg/mcc/login.asp'><img src='https://www.metro.com.sg/storefront/Static/homepage/03July/images/spacer.gif' width='10' border='0'>METRO CREDIT CARD</a><img src='https://www.metro.com.sg/storefront/Static/homepage/03July/images/spacer.gif' width='10' border='0'><br><br>"
linkArray[2]+="<a class=tx1 href='https://www.metrocard.com.sg'><img src='https://www.metro.com.sg/storefront/Static/homepage/03July/images/spacer.gif' width='10' border='0'>THE METRO CARD</a><img src='https://www.metro.com.sg/storefront/Static/homepage/03July/images/spacer.gif' width='10' border='0'><br><br>"
<!--END DEFINE CONTENT-->
<!--GLOBAL VARIABLES-->
var thename
var theobj
var thetext
var winHeight
var winWidth
var boxPosition
var headerColor
var tableColor
var timerID
var seconds=0
var x=0
var y=0
var offsetx = 2
var offsety = 2
<!--END GLOBAL VARIABLES-->
if(ns4) {
	document.captureEvents(Event.MOUSEMOVE)
}
document.onmousemove=getXY
<!--GLOBAL FUNCTIONS-->
function buildText(value,tcolor,bcolor) {
// CHANGE EACH ARRAY ELEMENT BELOW TO YOUR OWN CONTENT. MAKE SURE TO USE SINGLE QUOTES INSIDE DOUBLE QUOTES.
text="<table width='"+(winWidth-2)+"' height='"+(winHeight-2)+"' border='0' bgcolor='"+tableColor+"' cellspacing='0' cellpadding=1>"
text+="<tr><td width='"+(winWidth-4)+"' height='20' align='center' valign='middle' bgcolor='"+headerColor+"'>"
text+="<font face='arial,helvetica' color='"+tcolor+"' SIZE='-1'>"+titleArray[value]+"</font>"
text+="</td></tr>"
text+="<tr><td width='"+winWidth+"' align='left' valign='middle'>"
text+="<font face='arial,helvetica' color='"+bcolor+"' SIZE='-2'>"+linkArray[value]+"</font>"
text+="</td></tr></table>"
return text
}
function setObj(textelement,inwidth,inheight,boxpos,titlecolor,boxcolor,tfontcolor,bfontcolor) {
	clearTimeout(timerID)
	boxPosition=boxpos
	tableColor=boxcolor
	headerColor=titlecolor
	winWidth=inwidth
	winHeight=inheight
	thetext=buildText(textelement,tfontcolor,bfontcolor)
	if (boxPosition == "bottomR") { // Right
		x=x+offsetx
		y=y+offsety
	}
	if (boxPosition == "bottomC") { // Right
		x=x-(offsetx+2)
		y=y+3
	}
	if (boxPosition == "bottomL") { // Left
		x=x-(offsetx+2)-winWidth
		y=y-offsety
	}
	if (boxPosition == "topR") { // Top
		x=x+offsetx
		y=y+offsety-winHeight
	}
	if (boxPosition == "topL") { // Top
		x=x-(offsetx+2)-winWidth
		y=y+offsety-winHeight
	}
	if(iens6){
		thename = "viewer"
		theobj=document.getElementById? document.getElementById(thename):document.all.thename
		theobj.style.width=winWidth
		theobj.style.height=winHeight
		theobj.style.left=x
		theobj.style.top=y
			if(iens6&&document.all) {
				theobj.innerHTML = ""
				theobj.insertAdjacentHTML("BeforeEnd","<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=top><font type='times' size='2' style='color:black;font-weight:normal'>"+thetext+"</font></td></tr></table>")
			}
			if(iens6&&!document.all) {
				theobj.innerHTML = ""
				theobj.innerHTML="<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=top><font type='times' size='2' style='color:black;font-weight:normal'>"+thetext+"</font></td></tr></table>"
			}
	}
	if(ns4){
		thename = "nsviewer"
		theobj = eval("document."+thename)
		theobj.left=x
		theobj.top=y
		theobj.width=winWidth
		theobj.clip.width=winWidth
		theobj.height=winHeight
		theobj.clip.height=winHeight
		theobj.document.write("<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=top><font type='times' size='2' style='color:black;font-weight:normal'>"+thetext+"</font></td></tr></table>")
		theobj.document.close()
	}
	viewIt()
}
function viewIt() {
		if(iens6) {
			theobj.style.visibility="visible"
		}
		if(ns4) {
			theobj.visibility = "visible"
		}
}
function stopIt() {
	if(iens6) {
		theobj.innerHTML = ""
		theobj.style.visibility="hidden"
	}
	if(ns4) {
		theobj.document.write("")
		theobj.document.close()
		theobj.visibility="hidden"
	}
}
function timer(sec) {
	seconds=parseInt(sec)
	if(seconds>0) {
		seconds--
		timerID=setTimeout("timer(seconds)",1000)
	}else{
		stopIt()
	}
}
function getXY(e) {
	if (ns4) {
		x=0
		y=0
		x=e.pageX; 
		y=e.pageY;
	}
	if (iens6&&document.all) {
		x=0
		y=0
		x=event.x; 
		y=event.y;
	}
	if (iens6&&!document.all) {
		x=0
		y=0
		x=e.pageX; 
		y=e.pageY;
	}
}
<!--END GLOBAL FUNCTIONS-->

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		ext_but02003 = newImage("https://www.metro.com.sg/storefront/Static/Homepage/24May/images/ext_but02-03.gif");
		IvyNT03005 = newImage("https://www.metro.com.sg/storefront/Static/Homepage/24May/images/IvyNT03-05.gif");
		IvyNT04007 = newImage("https://www.metro.com.sg/storefront/Static/Homepage/24May/images/IvyNT04-07.gif");
		IvyNT04008 = newImage("https://www.metro.com.sg/storefront/Static/Homepage/24May/images/IvyNT04-08.gif");
		IvyNT05010 = newImage("https://www.metro.com.sg/storefront/Static/Homepage/24May/images/IvyNT05-10.gif");
		IvyNT05011 = newImage("https://www.metro.com.sg/storefront/Static/Homepage/24May/images/IvyNT05-11.gif");
		IvyNT06013 = newImage("https://www.metro.com.sg/storefront/Static/Homepage/24May/images/IvyNT06-13.gif");
		IvyNT07015 = newImage("https://www.metro.com.sg/storefront/Static/Homepage/24May/images/IvyNT07-15.gif");
		IvyNT08017 = newImage("https://www.metro.com.sg/storefront/Static/Homepage/24May/images/IvyNT08-17.gif");
		IvyNT08018 = newImage("https://www.metro.com.sg/storefront/Static/Homepage/24May/images/IvyNT08-18.gif");
		IvyNT09020 = newImage("https://www.metro.com.sg/storefront/Static/Homepage/24May/images/IvyNT09-20.gif");
		IvyNT09021 = newImage("https://www.metro.com.sg/storefront/Static/Homepage/24May/images/IvyNT09-21.gif");
		preloadFlag = true;
	}
}

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_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_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.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];}
}
// -->
<!-- End Preload Script -->

if (iens6){
document.write("<div id='viewer' style='background-color:#E6E6E6;marginleft:10;visibility:hidden;position:absolute;width:0;height:0;z-index:1;overflow:hidden'></div>")
}
if (ns4){
	hideobj = eval("document.nsviewer")
	hideobj.visibility="hidden"
}
