function confirmDelete(url)
{
	if (confirm("Are you sure you want to delete this item?\nThis action is cannot be undone."))
	{
		location.href = url;
	}
}

function getStyleObject(objectId) {
    // cross-browser function to get an object's style object given its id
    if(document.getElementById && document.getElementById(objectId)) {
	// W3C DOM
	return document.getElementById(objectId).style;
    } else if (document.all && document.all(objectId)) {
	// MSIE 4 DOM
	return document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
	// NN 4 DOM.. note: this won't find nested layers
	return document.layers[objectId];
    } else {
	return false;
    }
}

function doDisplay(objectId) {
   object = getStyleObject(objectId);
   if (object.display == 'none' || object.display == '')
       object.display='block';
   else
       object.display='none'; 
}

var newWin;

function zoom(id,w,h,path) {
	if (!newWin || newWin.closed) {
		newWin = window.open('wm.php?id='+id+'&path='+path,'newWin','width='+w+',height='+h+',resizable=no,scrollbar=no');
		newWin.focus();
	} else {
        newWin.close();
		newWin = window.open('wm.php?id='+id+'&path='+path,'newWin','width='+w+',height='+h+',resizable=no,scrollbar=no');
		newWin.focus();
	}
}

var chatWin;

function chat() {
	if (!chatWin || chatWin.closed) {
		chatWin = window.open('chat/index.php','chatWin','width=550,height=350,resizable=no,status=no,scrollbar=no');
		chatWin.focus();
	} else {
		chatWin.focus();
	}
}