// British Dalmatian Club JavaScripts

/**
* Jumps to a specific class within a show
*/
function jump_to_class() {
	// opens the page selected in the "select & go" menu
	newPage = jumpTo.options[jumpTo.selectedIndex].value
	if (newPage != "")
	{
		window.location.href = newPage;
	}
}



/**
* Determines the action to be carried out for a show in the admin section
*/
function determine_form_action(form, id) {
	if (document[form + id].action.selectedIndex != 0) {
		document[form + id].submit();
	}
}



/**
* Opens a small window to pick a name to add to show results
*/
function nameList(posID) {
	var copyrightWindow = window.open("/update/dogs/names_list.php?pos=" + posID, "imgWindow", "width=550, height=550, top=10, left=10, resizable=1, scrollbars=1")
}



/**
* Passes a dog id and name values to the class places form
*/
function update_class_place(pos, id, dog_name) {
	var place 			= new String("place_" +pos);
	var place_name 	= new String("name_" + pos);
	
	opener.document.class_form[place].value = id;
	opener.document.class_form[place_name].value = dog_name;
	
	window.close();
}

