
function Farmer(whatOne,species_cd,breed_cd) {
	var theUrl =
		'/Farmer/index.php?herd_id='+whatOne+
		'&species_cd'+species_cd+
		'&breed_cd'+breed_cd;
	var theName = 'farm_'+whatOne ;
	var farmShower = window.open(
		theUrl,theName,
		'resizable=yes,scrollbars=yes' );
	farmShower.focus();
}

function hereKids(whatOne) {
	var theUrl =
		'/PedigreeWidget/index.php?animal_id='+whatOne+
		'&showProgenyForm=yup&isProgenyForm=yup';
	var theName = 'mote_'+whatOne ;
	var pigShower = window.open(
		theUrl,theName,
		'resizable=yes,scrollbars=yes' );
	pigShower.focus();
}

function llama(whatOne) {
	var theUrl = '/PedigreeWidget/index.php?animal_id='+whatOne;
	document.location = theUrl;
	return;
}

function popUpLlama(whatOne) {
	var theUrl = '/PedigreeWidget/index.php?animal_id='+whatOne;
	var theName = 'mote_'+whatOne ;
	var pigShower = window.open(
		theUrl,theName,
		'resizable=yes,scrollbars=yes' );
	pigShower.focus();
}



function tombstone(ids) {
	var theUrl = '/PedigreeWidget/tombstone.php?animal_ids='+ids;
	var theName = 'Tombstone' ;
	var listShower = window.open(
		theUrl,theName,
		'resizable=yes,scrollbars=yes' );
	listShower.focus();
}


function popUpHelp( whatOne ) {
	var popUp = window.open(
		whatOne,
		'popUp',
		'resizable=yes,scrollbars=yes'
	);
	
	popUp.focus();
	
}


function showMotes(animal_id) {

	for( var f = 0; f < document.forms.length; f++ ) {
	for( var e = 0; e < document.forms[f].elements.length; e++ ) {

		if(document.forms[f].elements[e].name.substr(0,5) == 'mote_' ) {
			var bits = document.forms[f].elements[e].name.split('_');
			if( bits[1] == animal_id ) {
				document.forms[f].elements[e].className='choosed';
			} else {
				document.forms[f].elements[e].className='mote';
			}
		}

	}
	}

}

