<!-- Common Site JS -->

function PopupWindow( url )
{
	winParams='toolbar=no,status=no,resizable=yes,scrollbars=yes';	
	window.open( url, 2, winParams );
}

function ConfirmDeleteCourse(courseid, coursename, uid)
{
    var message = "You are about to delete " + coursename + ".  Any rounds for this user at this course will be lost.  Type the word DELETE to confirm.";
    var def = "";
    var rv = prompt(message,def);

    if ( rv.toLowerCase() == 'delete' )
    {
       window.location = 'mycourses.php?action=delete&courseid=' + courseid + '&uid=' + uid;
    }
}

function ConfirmDeleteRound(roundid, uid, courseid)
{
    var message = "Please confirm that you wish to delete this round.";

    if ( confirm(message) == true)
    {
       window.location = 'viewrounds.php?action=delete&roundid=' + roundid + '&uid=' + uid + '&courseid=' + courseid;
    }
}

function DropDownChange(url)
{
	if (url != '')
	{
		window.location = url;
	}
}
