function format_t(obj,id) { if(obj.value=="2") { document.getElementById(id).style.display="block";} else { document.getElementById(id).style.display="none";} } function SEND_MAIL() { CLOSE('zh_mail'); var s=document.createElement("div"); s.id="zh_mail"; s.style.zIndex="1000"; // document.getElementsByTagName("body")[0].appendChild(s); //document.getElementById("fix_left").appendChild(s); document.getElementById("calc_menu").appendChild(s); s.innerHTML=' 
'; if (localStorage.getItem("send_mail")) { document.getElementById("send_email").value=window.localStorage.getItem('send_mail'); } } function SEND_MAIL_OK() { document.getElementById("result_send_mail").innerHTML=''; var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() {if (xmlhttp.readyState==4 && xmlhttp.status==200) { if (xmlhttp.responseText) { var new_mail=document.getElementById("send_email").value; document.getElementById("result_send_mail").innerHTML=xmlhttp.responseText; document.getElementById("send_email").value=new_mail; localStorage.setItem("send_mail", new_mail); if (xmlhttp.responseText=="OK") { setTimeout(CLOSE, 1000, "zh_mail"); } } }} var s_email=document.getElementById("send_email").value; pdf_href=document.getElementById("link_pdf").href; var q = pdf_href ? pdf_href.split('?')[1] : pdf_href.slice(1); xmlhttp.open('GET','http://www.zhitov.ru/gen/mpdf60/pdf3.php?'+q+'&send_mail='+s_email,true); xmlhttp.send(); } function CLOSE(ob) { if(document.getElementById(ob)) { var elem=window.document.getElementById(ob); elem.parentNode.removeChild(elem); } } window.onload = function() { function BLUR(elem) {for (i=0; i 0) { document.getElementById("upper").style.display="block"; } else { document.getElementById("upper").style.display="none";} return false; } window.onscroll = function () {det_up();} function up() { var top = Math.max(document.body.scrollTop,document.documentElement.scrollTop); if(top > 0) { window.scrollBy(0,((top+100)/-10)); t = setTimeout('up()',5); } else clearTimeout(t); return false; } function FULL(id) { parent.document.getElementById(id).className=(parent.document.getElementById(id).className == 'fullscr' ? 'frame1' : 'fullscr'); console.log('FULL'); parent.RESIZE_FRAME(); } var max_size=false; function FULL_3D() { if (max_size==false) { document.getElementById("frame3d").className="max_3d"; max_size=true; var W=document.getElementById("frame3d").offsetWidth/5*3; document.getElementById("frame3d").style.height=W+"px"; document.getElementById("calc_menu").style.display="none"; //console.log('MAX'+W); } else { document.getElementById("frame3d").className="min_3d"; max_size=false; document.getElementById("frame3d").style.height="300px"; document.getElementById("calc_menu").style.display="inline-block"; //console.log('MIN'); } } /*fullscreenEnabled=false; window.addEventListener("keyup", function(e){if (e.keyCode == 27) { fullscreenEnabled=false;}}, true); function fullScreen(element) { if(element.requestFullScreen) { element.requestFullScreen(); } else if(element.webkitRequestFullScreen) { element.webkitRequestFullScreen(); } else if(element.mozRequestFullScreen) { element.mozRequestFullScreen(); } else if(element.msRequestFullScreen) { element.msRequestFullScreen(); } fullscreenEnabled=true; } function fullScreenCancel() { if(document.requestCancelFullScreen) { document.requestCancelFullScreen(); } else if(document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } else if(document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if(document.msCancelFullScreen) { document.msCancelFullScreen(); } fullscreenEnabled=false; }*/ /*function FULL(id) { if (id=='doc') { if (fullscreenEnabled==true) { fullScreenCancel();} else { var html = document.documentElement; fullScreen(html);} } else { if (fullscreenEnabled==true) { fullScreenCancel();} else { var html = document.getElementById(id); fullScreen(html);} } }*/