function openNewWindow(url, name, width, height) {
	name = name+(Math.round(Math.random() * 900) + 100);
	var win = window.open(url,name,'width='+width+',height='+height+',resizable=1,location=no,scrollbars=yes,menubar=no,status=no,toolbar=no,titlebar=yes');
}

function openNewFullSizeWindow(url, name) {
	name = name+''+(Math.round(Math.random() * 900) + 100);
	var win = window.open(url,name,'resizable=1,type=fullscreen,location=yes,scrollbars=yes,menubar=yes,status=yes,toolbar=yes,titlebar=yes');
}

function closeSelf() {
	window.close();
}

function closeAndRefreshOpener() {
	window.opener.location.reload();  
	window.close();
}

function submitAndRefreshForm(new_url) {
	var form = document.forms[0];

	if (typeof new_url == "undefined") {
		new_url = form.action;
	}
	new_url = addGetVarToURL('refresh', '1', new_url);
	form.action = new_url;

	form[form.name+'__continue1'].click();

	// make sure we call onsubmit first
//	if (form.onsubmit==null || form.onsubmit()) {
//		form[form.name+'__continue'].click();
//	}
}

function resizeSelf(width, height) {
	self.resizeTo(width, height);
}

function returnTrue() {
	return true;
}