var pr_view=false;function send_form(mf){var myform=mf;error=0;$(".required").each(function(){res=$(this).val();if($.trim(res).length==0){$(this).css("border","1px solid red");error=1}else{$(this).css("border","1px solid #6ebd2c")}});if(!error){myform.submit();return true} return false}function clearSearch(elm){var obj=elm;if(jQuery.trim(obj.value).length==0){obj.value='Введите интересующее вас слово...'}}function reloadDoc(){$("#all").css("height",'100%');var h=$("#all").height();if(h<window.innerHeight){$("#all").css("height",window.innerHeight-5)}}function ZoomIn(elm,src_big,alt){offset=elm.offset();$("#main_pic").html("<a href='/gallery/' title='"+alt+"'><img src='"+src_big+"' style='width:130px; height:130px' alt='"+alt+"' /></a>");$("#main_pic").css({left:offset.left-25,top:offset.top-25,display:"block",opacity:0});$("#main_pic").stop().animate({width:"130px",height:"130px",opacity:1},800)}function Helpful(elm,mod,lnk){var obj=elm;var m=mod;var link=lnk;$.post('/API/helpful.php',{mdl:m,v:obj.val(),link:link},function(data){$(".helpful").html(data)})}function GetRezume(id,offset){var spec=id;var of=$(window).scrollTop()+50;var leftof=Math.round($(document).width()/2)-150;$("#all").addClass('shadow');$(".progress").css({'display':'block'}).css({'position':'absolute','top':of+200,'left':leftof+200});$("#popup").css({display:'block'},{filter:'alpha(opacity=100)'}).css({'position':'absolute','top':of,'left':leftof}).animate({opacity:1},800);$.post('/includes/docrezume.php',{spc:spec},function(data){$(".progress").css({display:'none'});$("#popup").html(data)})}function GetVideo(id){var spec=id;var of=$(window).scrollTop()+50;var leftof=Math.round($(document).width()/2)-150;$("#all").addClass('shadow');$(".progress").css({display:'block','position':'absolute','top':of+200,'left':leftof+200});$("#popup").css({'display':'block'},{'filter':'alpha(opacity=100)'}).css({'position':'absolute','top':of,'left':leftof}).animate({opacity:1},800);$.post('/includes/docvideo.php',{spc:spec},function(data){$(".progress").css({display:'none'});$("#popup").html(data)})}function Online(){$("#online").load('/API/online.php')}function GoToLink(link){if(link!=""){window.location.href=link}}var opener="";function ShowZapis(offset){if($("#popup_top").css('display')=='block'&&opener=="z"){opener="";$("#popup_top").slideUp('fast',function(){$("#popup_top_cont").html("");$('#zapis').removeClass('active')})}else{var top=offset.top+32+"px";var left=offset.left+"px";$.post('/includes/callback_form.php',function(data){opener='z';$(".corner").css({margin:'-24px 0 0 60px'});$("#popup_top_cont").html(data);$("#popup_top").css({top:top,left:left}).slideDown('500',function(){$('#zapis').addClass('active')})})}}function ShowQuestion(offset){if($("#popup_top").css('display')=='block'&&opener=="q"){opener="";$("#popup_top").slideUp('fast',function(){$("#popup_top_cont").html("");$('#question').removeClass('active')})}else{opener="q";var top=offset.top+32+"px";var left=offset.left-200+"px";$.post('/includes/question_form.php',function(data){$(".corner").css({margin:'-24px 0 0 253px'});$("#popup_top_cont").html(data);$("#popup_top").css({top:top,left:left}).slideDown('500',function(){$('#question').addClass('active')})})}}function ShowContact(offset){if($("#popup_top").css('display')=='block'&&opener=="c"){opener="";$("#popup_top").slideUp('fast',function(){$("#popup_top_cont").html("");$('#contact').removeClass('active')})}else{opener="c";var top=offset.top+32+"px";var left=offset.left-350+"px";$.post('/includes/contact.php',function(data){$(".corner").css({margin:'-24px 0 0 400px'});$("#popup_top_cont").html(data);$("#popup_top").css({top:top,left:left}).slideDown('500',function(){$('#contact').addClass('active')})})}}function ShowProjects(offset){if($("#popup_top").css('display')=='block'&&opener=="p"){opener="";$("#popup_top").slideUp('fast',function(){$("#popup_top_cont").html("");$('#contact').removeClass('active')})}else{opener="p";var top=offset.top+32+"px";var left=offset.left-100+"px";$.post('/includes/sites.php',function(data){$(".corner").css({margin:'-24px 0 0 130px'});$("#popup_top_cont").html(data);$("#popup_top").css({top:top,left:left}).slideDown('500',function(){$('#projects').addClass('active')})})}}function send_zapis_form(mf){var myform=mf;var w=$("#popup_top").width();error=0;$(".required").each(function(){res=$(this).val();if($.trim(res).length==0){$(this).css("border","1px solid red");error=1}else{$(this).css("border","1px solid #6ebd2c")}});if(!error){$.post('/includes/sendform_z.php',{fname:myform.fname.value,lname:myform.lname.value,phone:myform.phone.value,email:myform.email.value,specid:myform.specid.value,text:myform.text.value},function(data){$("#popup_top").css({width:w});$("#popup_top_cont").html(data)});return false}return false}function send_question_form(mf){var myform=mf;var w=$("#popup_top").width();error=0;$(".required").each(function(){res=$(this).val();if($.trim(res).length==0){$(this).css("border","1px solid red");error=1}else{$(this).css("border","1px solid #6ebd2c")}});if(!error){for(var i=0;i<myform.direction.length;i++)if(myform.direction[i].checked)var dr=myform.direction[i].value;$.post('/includes/sendMessage.php',{fname:myform.fname.value,lname:myform.lname.value,phone:myform.phone.value,email:myform.email.value,special:myform.special.value,q:myform.q.value,direction:dr,site:myform.site.value,retPath:myform.retPath.value},function(data){$("#popup_top").css({width:w});$("#popup_top_cont").html(data)});return false}return false}
