<!--
function Openme(newin) {
flyout=window.open(newin,"flyout","resizable=no,scrollbars=yes,width=800,height=500,top=300,left=300")
}
// -->
function changeImage(img) {
 
 var imageName;
 for (i = 1; i <= 5; i++) {
  imageName = "image" + i; 
  if (document.getElementById(imageName)) {
   document.getElementById(imageName).style.display='none';
  }
 }
 
 document.getElementById(img).style.display='block';
 
}
function ResizeToFit(dlg, picHeight, picWidth) {

 var imgWidth;
 var imgHeight;

 imgWidth = picWidth + 60; 
 imgHeight = picHeight + 110;
 dlg.resizeTo(imgWidth, imgHeight);
}

function showImage(img) {
//var len = addImgs.length; 
//alert(ln);
var imageName;
 for (i = 0; i < 5; i++) {
  imageName = "image" + i; 
  if (document.getElementById(imageName)) {
   document.getElementById(imageName).style.display='none';
  }
 }
 document.getElementById('picImg').src= document.getElementById(img).src;
// document.getElementById(img).sytle.background = "url("+path+")";
 
 
}

function displayImages(name, width, height,img, aimg1, aimg2, aimg3){
var lenarg = arguments.length;
var arg = 3;
//var temp = arguments[5];
//alert(temp);
//alert(lenarg);
 features = 
    "toolbar=no,location=no,directories=no,status=no,menubar=no," +
    "scrollbars=yes,resizable=no,width=" + width +" ,height=" + height;
 dlg = window.open ("","Details",features);
 dlg.document.write("<html><head><title>" + name + " Zoom</title><link type=\"text/css\" rel=\"stylesheet\" href=\"http://yst.equestrian-tack.com/css/style.css\" /><script type=\"text/javascript\" src=\"http://yst.equestrian-tack.com/js/popup.js\"></script></head>");
 dlg.document.write("<body bgcolor=white onLoad=\"javascript:opener.ResizeToFit(self, img.height, img.width);\"><center>");
 dlg.document.write("<table width=\"550\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\"><tr><td align=\"left\" valign=\"top\" class=\"enlarge-main-area\"><table width=\"528\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td align=\"left\" valign=\"top\" class=\"enlarge-header\"><a href=\"javascript:window.close();\"><img src=\"http://yst.equestrian-tack.com/images/btn-close.jpg\" width=\"68\" height=\"20\" border=\"0\" class=\"btn-close\"></a><img src=\"http://yst.equestrian-tack.com/images/enlarge-logo.jpg\" width=\"279\" height=\"49\" border=\"0\"></td></tr><tr><td align=\"left\" valign=\"top\" class=\"enlarge-mid-area-bg\"><table width=\"460\" border=\"0\" align=\"left\" cellpadding=\"0\" cellspacing=\"0\"><tr><td align=\"left\" valign=\"top\" class=\"enlarge-name\">" + name +"</td></tr><tr><td align=\"left\" valign=\"top\" class=\"enlarge-img-area\"><a href=\"#\"><img src=" + img + " name=\"picImg\" id=\"picImg\" /></td></tr>");
 
 if(lenarg > 4)
 {
 dlg.document.write("<tr><td align=\"left\" valign=\"top\">");

	for(var n=0;n<=lenarg-4;n++)
	{
		dlg.document.write("<a href='javascript:showImage(\"img"+n+"\")'><img id=img"+n+" src=" + arguments[arg] +" alt=\"Bowser Ball Dog Bed\" border=\"0\" vspace=\"0\" width=\"84\" height=\"59\" hspace=\"0\" class=\"thumbnail-brd\"></a>");
		arg++;
	}
	 dlg.document.write("</td></tr>");
 }
 dlg.document.write("</table></td></tr><tr><td align=\"left\" valign=\"top\"><img src=\"http://yst.equestrian-tack.com/images/enlarge-box-btm-crv.jpg\" width=\"528\" height=\"3\" border=\"0\"></td></tr></table></td></tr></table></body></html>");

 dlg.document.close();
}