function xwin(url, name, width, height, features){
	var l = (window.screen.availWidth) ? (window.screen.availWidth - width)/2 : 0;
	var t = (window.screen.availHeight) ? (window.screen.availHeight - height)/2 : 0;
	if (typeof(features) == 'string')
		features = ',' + features;

	var w = window.open(url, name, 'top=' + t + ',left=' + l + ',height=' + height + ',width=' + width + ', scrollbars=auto' + features);
	if (!w) return;
	w.resizeTo(width, height);
	return w;
}

function debugElement(elem) {
	str = "";
	j = 0;
	for (i in elem) {
		//str+="<center><big>" + i + "</big></center><br/>\n";
		str+=i + "\n";
		j++;
		if (j==20) {
			//document.write(str);
			alert(str);
			str="";
			j = 0;
		}
	}
}

