function showBlock(id){
	$(".menuBlock").css("display","none");
	$(".main_modulebody a").attr("class","");
	$(".main_modulebody a").each(function (i) {
        if($(this).attr("onmouseover")=="showBlock('"+id+"')"&&$("div").is("#"+id)){
		    $(this).attr("class","active");
		}
    });
	$("#"+id).css("display","");
}
function preload(){
	if (document.images) { 
	    var imgsrc = preload.arguments;
		arr=new Array();
		for (var j=0; j<=imgsrc.length-1; j++) { arr[j] = new Image; arr[j].src = imgsrc[j]; }
	}
}
function closeZakaz(){
    $(".makeSite").css("display","none");
    $(".prodv").css("display","none");
    $(".reklama").css("display","none");
    $(".other").css("display","none");    
}
function zakaz(first){
    if(!first){
	    $("#slidedown_content .err").remove();
		$("#slidedown_content .titleText").css("display","");
	}
    closeZakaz();
    if($("#zakaz").attr("value")=="makeSite"){
	    $(".makeSite").each(function (i) {
			$(this).css("display","");
			$("#slidedown_content .content .block .pole").css("margin-bottom","20px");
			$("#slidedown_content .content .block textarea").css("height","178px");
        });
	}
	if($("#zakaz").attr("value")=="prodv"){
	    $(".prodv").each(function (i) {
            $(this).css("display","");
			$("#slidedown_content .content .block .pole").css("margin-bottom","6px");
			$("#slidedown_content .content .block textarea").css("height","136px");
			
        });
	}
	if($("#zakaz").attr("value")=="reklama"){
	    $(".reklama").each(function (i) {
            $(this).css("display","");
			$("#slidedown_content .content .block .pole").css("margin-bottom","6px");
			$("#slidedown_content .content .block textarea").css("height","136px");
        });
	}
	if($("#zakaz").attr("value")=="other"){
	    $(".other").each(function (i) {
            $(this).css("display","");
			$("#slidedown_content .content .block .pole").css("margin-bottom","20px");
			$("#slidedown_content .content .block textarea").css("height","178px");
        });
	}
}
$(document).ready(function(){ 
	$("#zakaz").live("change",function(){
		zakaz(0);
	});
	zakaz(1);
	$(".menuBlock").hover(function () {
        }, function () { 
		    $(".main_modulebody a").each(function (i) {
            if($(this).attr("onmouseover")!=""){
		        $(this).attr("class","");
		    }
        });
        $(".menuBlock").hide();
    });
	
	//получение координат мыши

	
	$(".main_modulebody a").hover(function () {}, function (e) {//alert('main');
	    $(".menuBlock").each(function (i) {
            if(e.pageY<$(this).offset().top||e.pageY>$(this).offset().top+$(this).css("height")||e.pageX<$(this).offset().left||e.pageX>$(this).offset().left+$(this).css("width")){
			    $(".menuBlock").hide();
				$(".main_modulebody a").each(function (i) {
                    if($(this).attr("onmouseover")!=""){
		                $(this).attr("class","");
		            }
                });
			}
        });
    });
	
});

function printContact(){

    //преобразование и отправка на печать контактной информации
	$('#shemaFlash').remove();
    $('#shema').append('<img width="557" height="416" src="/images/shemapr3.jpg" alt="" />');
	window.print();
        
}


