// Delete an Thing from the database by ID
function DeleteThing(Name, URL, from) {
Yes = confirm("Are you sure you want to remove "+Name+" "+from+"");
	if ( Yes ) {

	location.href=URL;

	}
}

// Open and close content
function tierPlainContent(objMenu)
{
   var myElement = document.getElementById(objMenu); 
   if (myElement.style.display == "none")
   {
       myElement.style.display = "block";
   }
   else
   {
       myElement.style.display = "none";
   }
}
function tierFAQ(objMenu,objImage)
{
   var myElement = document.getElementById(objMenu,objImage); 
   if (myElement.style.display == "none")
   {
       myElement.style.display = "block";
       objImage.src = "images/arr.up.gif";
   }
   else
   {
       myElement.style.display = "none";
       objImage.src = "images/arr.down.gif";
   }
}

// Open and close content
function LoginBox(){

   if (document.getElementById('li').style.display == "none")
   {
       document.getElementById('li').style.display = "block";
			 document.getElementById('pw').style.display = "none";
   }
   else
   {
       document.getElementById('li').style.display = "none";
			 document.getElementById('pw').style.display = "none";
   }
}

// Open and close content
function PasswordBox(){

   if (document.getElementById('pw').style.display == "none")
   {
       document.getElementById('li').style.display = "none";
			 document.getElementById('pw').style.display = "block";
   }
   else
   {
       document.getElementById('li').style.display = "none";
			 document.getElementById('pw').style.display = "none";
   }
}

// Open a new window
function OpenThis(thisURL,thisName,thisW,thisH)
  {
   window.open(thisURL,thisName,'left=100,top=100,toolbar=0,location=0,directories=0,status=0, menubar=0,scrollbars=1,resizable=0,width='+thisW+',height='+thisH);
  }


// toggle row bgcolors and set active row bgcolor
var activeRow = null;
	
function rowOver(whichEl) {
	if ((!activeRow) || (activeRow && activeRow != whichEl)) whichEl.className = "row-over";
}

function rowOut(whichEl) {
	if ((!activeRow) || (activeRow && activeRow != whichEl)) whichEl.className = "row";
}

function rowClick(whichEl) {
	if (activeRow && activeRow != whichEl) activeRow.className = "row";
	whichEl.className = "row-active";
	activeRow = whichEl;
}

//Validate the login form 
 function valLogin (which){
 	if (which.Email.value=='') {
		alert ("Please enter your email address");
		which.Email.focus();
		return false;
	}
	else if (which.Password.value=='') {
		alert ("Please enter your password");
		which.Password.focus();
		return false;
	}
	else {
		return true;
	}
 }
 
 function checkit(){
	document.Add_Form.addtobox.className = 'lightboxon';
	document.Add_Form.addtobox.disabled = false;
 }
 