// JavaScript Document
var root ='http://www.comfortdelgro.com.sg/';
//var root ='D:/CDG_website/';

var naviBottomData = [
  [ "naviBottom1",
    root+"image/profile.jpg",
    root+"image/profile_grey.jpg",
    root+"company/aboutus.htm",
    "We have a total fleet size of close to 44,100 vehicles worldwide"
  ],
  [ "naviBottom2",
    root+"image/financial.jpg",
    root+"image/financial_grey.jpg",
    root+"financial/financial_results.htm",
    "Our revenue for FY2009 is S$3.05 billion"
  ],
  [ "naviBottom3",
    root+"image/map.jpg",
    root+"image/map_grey.jpg",
    root+"global/business_segment.htm",
    "Our businesses include taxi, bus, etc"
  ],
  [ "naviBottom4",
    root+"image/vm.jpg",
    root+"image/vm_grey.jpg",
     root+"values/vm.htm",
    "We aim to be the undisputed global leader"
  ],
  [ "naviBottom5",
    root+"image/social.jpg",
    root+"image/social_grey.jpg",
    root+"values/social.htm",
    "We care for the community & the environment in which we operate"
  ],
  [ "naviBottom6",
    root+"image/corporate.jpg",
    root+"image/corporate_grey.jpg",
    root+"values/governance.htm",
    "Our principles of Corporate Governance"
  ]
];

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];}
}

function changeIconDesc(id, description) {
  document.getElementById(id).innerHTML = description;
}

function naviBottomMouseOver(description) {
  changeIconDesc("icon_desc", description);
}

function naviBottomMouseOut() {
  changeIconDesc("icon_desc", "&nbsp;");
}

function naviBottom(selected) {
  var str = "";
  
  str += '<table width="100%" border="0" cellspacing="0" cellpadding="0" background="' + root + '/image/bottom.jpg" style="background-repeat:repeat-y">';
  str += '<tr>';
  str += '<td width="185" height="65" class="iconText" style="padding-left:5px"><span id="icon_desc">&nbsp;</span></td>';
  str += '<td width="535" height="65" valign="middle" nowrap>';
  str += '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
  str += '<tr>';
  
  var i;
  for (i=0; i<naviBottomData.length; i++) {
    str += '<td align="center">';
    if (selected == i) {
      str += '<a href="' + naviBottomData[i][3] + '"><img src="' + naviBottomData[i][1] + '" width="72" height="46" border="0" onMouseOver="naviBottomMouseOver(' + "'" + naviBottomData[i][4] + "'" + ')" onMouseOut="naviBottomMouseOut()">';
    } else {
      str += '<a href="' + naviBottomData[i][3] + '" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(' + "'" + naviBottomData[i][0] + "'" + ',' + "'" + '' + "'" + ',' + "'" + naviBottomData[i][1] + "'" + ',1) "><img src="' + naviBottomData[i][2] + '" name="' + naviBottomData[i][0] + '" id="' + naviBottomData[i][0] + '" width="72" height="46" border="0" onMouseOver="naviBottomMouseOver(' + "'" + naviBottomData[i][4] + "'" + ')" onMouseOut="naviBottomMouseOut()">';
    }
    str += '</a></td>';
  }
  
  str += '</tr>';
  str += '</table></td>';
  str += '</tr>';
  str += '</table>';
  
  document.write(str);
}

function copyright() {
  d=new Date();
  y=parseInt(d.getYear());
  if ((navigator.appName=="Netscape")) {
    if (parseInt(navigator.appVersion) < 6)
      y = 1900+y;  
  }

  document.write("<font style='font-family:arial;font-size:10px;'>Copyright &#169; " + y + " ComfortDelGro Corporation Limited | Company Registration No: 200300002K</font>");  
}

function top(langLink){

 document.write(" <tr> " +
   " <td><div align=\"right\"><img src=\"" + root + "image/topbanner_01.jpg\" width=\"360\" height=\"56\"></div></td>" +
    "<td><img src=\"" + root + "image/topbanner_02.jpg\" width=\"360\" height=\"56\" border=\"0\" usemap=\"#Map\"></td>" +
  "</tr>"  +
  '<map name="Map">' +
  '<area shape="rect" coords="237,33,272,52" href="' + root + "chinese/" + langLink + '">' +
  '<area shape="rect" coords="294,34,334,52" href="' + root + 'index.html">' +
  '</map>');
  }

function top1(){

 document.write(" <tr> " +
   " <td><div align=\"right\"><img src=\"" + root + "image/topHome_01.jpg\" width=\"360\" height=\"56\"></div></td>" +
    "<td><img src=\"" + root + "image/topHome_02.jpg\" width=\"360\" height=\"56\" border=\"0\" usemap=\"#Map\"></td>" +
  "</tr>"  +
  '<map name="Map">' +
  '<area shape="rect" coords="294,34,334,52" href="' + root + 'index.html">' +
  '</map>');
  }



function popup(url) 
{
 var width  = (screen.width);
 var height = (screen.height);
 var left   = 0;
 var top    = 0;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false;
}