// JavaScript Document
function check_pole(){
	if(document.getElementById("mform[1]").value !== "" && document.getElementById("mform[6]").value !== "")
	{
		document.getElementById("sbm").disabled = false;
	}
	else
	{
		document.getElementById("sbm").disabled = true;
	}
}

function findObj(o,d){var p,i,n;if(!d)d=document;if((p=o.indexOf("?"))>0&&parent.frames.length){d=parent.frames[o.substring(p+1)].document;o=o.substring(0,p);}if(!(n=d[o])&&d.all)n=d.all[o];for(i=0;!n&&i<d.forms.length; i++)n=d.forms[i][o];for(i=0;!n&&d.layers&&i<d.layers.length;i++) n=findObj(o,d.layers[i].document);if(!n&&document.getElementById)n=document.getElementById(o);return n;}

function preImg(){var d=document,i,a=preImg.arguments;if(d.images){if(!d.imgArr)d.imgArr=new Array();var j=d.imgArr.length;for(i=0;i<a.length;i++){if(a[i].indexOf("#")!=0){d.imgArr[j]=new Image;d.imgArr[j++].src=a[i];}}}}

function swapImg(){var i,j=0,x,a=swapImg.arguments;document.sr=new Array;for(i=0;i<(a.length-2);i+=3)if ((x=findObj(a[i]))!=null){document.sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}

function swapImgRestore(){var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}

function dw(c){ return (c)?document.writeln(c):false; }

function ow(u,w,h,t,s,c){var d=document,n="",nw,f;t=t?"yes":"no"; s=s?"yes":"no";f="toolbar="+t+",menubar="+t+",location="+t+",status="+t+",scrollbars="+s+",resizable="+s;if(w){f+=",width="+w;}else{if(d.body.clientWidth)f+=",width="+d.body.clientWidth;else f+=",width="+window.innerWidth;}if(h){f+=",height="+h;}else{if(d.body.clientHeight)f+=",height="+d.body.clientHeight;else f+=",height="+window.innerHeight;}if(c){if(w&&window.screen.availWidth)f+=",left="+Math.round((window.screen.availWidth-parseInt(w))/2);if(h&&window.screen.availHeight)f+=",top="+Math.round((window.screen.availHeight-parseInt(h))/2);}nw=window.open(u,n,f);nw.focus();}

var newwin=function(u,w,h){ow(u,w,h,true,true,true);}
var preview=function(u,w,h){ow(u,w,h,false,false,true);}
var mailWindow=function(u,w,h){ow(u,w,h,false,false,true);}
var textWindow=function(u,w,h){ow(u,w,h,false,false,true);}

function printer()
{
   docum  = document.getElementById("cont").innerHTML; 
   newWin = window.open("", "printWindow", "Toolbar=0, Location=0, Directories=0, Status=0, Menubar=1, Scrollbars=1, Resizable=1");
   newWin.document.open();
   newWin.document.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"ru\"><head><title>"+parent.document.title+"</title><meta http-equiv=\"Content-Language\" content=\"ru\" /><meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1251\" /><style type=\"text/css\" media=\"all\">@import url(\"/css/default/default.css?update\");</style><style type=\"text/css\" media=\"all\">@import url(\"/css/default/custom.css?update\");</style><style type=\"text/css\" media=\"all\">@import url(\"/css/default/w3menu_h.css?update\");</style><link rel=\"stylesheet\" type=\"text/css\" media=\"print\" href=\"print.css?update\" /></head><body><div id=\"main\"><div id=\"wrap4_new\"><div id=\"top123\"><img id=\"top-logo\" src=\"/img/default/gerb.gif\" width=\"63\" height=\"77\" alt=\"\" /><div id=\"top-logo2\"><h2><img src=\"/img/default/logo1.gif\" alt=\"Îôèöèàëüíûé ïîðòàë ÊÀÌÅÍÑÊÀ-ÓÐÀËÜÑÊÎÃÎ\" height=\"36\" width=\"180\" /><span>Îôèöèàëüíûé ïîðòàë<br /></span><span id=\"w2\">ÊÀÌÅÍÑÊÀ-ÓÐÀËÜÑÊÎÃÎ</span></h2></div></div></div><br /><div id=\"cont123\"><br />" + docum + "</div></div></body></html>");
   //newWin.printer();
   newWin.document.close();
   //alert('asda');
   //<div style=\"font-size: 14px; padding-left: 10px; padding-top: 10px;\">"+document.location.href+"</div>
}