function PrintContent(parseImages)
{
	var setting="toolbar=yes,location=no,directories=yes,menubar=yes,scrollbars=yes,width=700, height=600, left=100, top=25";
	var content = document.getElementById("content");
	if (content == null)
		content = document.getElementById("content1");
	var data = content.innerHTML;

	if(parseImages)
	{
		if (prevImages != undefined && prevImages.length > 1) {
			
			var ul = "<ul>"
			for(i = 0; i < prevImages.length; i++) {
				ul = ul + "<li style='float:left;padding-right:15px;'><img width='271' height='152' src='"+ prevImages[i] +"'/> </li>"
			}
			ul = ul + "</ul>";
			data = data.replace(/(<div\sclass="image_object")/ig, ul +"$1 style='display:none;'");
			data = data.replace(/(<div\sclass=image_object)/ig, ul +"$1 style='display:none;'");
		}
	}
	var contactinfo = document.getElementById("ContactInfo").innerHTML;
	var d = new Date();
	
	
	var doc = window.open("", "", setting);
	doc.document.open();
	doc.document.write("<html><head>");
	doc.document.write("<title>JRC | " + window.parent.document.title + "</title>");
	doc.document.write("");
	doc.document.write("</head><body class='print'>");
//	doc.document.write("<div style=\"text-align:center;\"><input type=\"button\" style=\"123:\" value=\"" + printButtonCaption + "\" onclick=\"self.print();window.close();\"></div>");	
	doc.document.write("<img src='/files/images/head.png' style='width:680px;'>");
//	doc.document.write("<div id=\"measurer\"></div>");
	doc.document.write("<div id=\"layout\">");
	doc.document.write("<div id=\"head\">");
	//doc.document.write("<div class=\"logo\"><a href=\"#\"></a></div>");
	//doc.document.write("<div class=\"time\"><p><a href=\"http://www.justreal.ru\" target=\"_blank\">www.justreal.ru</a></p></div><br class=\"clear\" /></div>");
	doc.document.write("<div class=\"zone\"><div class=\"common content\">");
	doc.document.write(data);
	doc.document.write("</div></div></div>");
//	doc.document.write("</div></div><div  id=\"footer\"><div class=\"contact_info\">" + contactinfo +"</div></div></div>");
	doc.document.write("<img src='/files/images/foot.png' style='width:680px;'>");
	doc.document.write("</body></html>");
	doc.document.close();
	doc.focus();
}

function DoSearch(event)
{
	if (event.keyCode == 13){
		var searchButton;
		if (event.target != undefined)
			searchButton = 	event.target.attributes['searchButton'];
		else 
			searchButton = event.srcElement.attributes['searchButton'];
		$(searchButton.value).onclick();
	}
	return true;
}
function SetPrintInfo(parseImage) {
    var path = "http://justreal/handlers/GetPDFHandler.ashx?url_document=" + window.location.href + "&parseImage=" + parseImage;
var ajax = new ajax(path, { method: "get" });
ajax.AddEvent("onComplete", function (data) {});
}
