window.setInterval('ping()', 30000); // 900000 -> sending a ping every 15minutes
function ping() {
	xhr('GET'
		, '/ping.php'
		, ''
		, pong)
}
function pong(handler) {}
function popup(w,h,site) {
	x = screen.availWidth/2-w/2;
	y = screen.availHeight/2-h/2;
	var popupWindow = window.open(
		site
		,'HQ!'
		,'width='+w+'\
		,height='+h+'\
		,left='+x+'\
		,top='+y+'\
		,screenX='+x+'\
		,screenY='+y+'\
		,dependent=yes\
		,resizable=yes\
		,toolbars=yes\
		,scrollbars=yes'
	);
	popupWindow.focus();
}
function sizebar_start() {
	var hold = true;
	var hold_start_x = eventX;
	var hold_start_y = eventX;
}
function sizebar_move() {
	var pic = document.getElementById('Module_Image_active');
	var width = pic.width;
	var height = pic.height;
	alert(width+height);
}
function sizebar_stop() {
	var hold = false;
}
function show_maxlen(show, input) {
	document.getElementById(show).textContent =
	(input.getAttribute('maxlength') - input.value.length);
}