function restore_srch(){
	if(document.getElementById('srch').value == ''){document.getElementById('srch').value = '����� �� �����';}
}

function restore_mail(){
	if(document.getElementById('mail').value == ''){document.getElementById('mail').value = '������� ��� e-mail';}
}

function sbEscapeEx(str)
{
	return encodeURI(str);
}

function sbGetCookie(c_name) {
   var search = c_name + "="
   var returnValue = "";

   if (document.cookie.length > 0)
   {
      var offset = document.cookie.indexOf(search)
      if (offset != -1)
      {
         offset += search.length
         var end = document.cookie.indexOf(";", offset);
         if (end == -1) end = document.cookie.length;
            returnValue=unescape(document.cookie.substring(offset, end));
      }
   }
   return returnValue;
}

function sbSetCookie(c_name, c_value, c_expires, c_path, c_domain, c_secure) {
   var curCookie = c_name + "=" + sbEscapeEx(c_value) +
   ((c_expires) ? "; expires=" + c_expires.toGMTString() : "") +
   ((c_path) ? "; path=" + c_path : "") +
   ((c_domain) ? "; domain=" + c_domain : "") +
   ((c_secure) ? "; secure" : "");

   document.cookie = curCookie;
}
function PrintOpenWin(path, page_title) {
  var wnd1 = window.open('', "binn_popup_image", "fullscreen=yes,scrollbars=yes,toolbar=no,location=no,status=no,resizable=yes,left=0,top=0");
  wnd1.document.write('<html><title>Версия для печати страницы: ' + page_title + '</title><body style="color:#00000; font-family: Arial, Helvetica, sans-serif; font-size:12px; margin:10px 10px 10px 10px; padding:0px; background:#FFFFFF;">' + document.getElementById('for_printer').innerHTML + '<div align="right">' + path + '</div><hr><div align="center"><A HREF="javascript:window.print()"><b>[Распечатать]</b></A></div></body></html>');
  wnd1.focus();
}
