// add script as you please

//Aaron's open window function
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// confirm boxes for highlights manager
function deletearticle(theid) {
    if(confirm("Are you sure you want to delete this highlight?")) {
	  window.location="?delete=" + theid;
    }
  }
  
// checks for empty fields in highlights manager
function checkmodifyform ( form )
{
    if (form.modifytitle.value == "") {
        alert( "You must have a title before the article can be modified." );
        form.modifytitle.focus();
        return false ;
    }
	if (form.modifylink.value == "") {
        alert( "You must have a link before the article can be modified." );
        form.modifylink.focus();
        return false ;
    }
	if (form.modifyimage.value == "") {
        alert( "You must have an image path before the article can be modified." );
        form.modifyimage.focus();
        return false ;
    }
	if (form.modifytext.value == "") {
        alert( "You must have content text before the article can be modified." );
        form.modifytext.focus();
        return false ;
    }
	return true ;
}

function checknewform ( form )
{
    if (form.newtitle.value == "") {
        alert( "You must have a title before the article can be saved." );
        form.newtitle.focus();
        return false ;
    }
	if (form.newlink.value == "") {
        alert( "You must have a link before the article can be saved." );
        form.newlink.focus();
        return false ;
    }
	if (form.newimage.value == "") {
        alert( "You must have an image path before the article can be saved." );
        form.newimage.focus();
        return false ;
    }
	if (form.newtext.value == "") {
        alert( "You must have content text before the article can be saved." );
        form.newtext.focus();
        return false ;
    }
	return true ;
}

// add quotes for membership form
function add_quotes (str) {
   str = "'" + str + "', ";
   return str;
}