function popupcentrata(path,w,h) {
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
      window.open(path,"","width=" + w + ",height=" + h + ",top=" + t + ",left=" + l +",scrollbars=yes");
}

function debug(obj) {
	out = '';
	for (x in obj) {
		out += x+" "+obj[x]+" \n";
	}
	alert(out);
}