// CG,18032008

var root ='/';
//var root ='/harrisbook/';
//var root ='file:///D:/HARRIS%20Website/';

var naviBottomData = [
  [ "naviBottom0",
    root+"images/home/highlightsBk1.gif",
    root+"images/home/highlightsBk1_w.gif",
    "javascript:_openWindow('" + root + "home/book1.htm" + "', '_highlights', 'toolbar=no,resizable=no,scrollbars=no,width=500,height=330,top=0,left=0');",
    // root+"book1.htm",  
    "<br><b>Dough: Simple Contemporary Bread<br> (With DVD)</b> <br><br> <i><font size=2>Richard Bertinet</font></i>"
  ],
 
  [ "naviBottom1",
    root+"images/home/highlightsBk2.gif",
    root+"images/home/highlightsBk2_w.gif",
    "javascript:_openWindow('" + root + "home/book2.htm" + "', '_highlights', 'toolbar=no,resizable=no,scrollbars=no,width=535,height=300,top=0,left=0');",
	"<b>Crust: Bread to Get Your Teeth Into<br> (With DVD)</b><br><br><i><font size=2>Richard Bertinet</font></i>"
  ],
  
  [ "naviBottom2",
    root+"images/home/highlightsBk3.gif",
    root+"images/home/highlightsBk3_w.gif",
    "javascript:_openWindow('" + root + "home/book3.htm" + "', '_highlights', 'toolbar=no,resizable=no,scrollbars=no,width=500,height=300,top=0,left=0');",
	 "<b>Spain: Mediterranean Cuisine</b><br><br> <i><font size=2>Konemann</font></i>"
  ],
  
  [ "naviBottom3",
    root+"images/home/highlightsBk4.gif",
    root+"images/home/highlightsBk4_w.gif",
      "javascript:_openWindow('" + root + "home/book4.htm" + "', '_highlights', 'toolbar=no,resizable=no,scrollbars=no,width=525,height=330,top=0,left=0');",
	  "<br><b>Eric Teo’s 7 Course Culinary <br>Choreography</b><br><br><i><font size=2>Eric Teo</font></i>"
  ]

];

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("nb_icon_desc", description);
}

//function naviBottomMouseOut() {
//  changeIconDesc("nb_icon_desc", "&nbsp;");
//}

function naviBottomMouseOut(description) {
  changeIconDesc("nb_icon_desc", description);
}


function _openWindow(url, win, style)
{
   var win = window.open(url, win, style);
   win.focus();
}

function _escape(str)
{
	return str.replace(/\\'/g, "\'");
}
//function NewWindow(mypage, myname, w, h, scroll) {
//var winl = (screen.width - w) / 2;
//var wint = (screen.height - h) / 2;
//winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
//win = window.open(mypage, winprops)
//if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
//}
var selectedNaviBottom = -1;
var nb_icon_desc = "&nbsp;";
function naviBottom(selected) {
  var str = "";
  selectedNaviBottom = (undefined==selected)?-1:selected;
  
  str += '<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-repeat:repeat-y">';
  str += '<tr>';
  str += '<td width="112" height="131" valign="bottom" nowrap>';
  str += '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
  str += '<tr><a name="_naviBottom"></a>';
  
  var i;
  for (i=0; i<naviBottomData.length; i++) {
    str += '<td align="center">';
    if (selectedNaviBottom == i) {
      nb_icon_desc = _escape(naviBottomData[i][4]);
      // str += '<a href="#_naviBottom" onclick="' + naviBottomData[i][3] + '"><img src="' + naviBottomData[i][1] + '" width="98" height="164" border="0" onMouseOver="naviBottomMouseOver(' + "'" + naviBottomData[i][4] + "'" + ')" onMouseOut="naviBottomMouseOut(' + "'" + nb_icon_desc + "'" + ')">';
    } else {
      // str += '<a href="#_naviBottom" onclick="' + naviBottomData[i][3] + '" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(' + "'" + naviBottomData[i][0] + "'" + ',' + "'" + '' + "'" + ','file:///C|/Documents%20and%20Settings/s8589/Desktop/%20+%20%22%27%22%20+%20naviBottomData%5Bi%5D%5B1%5D%20+%20%22%27%22%20+%20',1) "><img src="' + naviBottomData[i][2] + '" name="' + naviBottomData[i][0] + '" id="' + naviBottomData[i][0] + '" width="98" height="164" border="0" onMouseOver="naviBottomMouseOver(' + "'" + naviBottomData[i][4] + "'" + ')" onMouseOut="naviBottomMouseOut(' + "'" + nb_icon_desc + "'" + ')">';
    }
	str1 = '<a href="#_naviBottom" onclick="if (selectedNaviBottom > -1) MM_swapImage(naviBottomData[selectedNaviBottom][0] ' + ",''," + 'naviBottomData[selectedNaviBottom][2]' + '); selectedNaviBottom=' + i + ';nb_icon_desc = _escape(naviBottomData[selectedNaviBottom][4]);naviBottomMouseOut(nb_icon_desc); MM_swapImage(' + "'" + naviBottomData[i][0] + "','','" + naviBottomData[i][1] + "'" + '); ' + naviBottomData[i][3] + ';" onMouseOut="MM_swapImgRestore(); if (selectedNaviBottom==' + i + ') MM_swapImage(' + "'" + naviBottomData[i][0] + "','','" + naviBottomData[i][1] + "'" + ');" onMouseOver="MM_swapImage(' + "'" + naviBottomData[i][0] + "','','" + naviBottomData[i][1] + "'" + ') "><img src="' + naviBottomData[i][2] + '" name="' + naviBottomData[i][0] + '" id="' + naviBottomData[i][0] + '" width="123" height="164" border="0" onMouseOver="naviBottomMouseOver(' + "'" + naviBottomData[i][4] + "'" + ')" onMouseOut="naviBottomMouseOut(nb_icon_desc)">';
	str += str1;
    str += '</a></td>';
  }
  //str += '<td width="250" height="65" class="iconText" style="padding-left:30px" nowrap><span id="nb_icon_desc" align="justify">&nbsp;</span></td>';
  str += '<td width="250" height="65" class="iconText" style="padding-left:10px" nowrap><span id="nb_icon_desc">&nbsp;</span></td>';
  str += '</tr>';
  str += '</table></td>';
  str += '</tr>';
  str += '</table>';
  
  document.write(str);
  MM_swapImage(naviBottomData[selectedNaviBottom][0],'',naviBottomData[selectedNaviBottom][1]); 
  naviBottomMouseOut(nb_icon_desc);
}

function copyright() {
  d=new Date();
  y=parseInt(d.getYear());
  if ((navigator.appName=="Netscape")) {
    if (parseInt(navigator.appVersion) < 6)
      y = 1900+y;  
  }

  document.write(" Copyright &#169; " + y + " POPULAR HOLDINGS LIMITED.  All Rights Reserved.");  
}

/*function copyright() {
  d=new Date();
  y=parseInt(d.getYear());
  if ((navigator.appName=="Netscape")) {
    if (parseInt(navigator.appVersion) < 6)
      y = 1900+y;  
  }

  document.write(" Copyright &#169; " + y + " POPULAR HOLDINGS LIMITED.  All Rights Reserved. | <a href=\"" + root + "privacy_stat.htm\" target=\"blank\"><font color=\"#FFFFFF\"><u> Privacy Policy</u></font></a> .</font>");  
}*/

/*function topBanner() {

  var t = " <tr> " +
  " <td><object classid=\"clsid 27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"750\" height=\"63\">" +
  "<param name=\"movie\" value=\"" + root + "images/topBanner.swf\">" +
  "<param name=\"quality\" value=\"high\">" +
  "<embed src=\"" + root + "images/topBanner.swf\" wmode=\"transparent\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"750\" height=\"63\" usemap=\"#Map\"></embed>" +
  "</object></td>" +
  "</tr>";
 document.write(t);

}*/


function topBanner(){

 document.write(" <tr> " +
 " <td><img src=\"" + root + "images/topBannerFB.gif\" width=\"750\" height=\"80\" border=\"0\" usemap=\"#Map\"></td>" +
"</tr>"  +
 '<map name="Map">' +
 '<area shape="rect" coords="24,26,389,64" href="' + root + 'index.html">' + '<area shape="rect" coords="631,42,651,64" href="' + root + 'index.html">' + '<area shape="rect" coords="526,38,615,68" href="http://www.facebook.com/pages/HARRIS-Bookstores-Singapore/114442471346?ref=nf">'+
 '</map>');
 }
