<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->

function LoadPage(width,height,Path_f,top,left,not_focus)
<!----Открытие окна----->
	{
	        date=new Date();
		sec=date.getSeconds();
		name="MW0"+String(sec);		
		//alert(name);
		if(top==null){
			top=150;
		}
		if(left==null){
			left=15;
		}
						
		strParam = "top="+top+", left="+left+", width="+width+", height="+height+", toolbar=no, menubar=no, location=no, directories=no, scrollbars=yes";
		objNewWindow=window.open(Path_f,"", strParam);
		if (not_focus==1) {
			parent.focus(); 
		} else {
			objNewWindow.focus();
		}
	}

function CWIN()
<!----Закрыть окно----->
	{
		window.close() ;
	}

function SendMail(id)
{
	strParam = "top=10, left=10, width=610, height=460, toolbar=no, menubar=no, location=no, directories=no, scrollbars=yes";
	objNewWindow=window.open(id, "MyWin", strParam);
}

function ClearSearch() {
	if((document.form5.email_.value == "Новая информация"))
	{
		document.form5.email_.value = "";
	}
}


function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}


function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

function rubrics_show(divid) {
if(document.all[divid].style.display=='block'){
document.all[divid].style.display='none';
}else{
document.all[divid].style.display='block';
}
}

function price_refresh_new(divid, divid2) {
var k;
k=document.krform.elements["kolrec"].value;
var d, d2;
d=divid+'_rec';
d2=divid2+'_rec';
for (i=1; i<k; i=i+1) {
document.all[d2+i].style.display='none';
document.all[d+i].style.display='block';
}
}

function price_refresh(divid, divid2) {
for (i=1; i<=201; i=i+1) {
document.all[divid2+i].style.display='none';
document.all[divid+i].style.display='block';
}
}

function CheckAll(Element,Name)
{
		thisCheckBoxes = Element.parentNode.parentNode.parentNode.getElementsByTagName('input');
		for (i = 1; i < thisCheckBoxes.length; i++) {
			if (thisCheckBoxes[i].name == Name){
				thisCheckBoxes[i].checked = Element.checked;
			}
		}
}

