//
// func.js
// Deep (c) 2009
// Jocke Ling
//

/**
 * Update inner html in a html tag
 *
 * @param  {string}		id			id of tag
 * @param  {string}		str			text to display
 * @return {boolean}
 */
function updateTitleText(id, str) {
	var ele = document.getElementById(id);

	// verify that tag exists before using it
	if (null === ele)
		return false;

	// put in html
	ele.innerHTML = str;
	return true;
}

window.openResizable = function (url, w, h) {
	var left = Math.floor((screen.width - w) / 2);
	var top  = Math.floor((screen.height - h) / 2);
	return this.open(url, '', "resizable=yes, status=no, width="+w+",height="+h+",top="+top+",left="+left);
}

function popup(page) {
	window.open(page, '', 'scrollbars=yes,directories=no,height=500,width=400,menubar=no,resizable=yes,status=no,titlebar=no,toolbar=no');
	return false;
}
