var used='';

function openPrintWindow(url){
   var z = window.open(url,"","fullscreen,width=1024,height=800,top=50,left=50,toolbar=no,scrollbars=yes,menubar=no,history=no,resizable=yes"); //,width=100,height=600,
   z.focus();
}

function IsEmail(str){
    var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)")
    var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,6}|[0-9]{1,3})(\\]?)$")
    return (!r1.test(str) && r2.test(str))
}

$.ajaxSetup({
    url: "/_ajax.php",
    type: "POST",
    error: ajaxError,
    dataType: "json",
    contentType: "application/x-www-form-urlencoded"
});

function ajaxError(XMLHttpRequest, textStatus, errorThrown){ // обработчик ошибки 
    //alert(textStatus);
    return true;
}


