function confirmAction(msg) {
	if(confirm(msg)) {
		return true;
	}
	return false;
}

var popwin;
function openWin(isurl, winw, winh, resize) {
	var x = screen.availWidth;
	var y = screen.availHeight;
	var width = winw;
	var height = winh;
	var left = (x - width) / 2;
	var top = (y - height) / 2;
	var url = isurl.lastIndexOf("?") != -1 ? (isurl.lastIndexOf("#") != - 1 ? isurl.replace("#", "&popup=1#") : isurl+"&popup=1") : (isurl.lastIndexOf("#") != -1 ? isurl.replace("#", "?popup=1#") : isurl+"?popup=1");
	popwin = window.open(url,"popupwin","toolbar=0,location=0,directories=0,menuBar=0,scrollbars="+resize+",resizable="+resize+",top="+top+",left="+left+",width="+width+",height="+height);
	popwin.focus();
	popwin = null;
	return false;
}

function toggleInput(obj, defaultVal) {
	if(obj.value == defaultVal) {
		obj.value = '';
	} else if(obj.value == '') {
		obj.value = defaultVal;
	}
}

function toggleDisabled(id) {
	var obj = document.getElementById(id);
	obj.disabled = obj.disabled ? false : true;
}