
function link(link){
    
location.replace(link);    
    
}

   function mail_field() {
  
    var req = new JsHttpRequest();
    
       req.onreadystatechange = function() {
        
        if (req.readyState == 4) {
    
document.getElementById("mail_field").innerHTML = req.responseJS.okey;

        }
    }
   
    req.open(null, 'components/mail_field.php', true);
   req.send( { q: "1"} );
   }
   
   
         function cashout(naz) {
       var req = new JsHttpRequest();
   req.onreadystatechange = function() {
        if (req.readyState == 4) {
document.getElementById("cashout_error").innerHTML = "<br>"+ req.responseJS.error;
if (req.responseJS.error2 == "1") {
setTimeout("link_personal()", 2000);     

} else {setTimeout("del_cashout_error()", 3000); }
    }
    }

    req.open(null, 'components/cashout_ok.php', true);
   req.send( { q: document.getElementById("money").value + "+++" +  document.getElementById("schet").value + "+++" + naz} );
   }
         function deposit(naz) {
       var req = new JsHttpRequest();
   req.onreadystatechange = function() {
        if (req.readyState == 4) {
document.getElementById("cashout_error").innerHTML = "<br>"+ req.responseJS.error;

    }
    }

    req.open(null, 'components/deposit_ok.php', true);
   req.send( { q: document.getElementById("money").value + "+++" + naz} );
   }
