\n');
}
function updateAutoPay(chk)
{
var val='';
if(chk) val='&val=1';
var src_url="/index.php?Action=SetClientAutoPayment"+val;
var callback = function(response_text, response_xml){
//console.log(response_text);
};
return aarq( src_url, callback);
}
function myclose()
{
//console.log(ID_Connection);
if(ID_Connection!=null)
{
var src_url="/index.php?Action=ClosePrivate&id_conn="+ID_Connection;
var callback = function(response_text, response_xml){
//console.log(response_text);
};
sleep(0.5);
aarq2( src_url, callback);
//alert('zzz');
}
}
function sleep(naptime){
naptime = naptime * 1000;
var sleeping = true;
var now = new Date();
var alarm;
var startingMSeconds = now.getTime();
// alert("starting nap at timestamp: " + startingMSeconds + "\nWill sleep for: " + naptime + " ms");
while(sleeping){
alarm = new Date();
alarmMSeconds = alarm.getTime();
if(alarmMSeconds - startingMSeconds > naptime){ sleeping = false; }
}
// alert("Wakeup!");
}
function center_popup(name)
{
var elm = document.getElementById(name);
//var offs = getScrollOffsets ();
var vdim = {width: document.documentElement['clientWidth'] || document.body['clientWidth'],
height: document.documentElement['clientHeight'] || document.body['clientHeight']};
var x = (vdim.width - ($(elm).width()||820)) /2;// + offs.left;
// document.title = x+";"+$(elm).width();
var y = (vdim.height - ($(elm).height()||320)) /2;// + offs.top;
if(y<0)y=0;
if(x<0)x=0;
var popups = $('#'+name).parents("div.popup");
for(var i=0;i
sebcams!