
//====================================
// DDL Rollover
// From Dawson's DHTML Library
//
// Version: 2.03
//
// Author:   Dawson Cowals
// Created:  06-07-2002
// Modified: 04-11-2003
//
//====================================

// GLOBALS

gifExt    = ".gif";
jpgExt    = ".jpg";
imgPath   = menuImagePrefix + "images/";
imgTotal  = 14;
iName     = new Array(imgTotal);
iSwap     = new Array(imgTotal);

var popup;

//if compatible browser
if (is_nav4up || is_ie4up || is_gecko || is_opera || is_konqueror) {
  if (document.images) {
	//load image rollovers
    iName[0]  = imgPath + "go_off"        + gifExt;
    iName[1]  = imgPath + "go_on"         + gifExt;
    iName[2]  = imgPath + "go_down"       + gifExt;

    iName[3]  = imgPath + "more_off"      + gifExt;
    iName[4]  = imgPath + "more_on"       + gifExt;

    iName[5]  = imgPath + "vote_off"      + gifExt;
    iName[6]  = imgPath + "vote_on"       + gifExt;
    iName[7]  = imgPath + "vote_down"     + gifExt;

    iName[8]  = imgPath + "view_off"      + gifExt;
    iName[9]  = imgPath + "view_on"       + gifExt;
    iName[10] = imgPath + "view_down"     + gifExt;

	iName[11] = imgPath + "buynow_off"    + jpgExt;
	iName[12] = imgPath + "buynow_on"     + jpgExt;
	iName[13] = imgPath + "buynow_down"   + jpgExt;

	for (n=0; n < imgTotal; n++) {
	  iSwap[n]     = new Image();
	  iSwap[n].src = iName[n];
	}

  }

}


//parentLayer.document.childLayer similarly to how the Dynamic Layer object handles nested layers.

//You can use this function for images thar aren't even in layers, just pass null for the layer argument:

//swapImg(null,'myImg','imageB')

function swapImg(imgLayer,imgName,imgIdx) {
  if (document.images) {

    //if we are using a newer browser
    if (is_nav6up || is_ie6up || is_gecko || is_opera || is_konqueror) {
       changeSrc = eval('document.getElementById(imgName).setAttribute("src",iName['+imgIdx+'])');

    //if we are dealing with NS4 and we are inside a layer
    //we have to call the div name first
    } else if (is_nav4up && imgLayer!=null) {
       changeSrc = eval('document.layers["'+imgLayer+'"].document.images["'+imgName+'"].src=iSwap['+imgIdx+'].src');

    //otherwise if we are using IE5 or not accessing an image inside a layer
    } else {
       document.images[imgName].src = iSwap[imgIdx].src;
    }

  }
}
