

function getImage(vttype, opt, scurl, x, y) {
  // opt is an optional string of parameters added to the url.
  // If present, opt MUST start with a '&' and be a properly
  // formatted, URL escaped string.
  opt = opt || '';
  scurl = scurl || '';
  // x = x || 54;        // default value for width;
  // y = y || 40;        // default value for height;
  x = x || 1;        // default value for width;
  y = y || 1;        // default value for height;
  cb = new Date();
  cb = cb.getTime(); // cache buster
  durl = document.URL ;      durl = durl.replace(/&/g,'|');
  ref  = document.referrer;  ref  = ref.replace(/&/g,'|');
  document.write(
    '<img src="/image.php?' +
        'vtt=' + vttype + '&' +
        'durl=' + durl + '&' +
        'scurl=' + scurl + '&' +
        'referer=' + ref + '&' +
        'cb='  + cb  +
        opt +
        '" alt="" width="' + x +'" height="' + y + '"' + ' />'
  );
}



function showLayer2(layerName, e, content)
{
  if(document.layers){
    thisbrowser="NN4";
  }
  if(document.all){
    thisbrowser="ie"
  }
  if(!document.all && document.getElementById){
    thisbrowser="NN6";
  }

  if (document.getElementById) // Netscape 6 and IE 5+
  {
    var targetElement = document.getElementById(layerName);

    if (thisbrowser == "NN6") {
      ypos = e.pageY;
      ypos = ypos+10;
      xpos = e.pageX;

      targetElement.style.top = ypos+"px";
      targetElement.style.left = xpos+"px";
    }
    else {
      targetElement.style.top = e.clientY + document.body.scrollTop + 10;
      targetElement.style.left = e.clientX + document.body.scrollLeft;
    }

    if (content != null && content != "") {
      targetElement.innerHTML = content;
    }

    targetElement.style.visibility = 'visible';
  }
}
function hideLayer2(layerName)
{
  if (document.getElementById)
  {
    var targetElement = document.getElementById(layerName);
    targetElement.style.visibility = 'hidden';
  }
}
function toggleLayer2(layerName, e)
{
  if(document.layers){
    thisbrowser="NN4";
  }
  if(document.all){
    thisbrowser="ie"
  }
  if(!document.all && document.getElementById){
    thisbrowser="NN6";
  }

  if (document.getElementById) // Netscape 6 and IE 5+
  {
    var targetElement = document.getElementById(layerName);

    if (targetElement.style.visibility == 'visible') {
      targetElement.style.visibility = 'hidden';
    }
    else {
      if (thisbrowser == "NN6") {
        ypos = e.pageY;
        ypos = ypos + 10;
        targetElement.style.top = ypos+"px";
      }
      else {
        targetElement.style.top = e.clientY + document.body.scrollTop + 10;
      }

      targetElement.style.visibility = "visible";
    }
  }
}
function displayDepartment(departmentList)
{
    URL = "http://www.designerapparel.com/" + departmentList[departmentList.selectedIndex].value + ".html";

    window.location.href = URL;
}
function bookmarksite(title, url)
{
	if (document.all)
		window.external.AddFavorite(url, title);
	else if (window.sidebar)
		window.sidebar.addPanel(title, url, "")
}
