hs.graphicsDir = '/graphics/highslide/';

hs.showCredits = 0;
hs.padToMinWidth = true;

var caption = new Array();

caption[0] = '(this.isImage && this.a.className.indexOf(\'no-caption\')) ? "<p class=\'thumb-caption\'>"';
caption[1] = 'this.thumb.alt';
caption[2] = '"</p><a class=\'left img\' href=\'#\' title=\'Print\' onclick=\'return hs.printImage(this)\'><img src=\'/graphics/print.gif\' alt=\'Print\' /></a> "';
caption[3] = '"<a class=\'left\' href=\'/my-album/?add=" + this.thumb.title + "\' title=\'Add to My Album\' onclick=\'return manageAlbum(this)\'>Add to My Album</a>"';
caption[4] = 'this.thumb.title';
caption[5] = '"<a href=\'/faq/#quickcode\' title=\'What Is This?\' onclick=\'return hs.htmlExpand(this,{objectType:\\"ajax\\"})\'>?</a>"';

imageCaption = caption.join("+") + ' : ""';
hs.captionEval = imageCaption;

// The white controlbar overlay
hs.registerOverlay({
	thumbnailId: null,
	overlayId: 'closebutton',
	position: 'top right',
	useOnHtml: true,
	fade: 2 // fading the semi-transparent overlay looks bad in IE
});

/**
* Code from http://www.boutell.com/newfaq/creating/printpart.html
*/
hs.printImage = function (el)
{
   var exp = hs.expanders[hs.getWrapperKey(el)];
   link = "about:blank";
   var pw = window.open(link, "_new");
   pw.document.open();
   pw.document.write(exp.getPrintPage());
   pw.document.close();
   return false;
};
hs.Expander.prototype.getPrintPage = function()
{
   // We break the closing script tag in half to prevent
   // the HTML parser from seeing it as a part of
   // the *main* page.

   return "<html>\n" +
      "<head>\n" +
      "<title>East Grinstead Bathrooms &amp; Kitchens</title>\n" +
      "<script>\n" +"function step1() {\n" +
      "  setTimeout('step2()', 10);\n" +
      "}\n" +
      "function step2() {\n" +
      "  window.print();\n" +
      "  window.close();\n" +
      "}\n" +
      "</scr" + "ipt>\n" +
      "</head>\n" +
      "<body onload='step2()'>\n" +
      "<p style='text-align:center'>\n" +
      "Quickcode " + this.thumb.title + "<br>\n" + 
      "<img src='" + this.content.src + "'/>\n" +
      "</p>\n" +
	  "</body>\n" +
      "</html>\n";
};

hs.lang.loadingText = '';