// view course content
function vcc(whichCourse)
{
	vcc = open(whichCourse);
}

function confirm_delete(delDesc)
{
  return confirm("Are you sure you want to delete the " + delDesc + "?\n\nPress \'Ok\' to continue or \'Cancel\' to return to the page.");
}

function select_deselectAll (checkState) 
{ 
    var frm = document.forms[0];
    // Loop through all elements
    for (i=0; i<frm.length; i++) 
    {
		if( frm.elements[i].type == "checkbox")
			frm.elements[i].checked = checkState;
    }
}

function multiple_confirmDelete(frm, delDesc) 
{ 
    // loop through all elements
    for (i=0; i<frm.length; i++) 
    {
        // Look for our checkboxes only
        if (frm.elements[i].name.indexOf("DeleteThis") !=-1) 
        {
            // If any are checked then confirm alert, otherwise nothing happens
            if(frm.elements[i].checked) 
				return confirm ("Are you sure you want to delete the " + delDesc + "?\n\nPress \'Ok\' to continue or \'Cancel\' to return to the page.");
        }
    }
    
    return false;
}
