//экранирует символ точки двойным. ТЕПЕРЬ ЭТО МЕТОД ЛЮБОЙ СТРОКИ! 
String.prototype.d = function() {
	return this.replace(/\./g, '\\.');
}


/*
$(document).ready(function() {
	$('.SuperMenu').find('A').each(function() {
		text_link.replace();
	});
});
*/


if(typeof window.openWindow == 'undefined') {
	function openWindow(url,width,height) {
		
		url = url.replace(/\.$/, '');
		url = url.replace(/\.(gif|jpg)/, '');
		
		win = window.open("","win","width="+(width+22)+", height="+(height+22)+",top=200,left=200, titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes");
		win.document.open();
		win.document.write(
				"<html>" +
				"<head>" +
					"<script type='text/javascript' src='/jquery-1.2.6.min.js'></script>" + 
					"<title></title>" +
				"</head>" +
				"<body style='margin:0px; padding:10px; background:#D7DAEB;'>" +
					"<center><img style='border:1px solid white;' src='"+url+".jpg' onError='$(this).hide()' onLoad='window.resizeTo($(this).width() + 100, $(this).height() + 100)'></center>" +
					"<center><img style='border:1px solid white;' src='"+url+".gif' onError='$(this).hide()' onLoad='window.resizeTo($(this).width() + 100, $(this).height() + 100)'></center>" +
				"</body>" +
				"</html>");
		win.document.close();
	}
}

if(typeof window.zapis == 'undefined') {
	function zapis() {
		window.open("/zapis/", "zapis", "width=500, height=410, titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes");
	}
}

