function showhide(layerID, mode)
{
var currentRef = document.getElementById(layerID).style
modes = new Array
modes[0] = 'none'
modes[1] = 'block'
if(isNaN(mode))
currentRef.display = (currentRef.display == 'block') ? 'none' : 'block'
else
currentRef.display = modes[mode]
}

/* Delete scripts */

// Image
function d_img(id) {
if (confirm("WARNING:\nAre you sure you want to delete this image?"))
{
	document.location.href = id ;
}
else {
return false
}
}

// Comment
function d_com(id) {
if (confirm("WARNING:\nAre you sure you want to delete this comment?"))
{
	document.location.href = id ;
}
else {
return false
}
}

// Entry
function d_entry(id) {
if (confirm("WARNING:\nAre you sure you want to delete this entry?"))
{
	document.location.href = id ;
}
else {
return false
}
}

// Member
function d_member(id) {
if (confirm("WARNING:\nAre you sure you want to delete this member?"))
{
	document.location.href = id ;
}
else {
return false
}
}

// Group
function d_fullgroup(id) {
if (confirm("WARNING:\nAre you sure you want to delete this group?\nOnce this has been done, there is NO going back!!!)"))
{
	document.location.href = id ;
}
else {
return false
}
}

// File
function d_file(id) {
if (confirm("WARNING:\nAre you sure you want to delete this file?\nOnce this has been done, there is NO going back!!!)"))
{
	document.location.href = id ;
}
else {
return false
}
}


// Flag
function d_flag(id) {
if (confirm("WARNING:\nAre you sure you want to flag this file?"))
{
	document.location.href = id ;
}
else {
return false
}
}

// Provided by Shawn Olson & http://www.shawnolson.net
function checkUncheckAll(theElement) {
     var theForm = theElement.form, z = 0;
	 for(z=0; z<theForm.length;z++){
      if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall'){
	  theForm[z].checked = theElement.checked;
	  }
     }
    }