<!--
if (document.images) {
arImageSrc = new Array (
//nav preload
//xPath+ "images/contactUp.gif",
//xPath+ "images/contactDwn.gif"
)

arImageList = new Array ();

for (counter in arImageSrc) {
arImageList[counter] = new Image ();
arImageList [counter].src = arImageSrc [counter];
}
};
function rollOver (imname,over) {
        if (!document.images) {return};
        if (over) { 
        document.images [imname].src = xPath+"images/" + imname  + "Dwn.gif";
		}
        else 
        { 
        document.images [imname].src = xPath+ "images/" + imname  + "Up.gif";		
        }
}

function openWindow(url,x,y,screenX,screenY,top,left) {
mywin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=' + x + ',height=' + y + ',screenX=' + screenX + ',screenY=' + screenY + ',top=' + top + ',left=' + left);
mywin.focus();
}

function openWindow2(url,x,y,screenX,screenY,top,left) {
mywin = window.open(url,"win2",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=' + x + ',height=' + y + ',screenX=' + screenX + ',screenY=' + screenY + ',top=' + top + ',left=' + left);
mywin.focus();
}

function openWebsite(url,x,y,screenX,screenY,top,left,xPath) {
mywin = window.open('','','toolbar=1,location=1,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=' + x + ',height=' + y + ',screenX=' + screenX + ',screenY=' + screenY + ',top=' + top + ',left=' + left);
mywin.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">');
mywin.document.write('<HTML>');
mywin.document.write('<HEAD>');
mywin.document.write('<TITLE></TITLE>');
mywin.document.write('<LINK href="'+ xPath +'styles/gmp-styles.css" rel="stylesheet">');
mywin.document.write('</HEAD>');
mywin.document.write('<BODY bgcolor="ffffff" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">');
mywin.document.write('<table border="0" cellpadding="0" cellspacing="0" align="center" height="100%">');
mywin.document.write('<tr><td valign="middle" class="textB">You are now leaving the GMP Securities Ltd. website.</td></tr>');
mywin.document.write('</table>');
mywin.document.write('</BODY>');
mywin.document.write('</HTML>');
//mywin.focus();
weblink = "window.location.href='" +url+ "'";
mywin.setTimeout(weblink,2000);
}

function closewindow()
{
  window.close();
}



// Start Cookie Functions

// date - any instance of the Date object
     // * hand all instances of the Date object to this function for "repairs"
     function fixDate(now) {
       var base = new Date(0);
       var skew = base.getTime();
       if (skew > 0)
         date.setTime(date.getTime() - skew);
     }

// create an instance of the Date object
          var now = new Date();
          // fix the bug in Navigator 2.0, Macintosh
          fixDate(now);
          // cookie expires in one year (actually, 365 days)
          // 365 days in a year
          // 24 hours in a day
          // 60 minutes in an hour
          // 60 seconds in a minute
          // 1000 milliseconds in a second
          now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
	 
	 
     // name - name of the cookie
     // value - value of the cookie
     // [expires] - expiration date of the cookie (defaults to end of current session)
     // [path] - path for which the cookie is valid (defaults to path of calling document)
     // [domain] - domain for which the cookie is valid (defaults to domain of calling document)
     // [secure] - Boolean value indicating if the cookie transmission requires a secure transmission
     // * an argument defaults when it is assigned null as a placeholder
     // * a null placeholder is not required for trailing omitted arguments
     function setCookie(name, value, expires, path, domain, secure) {
       var curCookie = name + "=" + escape(value) +
           ((expires) ? "; expires=" + expires.toGMTString() : "") +
           ((path) ? "; path=" + path : "") +
           ((domain) ? "; domain=" + domain : "") +
           ((secure) ? "; secure" : "");
       document.cookie = curCookie;
	   //location.reload();
     }

function getCookie(name) {
       var dc = document.cookie;
       var prefix = name + "=";
       var begin = dc.indexOf("; " + prefix);
       if (begin == -1) {
         begin = dc.indexOf(prefix);
         if (begin != 0) return null;
       } else
         begin += 2;
       var end = document.cookie.indexOf(";", begin);
       if (end == -1)
         end = dc.length;
       return unescape(dc.substring(begin + prefix.length, end));
     }
	 
	 // name - name of the cookie
     // [path] - path of the cookie (must be same as path used to create cookie)
     // [domain] - domain of the cookie (must be same as domain used to create cookie)
     // * path and domain default if assigned null or omitted if no explicit argument proceeds
     function deleteCookie(name, path, domain) {
       if (getCookie(name)) {
         document.cookie = name + "=" + 
         ((path) ? "; path=" + path : "") +
         ((domain) ? "; domain=" + domain : "") +
         "; expires=Thu, 01-Jan-70 00:00:01 GMT";
		 location.reload();
       }
     }
// End Cookie Functions

// D I S P L A Y   T O D A Y ' S   D A T E
// Style 1: March 17, 2000
// Style 2: Mar 17, 2000
// Style 3: Saturday March 17, 2000
// Style 4: Sat Mar 17, 2000
// Style 5: Sat March 17, 2000
// Style 6: 17 March 2000
// Style 7: 17 Mar 2000
// Style 8: 17 Mar 00
// Style 9: 3/17/00
// Style 10: 3-17-00
// Style 11: Saturday March 17
// Style 12: Saturday, March 17, 2000
function DisplayDate(style) {
  months = new Array();
  months[1] = "January";  months[7] = "July";
  months[2] = "February"; months[8] = "August";
  months[3] = "March";    months[9] = "September";
  months[4] = "April";    months[10] = "October";
  months[5] = "May";      months[11] = "November";
  months[6] = "June";     months[12] = "December";

  months2 = new Array();
  months2[1] = "Jan"; months2[7] = "Jul";
  months2[2] = "Feb"; months2[8] = "Aug";
  months2[3] = "Mar"; months2[9] = "Sep";
  months2[4] = "Apr"; months2[10] = "Oct";
  months2[5] = "May"; months2[11] = "Nov";
  months2[6] = "Jun"; months2[12] = "Dec";

  days = new Array();
  days[1] = "Sunday";    days[5] = "Thursday";
  days[2] = "Monday";    days[6] = "Friday";
  days[3] = "Tuesday";   days[7] = "Saturday";
  days[4] = "Wednesday";

  days2 = new Array();
  days2[1] = "Sun"; days2[5] = "Thu";
  days2[2] = "Mon"; days2[6] = "Fri";
  days2[3] = "Tue"; days2[7] = "Sat";
  days2[4] = "Wed";

  todaysdate = new Date();
  date  = todaysdate.getDate();
  day  = todaysdate.getDay() + 1;
  month = todaysdate.getMonth() + 1;
  yy = todaysdate.getYear();
  year = (yy < 1000) ? yy + 1900 : yy;
  year2 = 2000 - year; year2 = (year2 < 10) ? "0" + year2 : year2;

  dateline = new Array();
  dateline[1] = months[month] + " " + date + ", " + year;
  dateline[2] = months2[month] + ". " + date + ", " + year;
  dateline[3] = days[day] + " " + months[month] + " " + date + ", " + year;
  dateline[4] = days2[day] + " " + months2[month] + " " + date + ", " + year;
  dateline[5] = days2[day] + " " + months[month] + " " + date + ", " + year;
  dateline[6] = date + " " + months[month] + " " + year;
  dateline[7] = date + " " + months2[month] + " " + year;
  dateline[8] = date + " " + months2[month] + " " + year2;
  dateline[9] = month + "/" + date + "/" + year2;
  dateline[10] = month + "-" + date + "-" + year2;
  dateline[11] = days[day] + " " + months[month] + " " + date;
  dateline[12] = days[day] + ", " + months[month] + " " + date + ", " + year;

  document.write(dateline[style]);
}

function DisplayTime() {
  now = new Date();
  hour = now.getHours();
  minute = now.getMinutes();
  second = now.getSeconds();
  if( hour < 10 ) hour = '0' + hour;
  if( minute < 10 ) minute = '0' + minute;
  if( second < 10 ) second = '0' + second;
  if( hour < 12 ) ampm = 'am';
  else {
    hour = hour - 12;
    ampm = 'pm';
  }
  document.write(hour + ':' + minute + ' ' + ampm);
}

//-->

