
// open a popup window with the product detail

var pic = new Image();
var title = null;
var faux = null;

function copyCat(title, pic, width, height) {
  faux = window.open('','newWin','dependent,resizable,top=75,left=75,width=' + width + ',height=' + height + '');
  var fd = faux.document;
  fd.open();
  fd.write('<html>\r<head>\r\r<title>Peskyho - ' + title +'</title>\r\r<style type="text/css">img {border: 0}</style>\r\r</head>\r\r');
  fd.write('<body bgcolor="#ffffff" onload="window.focus()" onblur="self.close()">\r\r');
  fd.write('<table class="detail" align="center" border="0" cellpadding="0" cellspacing="0">\r');
  fd.write('\t<tr valign="top"><td align="center" valign="middle"><a href="javascript:window.close()"><img src="' + '../images/details/' + pic + '_detail.gif" alt=""></a></td></tr>\r');
  fd.write('\t<tr valign="top"><td align="right"><a href="javascript:window.close()" title="Close window"><img src="../images/rollovers/closeWindow.gif" class="closeWindow" width="16" height="16" vspace="10" alt="" title="Close window"></a></td></tr>\r');
  fd.write('</table>\r\r</body>\r</html>');
  fd.close();
}

// change the product graphic

function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  }
}

if (document.images) {

  classicT_back = new Image();
  classicT_back.src = "../images/products/classicT_back.gif";

  defaultShirt = new Image();
  defaultShirt.src = "../images/products/classicT.gif";

  classicT = new Image();
  classicT.src = "../images/products/classicT.gif";

  classicT_white = new Image();
  classicT_white.src = "../images/products/classicT_white.gif";

  girlie = new Image();
  girlie.src = "../images/products/girlie.gif";

  girlie_white = new Image();
  girlie_white.src = "../images/products/girlie_white.gif";

  duh = new Image();
  duh.src = "../images/products/umc_polo_duh.gif";

  fuk = new Image();
  fuk.src = "../images/products/umc_polo_fuk.gif";

  vNeck = new Image();
  vNeck.src = "../images/products/vNeck.gif";

}

// change the product color
function changeProductColor(whichColor){

var newColor = null;

if (whichColor=='black'){
newColor = '#000000'
}
else if (whichColor=='carmine'){
newColor = '#cc3333'
}
else if (whichColor=='chocolate'){
newColor = '#330000'
}
else if (whichColor=='ink'){
newColor = '#000033'
}
else if (whichColor=='olive'){
newColor = '#666633'
}
else if (whichColor=='peony'){
newColor = '#ff6666'
}
else if (whichColor=='rose'){
newColor = '#ffcccc'
}
else if (whichColor=='sky'){
newColor = '#ccffff'
}
else if (whichColor=='white'){
newColor = '#ffffff'
}
else {
newColor = '#ffffff'
}

if (document.all) {
  document.all.productColor.style.backgroundColor = newColor;
	}
else if (document.getElementById) {
  document.getElementById('productColor').style.backgroundColor = newColor;
	}
else if (document.layers) {
  document.productColor.bgColor = newColor;
	}
}
