//<!--

function close_window(url) {

	if (window.opener)

		window.close();

	else

		location = url; // Fix me: It sucks

}

// Dummy wrapper for window.open

function open_window(uri) {

	window.open(uri, 'cuscofree', 'width=600, height=600, scrollbars=yes, left=100,dependent=1,resizable=1');

	return false;

}

function delete_element() {

	document.getElementById('frm').action.value = 'remove';

	document.getElementById('frm').submit();

	return true;

}

function delete_elements() {
if(confirm('Desea eliminar realmente estos elementos?')){
document.getElementById('frm').action.value = 'removeall';
document.getElementById('frm').submit();
	return true;
}else return false;
}

function confirm_msg(msg) {

	if (!msg) msg = 'Desea eliminar realmente este elemento?';

	return confirm(msg);

}

function delete_image(image) {

	if(confirm_msg('Desea eliminar realmente esta imagen?')){

		cadena = new String(image);

		cadena.replace(/\..*/,'');

		eval("document.getElementById('"+cadena+"').style.display = 'none'");

		document.getElementById('msgtrash').style.display = 'block';

		document.getElementById('trash').value += image + ',';

	}

}



showPan = function (chk) {

	pan = document.getElementById('filespan');

	pan.style.display = (chk.checked ? 'block' : 'none');

}







//-->
