function swapClass(obj, cls) {
  obj.className = cls;
}

function cancelPopup() {
	self.close();
}

function closePopup(forward) {
	
	if (forward!="") {
			opener.location=forward;
	}
	else {
			opener.location.reload();
		}
	
	self.close();
	
}

function openWindow(url, name, attributes, w, h, center) {

	if (attributes.indexOf("status") < 0) {
		attributes += ", status";
	} 
	
	var str = "'" + attributes + ", width=" + w + ", height=" + h;

	if (center=="true") {
		var l = Math.floor((screen.width - w) / 2);
		var t = Math.floor((screen.height - h) / 2);
	    str += ", left=" + l + ", top=" + t
	}
	str += "'"

	var newWindow = window.open(url, name, str);
	newWindow.focus();
}

function deleteItem(msg) {
	return confirm(msg)
}

 
 

 
 



