function show_current_keys()
	{	window.status = ''
		window.status += myusername +' - '+ myuser_id +': '
		if(myregisno != ''){window.status += ' [Regisno: '+myregisno+']'}
		if(mymemberno != ''){window.status += ' [Member ID: '+mymemberno+']'}
		if(myinvoice_id != '' & myinvoice_id != 'NULL'){window.status += ' [Invoice ID: '+myinvoice_id+']'}
		if(mymenu1_txt != '' & mymenu1_txt != 'NULL'){window.status += ' [Action Text: '+mymenu1_txt+']'}
	}
	

/* MSC Add 02122005 */
var animal_main_editform_udv_txt = 'This allows you to have certain common fields inserted on the form automatically as your default values, based on your last entry or update.\n\nThis never overwrites a value that is on the animal record already, but it can display a value in place of information that is not present in the database.\n\n1. [None] will not use your defaults.\n\n2. [New Animals] will use defaults on a new animal or new sub-record, such as a new weaning record\n\n3. [All Animals] will use any available default value to populate any missing form value.\n\nThe default values are not applied to the database until the record is processed.\n\nThe User Default Values are set based on your immediatley preceding Animal Insert or Update.\n\nWhen Prompted, Click OK to change the User Default Value behavior or cancel to keep you current setting.'

function animal_main_editform_udv_function()
	{
		udv = document.all.animal_main_editform_udv.value
		
		if(udv == 99)
		{
			var do_update = confirm('You are attempting to clear all of your User Default Values.\n\nThese values will be rebuilt each time you do an update.\n\nIf you want the defaults to be disabled, select [None] from the menu.')
			if(do_update)
				{
					document.all.oanimal_main_editform_udv.options[0].selected=true
				}
		}
		else
		{
			var do_update = confirm(animal_main_editform_udv_txt)
		}


		if(do_update)
		{
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j254.cfm'
			var sTarget = 'udv'
			var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
			make_input(oNewForm, 'animal_main_editform_udv',udv)
			window.open('',sTarget,'height=0,width=0,status=no,toolbar=no,menubar=no,location=no,resizable=yes,screenX=10000,screenY=40000,top=10000,left=40000')
			oNewForm.submit()		
		}
		else
		{
			document.all.oanimal_main_editform_udv.options[0].selected=true
		}

	}


function highlight_required_animal_fields()
	{
		//alert(document.all.td_sirereg.className)
		if (document.all.td_sirereg.className=='titlebar') 
			{
				x = null
				document.all.btn_field_highlight.innerText = 'Show Required'
			}
		 else 
		 	{
				x = 'titlebar'
				document.all.btn_field_highlight.innerText = 'Hide Required'
			}

		document.all.td_sirereg.className = x
		document.all.td_damreg.className = x
		document.all.td_color.className = x
		document.all.td_regtype.className = x
		
		document.all.td_brand.className = x
		document.all.td_brand_location.className = x
		document.all.td_privherd.className = x
		document.all.td_privherdloc.className = x

		document.all.td_hps.className = x
		document.all.td_breeder.className = x
		document.all.td_mating.className = x
		document.all.td_name.className = x
		
		document.all.td_birthdate.className = x
		document.all.td_sex.className = x

		if(document.all.td_def_key_column_guide_id)
		{
			document.all.td_def_key_column_guide_id.className = x
		}
		
		
	}
/* MSC Add 02122005 */


var mymenu1_txt = GetCookie("m1_srch");
if(mymenu1_txt =='null')mymenu1_txt=''
	

//SetCookie ("m1_sel", 0,expdate,"/");
// Begin selector group 

function home_page()
	{
		standard_menu('registry/default.cfm')
	}

function all_menu_sel_set(sDisplay)
	{			
		if(typeof sDisplay == 'undefined')sDisplay='none'

		for(var all_sel=0; all_sel<=max_menu; all_sel++)
		{
			var menu_group = document.all.tags("TBODY")[fmg_name[all_sel]]
			// var menu_group_img = document.all.tags("IMG")[fmg_name[all_sel]]
			if(typeof menu_group == "object")
			{
				menu_group.style.display=sDisplay
				//menu_group_img.style.filter='normal'
			}
		}		
	}

function this_menu_sel_on(index, sDisplay)
	{
		if(typeof sDisplay == 'undefined')sDisplay='block'
		var menu_group = document.all.tags("TBODY")[fmg_name[index]]
		if(typeof menu_group == "object")			
			{
				menu_group.style.display=sDisplay
			}
			SetCookie ("m1_sel", index,expdate,"/");
	}

// New selector section
function arrow_action(moveTo)
	{		
		if(moveTo == -1)
			{
				x = GetCookie('m1_sel')
				if(x>0)
				{	
					x--
					SetCookie ("m1_sel", x,expdate,"/");					
				}
				moveTo = x
			}
		else
			{
				if(moveTo == 1)
					{
						x = GetCookie('m1_sel')
						if(x<max_menu)
						{	
							x++
							SetCookie ("m1_sel", x,expdate,"/");			
						}
						moveTo = x
					}
			}
			
		SetCookie ("m1_sel", moveTo,expdate,"/");
		all_menu_sel_set()
		this_menu_sel_on(moveTo)
		resetTitles(moveTo)		
	}

function arrow_left_end_menu_sel()
	{
		arrow_action(0)
	}

function arrow_left_menu_sel()
	{
		arrow_action(-1)		
	}

function arrow_right_menu_sel()
	{	
		arrow_action(1)		
	}

function arrow_right_end_menu_sel()
	{
		arrow_action(max_menu)
	}

// title only
function resetTitles(moveTo)
	{
		epdi_menu_title.title = fmg_title[moveTo]+' -- Right-Click for other menus'
		epdi_menu_title.innerHTML = fmg_title[moveTo].substr(0,5)+'...'
/*
		document.images['arrow_left_end_menu_sel'].title = get_arrow_left_end_menu_sel_title()
		document.images['arrow_left_menu_sel'].title = get_arrow_left_menu_sel_title()
		document.images['arrow_right_menu_sel'].title = get_arrow_right_menu_sel_title()
		document.images['arrow_right_end_menu_sel'].title = get_arrow_right_end_menu_sel_title()
		*/
	}

function get_arrow_left_end_menu_sel_title()
	{
		var arrow_left_end_menu_sel_title = fmg_title[0]
		return arrow_left_end_menu_sel_title
	}

function get_arrow_left_menu_sel_title()
	{
		x = GetCookie('m1_sel')
		if(x>0)
		{	
			x--
		}

		var arrow_left_menu_sel_title = fmg_title[x]
		return arrow_left_menu_sel_title
	}

function get_arrow_right_menu_sel_title()
	{
		x = GetCookie('m1_sel')
		if(x < max_menu)
			{
				x++
			}
		var arrow_right_menu_sel_title = fmg_title[x]
		return arrow_right_menu_sel_title
	}


function get_arrow_right_end_menu_sel_title()
	{
		var arrow_right_end_menu_sel_title = fmg_title[max_menu]
		return arrow_right_end_menu_sel_title
	}

// Old image titles 
function animal_menu_sel_title()
	{
		var animal_menu_sel_title = 'Animal Menu'
		return animal_menu_sel_title
	}

function general_menu_sel_title()
	{
		var general_menu_sel_title = 'General Menu'
		return general_menu_sel_title
	}
	
function system_menu_sel_title()
	{
		var system_menu_sel_title = 'System Menu'
		return system_menu_sel_title
	}

function all_menu_sel_title()
	{
		var all_menu_sel_title = 'View All'
		return all_menu_sel_title
	}
// END Old image titles 

// END title only

// END New selector section
	
// Menu selection by name...
/* 
Used for special pointer - 
	simply make the function name = the fmg_name - 
	this function takes precedence
*/
function all_menu_sel()
	{
		all_menu_sel_set('block')
		this_menu_sel_on(0, 'none')
	}


/* Used for default pointer to the menu group */
function menu_sel_default()
	{
		for(var sel=0; sel<=max_menu; sel++)
			{
				if(event.srcElement.name == fmg_name[sel])
					{
						all_menu_sel_set()
						this_menu_sel_on(sel)						
						resetTitles(sel)
						break
					}
			}
	}
// END Menu selection by name...
// END selector group



// Begin tool functions

// Standard Menu Call
function standard_menu(path, sTarget)
	{	
		if(sTarget=='' || sTarget == null)
			{sTarget='_parent'}		

		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+path
		var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
		oNewForm.submit()	
	}


// Edit Animal
function animal_bloodtype_edit_cm()
	{standard_menu('registry/animal_bloodtype_edit.cfm')}

function animal_edit_title()
	{
		if(myregisno.toUpperCase()=='NULL' || myregisno=='')
			{var animal_edit_title = 'Edit - No current animal'}
		else
			{var animal_edit_title = 'Edit the current Animal - Animal ID: '+myregisno}
		return animal_edit_title
	}
	
function direct_anim_edit(regisno)
{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/animal_main_editform.cfm'
		var sTarget = 'sysanimal'
		var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
		make_input(oNewForm, 'current.regisno',regisno)
		//make_input(oNewForm, 'this_file.detination', 'registry/animal_main_editform.cfm')
		oNewForm.submit()
}

function function_alias(function_name)
		{eval(function_name+'()')}

function animal_edit()
	{				
		if(myinvoice_id.toUpperCase()=='NULL' || myinvoice_id==''  || parseInt(myinvoice_id)<0)
			{
				if(frm_menu.menu1_txt.value=='' || isNaN(parseInt(frm_menu.menu1_txt.value.substring(2,frm_menu.menu1_txt.value.len))))
				
				{
					if(frm_menu.menu1_txt.value=='')
						{
							var get_wg = confirm('You have no work group selected - \n\n An Open WorkGroup is Required\n\n Would you like to choose a workgroup now?')
						}
					else
						{
							if(isNaN(parseInt(frm_menu.menu1_txt.value)))
								{
									var get_wg = confirm('The value in the regisno box is not numeric - \n\n Would you like to choose a workgroup now?')	
								}
						}

					if(get_wg)
						{workgroup_edit()}
					else
						{retain_menu = 1}
				}
				else
					{
						direct_anim_edit(frm_menu.menu1_txt.value)						
					}
			}
		else
			{standard_menu('registry/animal_main_editform.cfm','sysanimal')}
	}
// END Edit Animal


// Animal Disposal
function edit_disposal_cm()
	{
	
		window.open('', 'nf309_edit_disposal_single', 'height=300,width=1000,status=no,toolbar=no,menubar=no,location=no,resizable=yes')
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/animal_disposal_edit.cfm'
		var oNewForm = make_form("disposal_edit", sAction, "nf309_edit_disposal_single")

		if(frm_menu.menu1_txt.value!='')
			{make_input(oNewForm, 'animal.regisno_srch',frm_menu.menu1_txt.value);oNewForm.submit()}
		else{
				if(myregisno.toUpperCase()=='NULL' || myregisno=='')
					{
						retain_menu = 1
						return no_animal_regisno_available()
					}
				else
					{make_input(oNewForm, 'animal.regisno_srch',myregisno);oNewForm.submit()}
			}

		make_input(oNewForm, 'curlocation', 'registry/animal_main_editform.cfm')
		oNewForm.submit()
	}

/// Animal Disposal


// Refresh WG list 
function workgroup_refresh_option_list_cm()
	{			
		if(myinvoice_id.toUpperCase()=='NULL' || myinvoice_id==''  || parseInt(myinvoice_id)<0)
			{
				if(frm_menu.menu1_txt.value=='' || isNaN(parseInt(frm_menu.menu1_txt.value.substring(2,frm_menu.menu1_txt.value.len))))
				
				{
					if(frm_menu.menu1_txt.value=='')
						{
							var get_wg = confirm('You have no work group selected - \n\n Would you like to choose a workgroup now?')
						}
					else
						{
							if(isNaN(parseInt(frm_menu.menu1_txt.value)))
								{
									var get_wg = confirm('The value in the regisno box is not numeric - \n\n Would you like to choose a workgroup now?')	
								}
						}

					if(get_wg)
						{workgroup_edit()}
					else
						{retain_menu = 1}
				}
			}
		else
			{			
				var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/workgroup_refresh_option_list.cfm'
				var sTarget = ''
				var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
				make_input(oNewForm, 'invoice.invoice_id',myinvoice_id)
				make_input(oNewForm, 'curlocation','invoice/workgroup_editform.cfm')
				oNewForm.submit()
			}
	}
// END Refresh WG list 

// Analyze Animal Calculations
	function animal_calculation_review(invoice_id, regisno)
		{
		
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'control/c13.cfm'
			var sTarget = 'animal_calculation_review'
			var oNewForm = make_form(event.srcElement.name, sAction, sTarget)

			if(regisno.length > 0)
				{
					make_input(oNewForm, 'c13_which_id.radio','regisno')
					make_input(oNewForm, 'c13_mixed.srch',regisno)
				}
			else
				{
					make_input(oNewForm, 'c13_which_id.radio','invoice_id')
					make_input(oNewForm, 'c13_mixed.srch',invoice_id)
				}
				
			oNewForm.submit()
		}
// END: Analyze Animal Calculations


// Brangus RIP Loader
function rip_loader(rip_ctfullreg)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'sidejobs/brangus/new_jobs/rip_loader_1.cfm'
		var sTarget = ''
		var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
		make_input(oNewForm, 'reg_temp.ctfullreg',rip_ctfullreg)
		make_input(oNewForm, 'from_where','Load')
		oNewForm.submit()
	}

// END Brangus RIP Loader

// Payment manager
function payment_manager_open(payment_memberno, sTarget)
	{
		if(sTarget=='' || sTarget == null || typeof sTarget == 'undefined')
			{sTarget='_parent'}		
		else
			{sTarget='payment_edit'}

		
		

		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/payment_display.cfm'
		var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
		make_input(oNewForm, 'payment.memberno',payment_memberno)
		oNewForm.submit()
	}
//END Payment manager

// Transfer Animal
function animal_transfer_title()
	{
		if(myregisno.toUpperCase()=='NULL' || myregisno=='')
			{var animal_transfer_title = 'Transfer - No current animal'}
		else
			{var animal_transfer_title = 'Transfer the current Animal - Animal ID: '+myregisno}
		return animal_transfer_title
	}

function animal_transfer()
	{
		if(myinvoice_id.toUpperCase()=='NULL' || myinvoice_id=='')
			{
				var get_wg = confirm('You have no work group selected - \n\n Would you like to choose a workgroup now?')
				if(get_wg)
					{workgroup_edit()}
				else
					{retain_menu = 1}
			}
		else
			{standard_menu('registry/transfer_editform.cfm')}		
	}
// END Transfer Animal



function anchor_title()
	{
		var anchor_title = 'Anchor the menu at the top left'
		return anchor_title
	}
	
function anchor()
	{
		anchor_menu()
	}

function buyer_lookup_title()
	{
		var buyer_lookup_title = 'Sale Buyer Lookup'
		return buyer_lookup_title
	}
	
function buyer_lookup()
	{
		if(frm_menu.menu1_txt.value=='')
			{
				standard_menu('sale/sale_buyer_container.cfm')
			}
		else
			{
				var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'sale/sale_buyer_container.cfm'
				var sTarget = 'sale_buyer_lookup_2'
				var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
				make_input(oNewForm, 'memberno',frm_menu.menu1_txt.value)
				make_input(oNewForm, 'from_where','Search')
				oNewForm.submit()
			}

	}

function customer_edit_title()
	{
		var customer_edit_title = 'Sale Customer Edit'
		return customer_edit_title
	}
	
function customer_edit()
	{
		standard_menu('registry/customer_editform_2.cfm')
	}

function sale_edit_title()
	{
		var sale_edit_title = 'Sale Pen Edit Screen'
		return sale_edit_title
	}
	
function sale_edit()
	{
		standard_menu('sale/sale_editform.cfm')
	}

function sale_price_list_title()
	{
		var sale_price_list_title = 'Sale Price List'
		return sale_price_list_title
	}
	
function sale_price_list()
	{
		standard_menu('sale/sale_animal_price_list.cfm')
	}
	
function sale_report_title()
	{
		var sale_report_title = 'Sale Reports'
		return sale_report_title
	}
	
function sale_report()
	{
		standard_menu('sale/sale_report.cfm')
	}

function sale_box_title()
	{
		var sale_box_title = 'Sale Block Editor'
		return sale_box_title
	}
	
function sale_box()
	{
		standard_menu('sale/sale_box_container.cfm')
	}

function sale_links_title()
	{
		var sale_links_title = 'A list of sale related links'
		return sale_links_title
	}
	
function sale_links()
	{
		standard_menu('sale/sale_links.cfm')
	}
	
function personal_settings_title()
	{
		var personal_settings_title = 'My Personal Settings'
		return personal_settings_title
	}

function personal_settings()
	{
		var strURL = myhttp_mode+':/'+'/'+mydomain_data_path+'control/c2.cfm'
		window.open(strURL, 'personal_settings', 'height=480,width=520,status=no,toolbar=no,menubar=no,location=no,resizable=no')
		//standard_menu('control/c2.cfm')
	}


//Psion
function psion_title()
	{
		var x = "Psion Form Builder"
		return x
	}
	
function psion()
	{
		standard_menu('job/j159.cfm')
	}
// END Psion

// Member Search 
// Pointer to Member search
function member_srch2()
	{member_srch()}

function member_srch2_title()
	{			
		member_srch2_title = member_srch_title()
		return member_srch2_title
	}
// END Pointer to Member search
	
function member_srch_title()
	{
		if(mymemberno.toUpperCase()=='NULL' || mymemberno=='')
			{var member_srch_title = 'Member Search'}
		else
			{var member_srch_title = 'Member Search - Current Member ID: '+mymemberno}
		return member_srch_title
	}


function member_srch()
	{
		if(frm_menu.menu1_txt.value=='')
			{
				var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j35.cfm'
				var sTarget = 'syscustomer'
				var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
				make_input(oNewForm, 'edit_memberno',mymemberno)
				make_input(oNewForm, 'tablename','customer')
				oNewForm.submit()
			}
		else
			{
				var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j35.cfm'
				var sTarget = 'syscustomer'
				var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
				make_input(oNewForm, 'edit_memberno',frm_menu.menu1_txt.value)
				make_input(oNewForm, 'tablename','customer')
				oNewForm.submit()
			}
	}
// Member Search 

function sys_srch_title()
	{
		var sys_srch_title = 'System Search Central - choose a data group to search'
		return sys_srch_title
	}
	
function sys_srch()
	{
		standard_menu('registry/system_search_root.cfm')
	}	


// progeny list
function progeny_list_title()
	{
		var progeny_list_title = 'PROGENY - Search for and retrieve information on an animal and its progeny'
		return progeny_list_title
	}
	
function progeny_list()
	{
		if(frm_menu.menu1_txt.value=='')
			{
				if(myregisno.toUpperCase()=='NULL' || myregisno=='')
					{
						standard_menu('registry/Dam_Search.cfm')
					}
				else
					{
						var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/Dam_calflist.cfm'
						var sTarget = ''
						var oNewForm = make_form(event.srcElement.name, sAction, sTarget)				
						make_input(oNewForm, 'animal.damreg.srch',myregisno)
						make_input(oNewForm, 'get_calf_info.srch',1)
						oNewForm.submit()

					}				
			}
		else
			{
				var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/Dam_calflist.cfm'
				var sTarget = ''
				var oNewForm = make_form(event.srcElement.name, sAction, sTarget)				
				make_input(oNewForm, 'animal.damreg.srch',frm_menu.menu1_txt.value)
				make_input(oNewForm, 'get_calf_info.srch',1)
				oNewForm.submit()
			}
	}


// Sire Or Dam Calf List
function calves_of_ancestor(regisno)
	{
		if(regisno)
			{		
				var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j135.cfm'
				var sTarget = ''
				var oNewForm = make_form(event.srcElement.name, sAction, sTarget)				
				make_input(oNewForm, 'animal.damreg',regisno)
				oNewForm.submit()
			}
		else
			{
			if(frm_menu.menu1_txt.value=='')
				{
					if(myregisno.toUpperCase()=='NULL' || myregisno=='')
						{
							standard_menu('registry/Dam_Search.cfm')
						}
					else
						{
							var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j135.cfm'
							var sTarget = ''
							var oNewForm = make_form(event.srcElement.name, sAction, sTarget)				
							make_input(oNewForm, 'animal.damreg',myregisno)
							oNewForm.submit()	
						}				
				}
			else
				{
					var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j135.cfm'
					var sTarget = ''
					var oNewForm = make_form(event.srcElement.name, sAction, sTarget)				
					make_input(oNewForm, 'animal.damreg',frm_menu.menu1_txt.value)
					oNewForm.submit()
				}	
			}
	}


// Animal search
function animal_srch_title()
	{
		var animal_srch_title = 'Search for an animal - by tag, name or registration number'
		return animal_srch_title
	}
	
function animal_srch()
	{
		if(frm_menu.menu1_txt.value=='')
			{
			
				if(myregisno.toUpperCase()=='NULL' || myregisno=='')
					{
						standard_menu('search/s1.cfm')
					}
				else
					{					
						var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'search/s1.cfm'
						var sTarget = ''
						var oNewForm = make_form(event.srcElement.name, sAction, sTarget)				
						make_input(oNewForm, 's1_search',myregisno)
						make_input(oNewForm, 'from_where','s1_do_search')
						make_input(oNewForm, 'animal_order','0')
						make_input(oNewForm, 'find_which','2')
						make_input(oNewForm, 'find_how','1')				
						make_input(oNewForm, 'get_calf_info.srch',1)
						oNewForm.submit()
					}

			}
		else
			{
				var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'search/s1.cfm'
				var sTarget = ''
				var oNewForm = make_form(event.srcElement.name, sAction, sTarget)				
				make_input(oNewForm, 's1_search',frm_menu.menu1_txt.value)
				make_input(oNewForm, 'from_where','s1_do_search')
				make_input(oNewForm, 'animal_order','0')
				make_input(oNewForm, 'find_which','1')
				make_input(oNewForm, 'find_how','1')				
				make_input(oNewForm, 'get_calf_info.srch',1)
				oNewForm.submit()			
			}
	}


// error report
function error_report_title()
	{
		var error_report_title = 'View the current error report'
		if(myinvoice_id!='NULL' && myinvoice_id!='')error_report_title+= ' Current Invoice: '+myinvoice_id	
		return error_report_title
	}	

function error_report(specific_invoice_id)
	{
		var sTarget = 'errors'
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j130.cfm'
		var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
		
		make_input(oNewForm, 'from_where','search')

		if(specific_invoice_id)
			{
				make_input(oNewForm, 'invoice.invoice_id',specific_invoice_id)
				make_input(oNewForm, 'j130.search',specific_invoice_id)
			}
		else
			{
			if(frm_menu.menu1_txt.value!='')			
				{
					if(myinvoice_id=='NULL' || myinvoice_id=='')
						{
							make_input(oNewForm, 'j130.search',frm_menu.menu1_txt.value)
							make_input(oNewForm, 'invoice.invoice_id',frm_menu.menu1_txt.value)
						}
					else
						{
							make_input(oNewForm, 'invoice.invoice_id',myinvoice_id)
							make_input(oNewForm, 'j130.search',myinvoice_id)
						}
				}
			else
				{make_input(oNewForm, 'invoice.invoice_id',myinvoice_id)}	
			}
		
		oNewForm.submit()
	}
		



/* Workgroup */
function workgroup_edit_title()
	{
		if(myinvoice_id.toUpperCase()=='NULL' || myinvoice_id=='')
			{var workgroup_edit_title = 'Select a workgroup'}
		else
			{var workgroup_edit_title = 'Edit your current workgroup Invoice ID: '+myinvoice_id}
		return workgroup_edit_title
	}
	
function workgroup_edit()
	{
	if(myinvoice_id=='NULL' || myinvoice_id=='')
		{
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/invoice_search.cfm'
			var oNewForm = make_form(event.srcElement.name, sAction)
			make_input(oNewForm, 'from_where','search')
			make_input(oNewForm, 'memberno', event.srcElement.name)		
			oNewForm.submit()
		}
	else
		{ 
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/workgroup_editform.cfm'
			var oNewForm = make_form(event.srcElement.name, sAction)
			make_input(oNewForm, 'invoice.invoice_id',myinvoice_id)
			oNewForm.submit()
		}
	}
/* Workgroup */

function table_manager_title()
	{
		var table_manager_title = 'Table Manager Tools'
		return table_manager_title
	}
function table_manager()
	{
		standard_menu('control/c3.cfm','_top')
	}


function sys_tools_title()
	{
		var sys_tools_title = 'System Tools'
		return sys_tools_title
	}
	
function sys_tools()
	{
		standard_menu('tool/system_tool_options.cfm')
	}


function job_manager_title()
	{
		var job_manager_title = 'Job Manager'
		return job_manager_title
	}
	
function job_manager()
	{
		var sTarget = 'sysjob'
		var sAction = myhttp_mode+':/'+'/'+jobdomain+'job/j95.cfm'
		var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
		oNewForm.submit()	
	}

function select_include_title()
	{
		var job_manager_title = 'Select Include Manager'
		return job_manager_title
	}
	
function select_include()
	{
		standard_menu('select_include/select_include_control.cfm')
	}

function mail_domains_title()
	{
		var job_manager_title = 'Mail Domains Block Editform'
		return job_manager_title
	}
	
function mail_domains()
	{
		standard_menu('registry/mail_domains_editform.cfm')
	}
	
function file_register_title()
	{
		var file_register = 'File Registration'
		return file_register
	}
	
function file_register()
	{
		standard_menu('registry/def_named_cfm_editform.cfm')
	}
	
	
function task_manager_title()
	{
		var task_manager_title = 'Task Manager'
		return task_manager_title
	}
	
function task_manager()
	{
		standard_menu('registry/Task_editform.cfm')
	}


/*
function animal_rec()
This needs to be converted to strictly a cm function
I will remove the main function once the cm is know to be working correctly

function grab_animal_rec_cm_title()
	{return animal_rec_title()}

function grab_animal_rec_cm()
	{animal_rec()}
	
	MSCNote 020914 The following functions had the names referenced in these 
	two above functions and were called indirectly thru the two above functions
*/

function grab_animal_rec_cm_title()
	{
		if(myregisno.toUpperCase()=='NULL' || myregisno=='')
			{var animal_rec_title = 'View the Animal Record - No current animal'}
		else
			{var animal_rec_title = 'View the Animal Record for Animal ID: '+myregisno}
		return animal_rec_title
	}
	
function grab_animal_rec_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/animal_display.cfm'
		var sTarget = 'animal_review'
		var oNewForm = make_form(event.srcElement.name, sAction, sTarget)

		if(frm_menu.menu1_txt.value!='')
			{make_input(oNewForm, 'animal.regisno',frm_menu.menu1_txt.value);oNewForm.submit()}
		else{
				if(myregisno.toUpperCase()=='NULL' || myregisno=='')
					{retain_menu = 1; return no_animal_regisno_available()}
				else
					{make_input(oNewForm, 'animal.regisno',myregisno);oNewForm.submit()}
			}

	}

/*
	END function animal_rec()
*/

function no_animal_regisno_available()
	{
		alert('You have no search key - either: \n\n 1) Load an animal in your tool or \n\n 2) Type a Registration number in the search box.')
	}


// Print certs
function printer_manager_title()
	{
		var printer_manager_title = 'View animal CERTIFICATES ready to print.'
		return printer_manager_title
	}
	
function printer_manager()
	{
		standard_menu('job/j54.cfm')		
	}

//CSTELL ADDED 14JAN2004
function printer_manager_breeder_title()
	{
		var printer_manager_breeder_title = 'Right Click for Report Options'
		return printer_manager_breeder_title
	}
	
function printer_manager_breeder()
	{
		alert('Right Click For Report Options')
	}
//END: CSTELL ADDED 14JAN2004

// Print reports
function printer_manager_report1_title()
	{
		var printer_manager_report1_title = 'View a list of workgroups whose reports are ready to print.'
		return printer_manager_report1_title
	}
	
function printer_manager_report1()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/workgroup_print_status.cfm'
		var oNewForm = make_form("printer_manager_report1", sAction, "sysprint")

		make_input(oNewForm, 'search_type',2)
		oNewForm.submit()		
	}


function report_linker_cm_title()
	{
		var report_linker_cm_title = "View all the reports for your invoice"
		return report_linker_cm_title
	}

function report_linker_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'reporting/report_search.cfm'
		var oNewForm = make_form('', sAction)
		make_input(oNewForm, 'from_where', "report_do_search")
		oNewForm.submit()
	}


function mem_card_report_cm_title()
	{
		var mem_card_report_cm_title = "Print the membership card"
		return mem_card_report_cm_title
	}

function mem_card_report_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'reporting/membership_report.cfm'
		var oNewForm = make_form('', sAction)
		make_input(oNewForm, 'membernumbers', "")
		oNewForm.submit()
	}

function mem_herd_epd_report_cm_title()
	{
		var mem_herd_epd_report_cm_title= "Get the Member Herd EPD report"
		return mem_herd_epd_report_cm_title
	}

function mem_herd_epd_report_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'reporting/mem_herd_epd_report.cfm'
		var oNewForm = make_form('', sAction)
		make_input(oNewForm, 'membernumber', "")
		oNewForm.submit()
	}


function dam_production_report_cm_title()
	{
		var dam_production_report_cm_title= "Get the Dam Production Summary"
		return dam_production_report_cm_title
	}

function dam_production_report_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'reporting/dam_production_report.cfm'
		var oNewForm = make_form('', sAction)
		oNewForm.submit()
	}

/*
function performance_reports_form1_cm_title()
	{
		var performance_reports_form1_cm_title = "Get Form1 performance report"
		return performance_reports_form1_cm_title
	}

function performance_reports_form1_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'reporting/download_performance_reports.cfm'
		var oNewForm = make_form('', sAction)
		make_input(oNewForm, 'file_name', "S:/reporting/generatedpdfreports/temp/ibba/form1.zip")
		oNewForm.submit()
	}


function performance_reports_form2_cm_title()
	{
		var performance_reports_form2_cm_title = "Get Form2 performance report"
		return performance_reports_form2_cm_title
	}

function performance_reports_form2_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'reporting/download_performance_reports.cfm'
		var oNewForm = make_form('', sAction)
		make_input(oNewForm, 'file_name', "S:/reporting/generatedpdfreports/temp/ibba/form2.zip")
		oNewForm.submit()
	}

function performance_reports_form3_cm_title()
	{
		var performance_reports_form3_cm_title = "Get Form3 performance report"
		return performance_reports_form3_cm_title
	}

function performance_reports_form3_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'reporting/download_performance_reports.cfm'
		var oNewForm = make_form('', sAction)
		make_input(oNewForm, 'file_name', "S:/reporting/generatedpdfreports/temp/ibba/form3.zip")
		oNewForm.submit()
	}

*/

function member_duespaidthru_cm_title()
	{
		var member_duespaidthru_cm_title = "Enter Member DuespaidThru"
		return member_duespaidthru_cm_title
	}

function member_duespaidthru_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'reporting/membership_duespaidthru.cfm'
		var oNewForm = make_form('', sAction)
		make_input(oNewForm, 'form.membernumber', "")
		make_input(oNewForm, 'form.duespaidthru', "")
		oNewForm.submit()
	}



function grab_epd_cm_title()
	{
		if(myregisno.toUpperCase()=='NULL' || myregisno=='')
			{var grab_epd_title = 'View EPDs - No current animal'}
		else
			{var grab_epd_title = 'View EPDs for Animal ID: '+myregisno}
		return grab_epd_title
	}
	
function grab_epd_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j96.cfm'
		var sTarget = 'animal_review'
		var oNewForm = make_form(event.srcElement.name, sAction, sTarget)	
		make_input(oNewForm, 'j96_depth',3)
		if(frm_menu.menu1_txt.value!='')
			{make_input(oNewForm, 'animal.regisno.srch',frm_menu.menu1_txt.value);oNewForm.submit()}
		else{
				if(myregisno.toUpperCase()=='NULL' || myregisno=='')
					{
						retain_menu = 1
						return no_animal_regisno_available()
					}
				else
					{make_input(oNewForm, 'animal.regisno.srch',myregisno);oNewForm.submit()}
			}

	}
	




function animal_reverse_reg_cm_title()
	{

		var animal_reverse_reg_cm_title = 'Will translate a text/numeric regisno to all numeric or visa-versa'
		return animal_reverse_reg_cm_title
	}
	
function animal_reverse_reg_cm()
	{
		window.open('reg_map_brangus','reg_map_brangus','height=60,width=300,status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars')
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'functions/reg_map_brangus.cfm'
		var oNewForm = make_form("reg_map_brangus", sAction, "reg_map_brangus")

		if(frm_menu.menu1_txt.value!='')
			{make_input(oNewForm, 'menu1_txt',frm_menu.menu1_txt.value);oNewForm.submit()}
		else{
				if(myregisno.toUpperCase()=='NULL' || myregisno=='')
					{
						make_input(oNewForm, 'menu1_txt',myregisno);oNewForm.submit()
						retain_menu = 0
					}
				else
					{make_input(oNewForm, 'menu1_txt',myregisno);oNewForm.submit()}
			}

	}

// Copy a regisno

function copyRegisno_cm()
	{
			frm_menu.menu1_txt.value = myregisno
	}
	
function copyRegisno_cm_title()
	{
		var copyRegisno_cm_title = 'Copy the current Reg number to the Action Text box on the Right Click Menu'
		return copyRegisno_cm_title
	}


/*
grab_pedigree_cm()
This needs to be converted to strictly a cm function
I will remove the main function once the cm is know to be working correctly
*/
function grab_pedigree_cm_title()
	{
		return pedigree_title()		
	}
	
function grab_pedigree_cm()
	{pedigree()}

function pedigree_title()
	{
		if(myregisno.toUpperCase()=='NULL' || myregisno=='')
			{var pedigree_title = 'View Pedigree - No current animal'}
		else
			{var pedigree_title = 'View the Pedigree for Animal ID: '+myregisno}
		return pedigree_title
	}
	
function pedigree()
	{

		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j34.cfm'
		var sTarget = 'animal_review'
		var oNewForm = make_form(event.srcElement.name, sAction, sTarget)

		if(frm_menu.menu1_txt.value!='')
			{make_input(oNewForm, 'pedigree_id',frm_menu.menu1_txt.value);oNewForm.submit()}
		else{
				if(myregisno.toUpperCase()=='NULL' || myregisno=='')
					{retain_menu = 1; return no_animal_regisno_available()}
				else
					{make_input(oNewForm, 'pedigree_id',myregisno);oNewForm.submit()}
			}
		
	}
	

function dam_calflist()
	{

		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/dam_calflist.cfm'
		var sTarget = 'dam_calflist'
		var oNewForm = make_form(event.srcElement.name, sAction, sTarget)

		if(frm_menu.menu1_txt.value!='')
			{make_input(oNewForm, 'animal.damreg.srch',frm_menu.menu1_txt.value);oNewForm.submit()}
		else{
				if(myregisno.toUpperCase()=='NULL' || myregisno=='')
					{retain_menu = 1; return no_animal_regisno_available()}
				else
					{make_input(oNewForm, 'animal.damreg.srch',myregisno);oNewForm.submit()}
			}
		
	}


// Hide images on a page	
// redirect
function hidePageImages2()
	{hidePageImages()}
// redirect

function hidePageImages_title()
	{
		var hidePageImages_title = 'Remove Images on the page - usually for printing or page copy functions.'
		return hidePageImages_title
	}

function hidePageImages()
	{
		var last_status = window.status
		window.status = 'Please Wait - Images are being removed '
		var myimg = new Object();
		var found_myimg = new Number();
			found_myimg = 0;
		var j = new Number();
			j = 0
		do
		{
			j++
			found_myimg = 0	

			window.status = 'Please Wait - Images are being removed '
			
			for(i=0;i<document.all.tags("img").length;i++)
			{		
				myimg = document.all.tags("img")[i];
				
				window.status += '|'
				
				if(myimg.type != 'menu_bar')
				{	
					if(myimg.style.display == "" || myimg.style.display == null)
					{
						//myimg.style.display = "none"
						if(typeof (myimg) != 'undefined')
						{	//alert('removed')
							myimg.removeNode(true)
						}
						found_myimg = 1	
					}
					else
					{
						myimg.style.display = ""
					}
				}
			}
		}
		while(j<50 && found_myimg == 1)		
		
		window.status = last_status
	}
// END: Hide images on a page


// Get a definition
function dictionary()
	{
		var sAction = 'http://www.dictionary.com/cgi-bin/dict.pl?term='+escape(frm_menu.menu1_txt.value)
		if(typeof dictionarywin == "undefined")
			{
				dictionarywin=window.open('','dictionary','width=500,height=550,resizable=1,status=0,toolbar=0,menubar=0,scrollbars,screenX=10,screenY=40,top=10,left=40')
			}
		else
			{
				if(dictionarywin.closed)
					{
						dictionarywin=window.open('','dictionary','width=500,height=550,resizable=1,status=0,toolbar=0,menubar=0,scrollbars,screenX=10,screenY=40,top=10,left=40')
					}
			}
		
		dictionarywin.location.href = sAction
		dictionarywin.focus()
	}

function dictionary_title()
	{
		var dictionary_title = 'Lookup this word...'
		return dictionary_title
	}
// END Get a definition
// need to test and see if the window is already open
// Get a stock quote

function grab_stock_cm()
	{
		x = event.srcElement.index
		nasdaq(nasdaq_CM_p0[x])
	}	
	
function nasdaq(stock_symbol)
	{
		if(stock_symbol == null)
		{
			if(frm_menu.menu1_txt.value == '' || frm_menu.menu1_txt.value == null)
				{
					stock_symbol = 'EMRG'
				}
			else
				{
					stock_symbol = frm_menu.menu1_txt.value
				}
		}
		
		
		/* 
			OLD 'http://quotes.nasdaq.com/Quote.dll?page=full&mode=basics&symbol='+escape(stock_symbol)
			NEW http://quotes.nasdaq.com/quote.dll?mode=stock&page=multi&symbol=EMRG&symbol=&selected=emrg 
		*/

		var sAction = 'http://quotes.nasdaq.com/quote.dll?mode=stock&page=multi&symbol='+escape(stock_symbol)
		
		if(typeof nasdaqwin == "undefined")
			{
				nasdaqwin=window.open('','winnasdaq','width=,height=,resizable=1,status=0,toolbar=0,menubar=0,scrollbars,screenX=10,screenY=40,top=10,left=40')
			}
		else
			{
				if(nasdaqwin.closed)
					{
						nasdaqwin=window.open('','winnasdaq','width=,height=,resizable=1,status=0,toolbar=0,menubar=0,scrollbars,screenX=10,screenY=40,top=10,left=40')
					}
			}

		nasdaqwin.location.href = sAction
		nasdaqwin.focus()	
	}

function nasdaq_title()
	{
		var nasdaq_title = 'Lookup this stock on the NASDAQ website...'
		return nasdaq_title
	}
// END Get a stock quote

// google search
function google()
	{
		var sAction = 'http://www.google.com/search?q='+escape(frm_menu.menu1_txt.value)
		
		if(typeof googlewin == "undefined")
			{
				googlewin=window.open('','wingoogle','width=,height=,resizable=1,status=0,toolbar=0,menubar=0,scrollbars,screenX=10,screenY=40,top=10,left=40')
			}
		else
			{
				if(googlewin.closed)
					{
						googlewin=window.open('','wingoogle','width=,height=,resizable=1,status=0,toolbar=0,menubar=0,scrollbars,screenX=10,screenY=40,top=10,left=40')
					}
			}


		googlewin.location.href = sAction
		googlewin.focus()	
	}

function google_title()
	{
		var google_title = 'Search for this information on the google website...'
		return google_title
	}
// END google search

// Enter Certs To Print
function enter_certs_to_print_regisno()
{
	enter_certs_to_print('regisno')
}
function enter_certs_to_print_invoice_id()
{
	enter_certs_to_print('invoice_id')
}

function enter_certs_to_print(column)
	{
	
	/*
		if((frm_menu.menu1_txt.value==''))
		{
			enter_certs_to_print_blank(column,'')
		}
	*/
		
		if(column=='regisno')
		{
			if(document.all.ocerts_to_print_dx_regisno)
			{
				var confirm_update = confirm('Are you sure you would like to reprint a Certificate for animal '+document.all.ocerts_to_print_dx_regisno.value+'?')	
				var certs_to_print_seed = document.all.ocerts_to_print_dx_regisno.value				
			}
			else
			{
				var confirm_update = confirm('Are you sure you would like to reprint a Certificate for animal '+frm_menu.menu1_txt.value+'?')						
				var certs_to_print_seed = frm_menu.menu1_txt.value
			}
		}
		else
		{
			if(column=='invoice_id')
			{	
				if(document.all.ocerts_to_print_dx_invoice_id)
				{
					var confirm_update = confirm('Are you sure you would like to reprint the Certificates for all Animals in Invoice'+document.all.ocerts_to_print_dx_invoice_id.value+'?')	
					var certs_to_print_seed = document.all.ocerts_to_print_dx_invoice_id.value				
				}
				else
				{
					var confirm_update = confirm('Are you sure you would like to reprint the Certificates for all Animals in Invoice '+frm_menu.menu1_txt.value+'?')	
					var certs_to_print_seed = frm_menu.menu1_txt.value
				}
			}
		}

		if(confirm_update)
		{
			enter_certs_to_print_full(column,certs_to_print_seed)
		}
		else
		{
			if(document.all.ocerts_to_print_dx_regisno)
			{
			}
			else
			{
				enter_certs_to_print_blank(column,certs_to_print_seed)
			}
		}
		
			
	}
	
	function enter_certs_to_print_blank(column,certs_to_print_seed)
	{
		window.open('','certs_to_print_enter','height=600,width=500,status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars')
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/certs_to_print_enter.cfm'
		var oNewForm = make_form("certs_to_print_enter", sAction, "certs_to_print_enter")
		var sTarget = 'certs_to_print_enter'
		make_input(oNewForm, 'column_name',column)
		make_input(oNewForm, 'certs_to_print.'+column,'')
		oNewForm.submit()		
	}	

	function enter_certs_to_print_full(column,certs_to_print_seed)
	{
				window.open('','certs_to_print_enter','height=600,width=500,status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars')
				var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/certs_to_print_enter.cfm'
				var sTarget = 'certs_to_print_enter'
				var oNewForm = make_form(event.srcElement.name, sAction, sTarget)				
				make_input(oNewForm, 'certs_to_print.'+column,certs_to_print_seed)
				make_input(oNewForm, 'column_name',column)
				make_input(oNewForm, 'from_where','insert')
				oNewForm.submit()				
	}	
// END Enter Certs To Print

// END tool functions




// Begin link based functions
function link_edit_animal_error(link_regisno)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/zn_anim_update.cfm'
		var oNewForm = make_form("link_get_animal_rec", sAction, "sysanimal")
		make_input(oNewForm, 'current.regisno',link_regisno)
		make_input(oNewForm, 'curlocation', 'registry/animal_main_editform.cfm')
		oNewForm.submit()
	}


function link_edit_animal_rec(link_regisno)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/animal_main_editform.cfm'
		var oNewForm = make_form("link_get_animal_rec", sAction, "sysanimal")
		make_input(oNewForm, 'current.regisno',link_regisno)
		oNewForm.submit()
	}

function link_reverse_workgroup(link_regisno)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/workgroup_reverse.cfm'
		var oNewForm = make_form("link_reverse_workgroup", sAction, "sysanimal")
		make_input(oNewForm, 'invoice_id.srch',link_regisno)
		oNewForm.submit()
	}
	
function link_edit_customer_rec(link_memberno)
	{
		if(top.customer_editform_2 != 'undefined')		
		{		
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/customer_editform_2.cfm'
			var oNewForm = make_form("link_get_customer_rec", sAction, "customer_editform_2")
		}
		else
		{
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/customer_editform_2.cfm'
			var oNewForm = make_form("link_get_customer_rec", sAction, "syscustomer")
		}

		if(link_memberno == 'new')		
			{
				make_input(oNewForm, 'current.memberno','')
				make_input(oNewForm, 'customer.memberno','')						
			}
		else
			{
				make_input(oNewForm, 'current.memberno',link_memberno)
				make_input(oNewForm, 'customer.memberno',link_memberno)			
			}
			
			oNewForm.submit()			

	}
	
function link_get_animal_rec(link_regisno)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/animal_display.cfm'
		var oNewForm = make_form("link_get_animal_rec", sAction, "sysanimal")

		make_input(oNewForm, 'animal.regisno',link_regisno)
		oNewForm.submit()
	}

function link_whole_herd_edit_new(regisno)	
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/animal_whole_herd_editform_new.cfm'
		var oNewForm = make_form("link_wholeherd_edit", sAction, "link_wholeherd_edit")		
		//Changes color to appear clicked.
		event.srcElement.style.color = "green"
		make_input(oNewForm, 'animal.regisno',regisno)
				/* Should be a window check routine */
		//window.open('','link_wholeherd_edit','height=150,width=450,status=no,toolbar=no,menubar=no,location=no,resizable=yes')
		oNewForm.submit()
	}

function link_wholeherd_edit(regisno)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j211.cfm'
		var oNewForm = make_form("link_wholeherd_edit", sAction, "link_wholeherd_edit")		
		
		//Changes color to appear clicked.
		event.srcElement.style.color = "green"
		
		make_input(oNewForm, 'set_regisno',regisno)
		make_input(oNewForm, 'set_table','animal_whole_herd')

		
/* Should be a window check routine */
		//window.open('','link_wholeherd_edit','height=150,width=450,status=no,toolbar=no,menubar=no,location=no,resizable=yes')

		oNewForm.submit()
	}

function link_j35(edit_memberno)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j35.cfm'
		var oNewForm = make_form("link_get_animal_rec", sAction, "sysanimal")

		make_input(oNewForm, 'edit_memberno',edit_memberno)
		oNewForm.submit()
	}
	
function link_get_animal_ped(link_regisno)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j34.cfm'
		var oNewForm = make_form("link_get_animal_rec", sAction, "sysanimal")
	
		make_input(oNewForm, 'pedigree_id',link_regisno)
		oNewForm.submit()
	}

function link_select_include(a,b)
	{
		window.open('','def_field_select_editform','status=yes,toolbar=no,menubar=no,location=yes,resizable=yes,scrollbars')	
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/def_field_select_editform.cfm'
		var oNewForm = make_form("", sAction, "def_field_select_editform")

		if(isNaN(a)==false)	
		{
			make_input(oNewForm, 'def_field.def_field_id',a)		
			make_input(oNewForm, 'def_field_id',a)		
			make_input(oNewForm, 'from_where','edit')		
		}
		else
		{
			make_input(oNewForm, 'msc_table',a)
			make_input(oNewForm, 'msc_field',b)
		}
		
		if(document.all.dfs_status=='undefined')
		{
			if(isNaN(document.all.dfs_status.value)==false)
			{
				make_input(oNewForm, 'dfs_status',document.all.dfs_status.value)
			}
			else
			{
				make_input(oNewForm, 'dfs_status','')
			}		
		}
		
		oNewForm.submit()
	}

function select_distinct_detect()
{
	window.open('','select_include_distinct_detect','height=150,width=450,status=no,toolbar=no,menubar=no,location=no,resizable=yes')
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'select_include/select_include_distinct_detect.cfm'
	var oNewForm = make_form("", sAction, "select_include_distinct_detect")
	oNewForm.submit()
}
	
function set_select_process(def_field_id,msc_input_type,dfsp_process_code)
	{
		window.open('','set_select_process','height=150,width=450,status=no,toolbar=no,menubar=no,location=no,resizable=yes')
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'select_include/select_include_process.cfm'
		var oNewForm = make_form("", sAction, "set_select_process")
		make_input(oNewForm, 'dfsp_process_code',dfsp_process_code)
		make_input(oNewForm, 'msc_input_type',msc_input_type)
		make_input(oNewForm, 'def_field_id',def_field_id)
		oNewForm.submit()
	}	
	
function link_def_named_cfm_editform(dncf_id)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/def_named_cfm_editform.cfm'
		var oNewForm = make_form("", sAction, "")
		make_input(oNewForm, 'dncf_id',dncf_id)
		oNewForm.submit()
	}

function edit_def_named_cfm_editform(dncf_id)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/def_named_cfm_editform.cfm'
		var oNewForm = make_form("", sAction, "")
		make_input(oNewForm, 'dncf_id',dncf_id)
		make_input(oNewForm, 'from_where',"edit")
		oNewForm.submit()
	}
	
function link_get_job_rec(link_sched_job_id)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j175.cfm'
		var oNewForm = make_form("link_get_animal_rec", sAction, "sysjob2")

		make_input(oNewForm, 'sched_job.sched_job_id',link_sched_job_id)
		make_input(oNewForm, 'from_where','search')
		oNewForm.submit()
	}
	

function link_edit_sale_direct(link_regisno)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'sale/sale_direct_edit.cfm'
		var oNewForm = make_form("link_get_animal_rec", sAction, "sysanimal")
		make_input(oNewForm, 'current.regisno',link_regisno)
		oNewForm.submit()
	}
	
function link_edit_sale_editform(link_regisno)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'sale/sale_editform.cfm'
		var oNewForm = make_form("link_get_animal_rec", sAction, "sysanimal")
		make_input(oNewForm, 'current.regisno',link_regisno)
		oNewForm.submit()
	}

function link_edit_sale_transfer(link_buyer_id)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'sale/sale_transfer_editform.cfm'
		var oNewForm = make_form("link_get_animal_rec", sAction, "sysanimal")
		make_input(oNewForm, 'sale_list.sale_buyer_id',link_buyer_id)
		oNewForm.submit()
	}

function link_sale_list_reload(sale_group_id,sale_list_refresh_p,order_by)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'sale/sale_animal_price_list.cfm'
		var oNewForm = make_form("link_sale_list_reload", sAction)
		make_input(oNewForm, 'sale_list.sale_group_id',sale_group_id)
		make_input(oNewForm, 'sale_list_refresh_p',sale_list_refresh_p)
		make_input(oNewForm, 'order_by',order_by)
		make_input(oNewForm, 'from_where','Search')
		oNewForm.submit()
	}


function link_tool_srch_view_options(tables)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/tool_srch_views.cfm'
		var oNewForm = make_form("link_get_animal_rec", sAction, "")
		make_input(oNewForm, 'tool_srch_tables.list',tables)
		oNewForm.submit()
	}

function link_tool_srch_view_select(tables,select_string,wrap_after)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/tool_srch_views.cfm'
		var oNewForm = make_form("link_get_animal_rec", sAction, "")
		make_input(oNewForm, 'tablename',tables)
		make_input(oNewForm, 'tool_srch_tables.list',tables)
		make_input(oNewForm, 'user_tool.select_string',select_string)
		make_input(oNewForm, 'user_tool.wrap_after',wrap_after)
		make_input(oNewForm, 'from_where','select_view')
		oNewForm.submit()
	}

function link_dam_calfList(regisno,find_how,get_calf_info,get_all_info)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/dam_calfList.cfm'
		var oNewForm = make_form("link_get_animal_rec", sAction, "")
		make_input(oNewForm, 'animal.damreg.srch',regisno)
		make_input(oNewForm, 'find_how',find_how)
		make_input(oNewForm, 'get_calf_info.srch',get_calf_info)
		make_input(oNewForm, 'get_all_info.srch',get_all_info)
		oNewForm.submit()
	}
	
function link_animal_sale_editform(regisno)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'herd/animal_sale_editform.cfm'
		var oNewForm = make_form("link_get_animal_rec", sAction, "")
		make_input(oNewForm, 'animal.reg.srch',regisno)
		make_input(oNewForm, 'from_where','search')
		oNewForm.submit()
	}




	

function link_ft_view(drive,path,name,task)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'task/ft_file_view.cfm'
		var oNewForm = make_form("file_view", sAction, "file_view")
		make_input(oNewForm, 'nf169.drive',drive)
		make_input(oNewForm, 'nf169.path',path)
		make_input(oNewForm, 'nf169.name',name)
		if(task)
		{
			make_input(oNewForm, 'nf169.task',task)
		}
		else
		{
			make_input(oNewForm, 'nf169.task',1)
		}
		
		oNewForm.submit()
	}
		

	
function link_add_access_point_object_screen(access_point_index_id)
	{
		
		window.open('','ap_add_object','height=450,width=650,status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars')
		sTarget = "ap_add_object"

		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'access_point/access_point_var_add_object.cfm'
		var oNewForm = make_form("link_ap_add_object", sAction, sTarget)
		
		make_input(oNewForm, 'access_point_index.access_point_index_id',access_point_index_id)
		oNewForm.submit()
	}

function link_add_access_point_object(access_point_object_id,access_point_index_id)
	{
		var do_delete = new Boolean();
		
		do_delete = confirm('Are you sure you want to add this object?')
		if(do_delete)
		{
			var add_object_url = new String();
			add_object_url = myhttp_mode+":/"+"/"+mydomain_data_path+"access_point/access_point_var_add_object_sql.cfm?access_point_object_id="+access_point_object_id+"&access_point_index_id="+access_point_index_id
			window.open(add_object_url,'add_object','width=1,height=1,resizable=1,status=0,toolbar=0,menubar=0,scrollbars,screenX=-50,screenY=-50,top=5000,left=5000');
			event.srcElement.innerHTML = ''
		}
	}



function redirect_function(function_name)
	{
		eval(function_name+'()')
		//alert(eval(function_name))		
	}


// This will call the file which searches for a map variable help file
function get_map_key(map_item, key_id)
	{
	
		demarc = map_item.indexOf("==");
		var map_item_var = new String();
		var map_item_value = new String();
		map_item_var = map_item.substr(0,demarc);
		map_item_value = map_item.substr(demarc+2);
		w=document.body.clientWidth*0.75
		h=document.body.clientHeight*0.95

		//map_item_help_url = "http://"+mydomain_data_path+"invoice/invoice_map_help/invoice_map_help.cfm?map_item_var="+map_item_var+"&map_item_value="+map_item_value;
					
		window.open('','map_item_help','width='+w+',height='+h+',resizable=1,status=0,toolbar=0,menubar=0,scrollbars,screenX=10,screenY=40,top=10,left=40');
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/invoice_map_help/invoice_map_help.cfm'
		var sTarget = 'map_item_help'
		var oNewForm = make_form("map_item_help", sAction, sTarget)
		make_input(oNewForm, 'map_item_var',map_item_var)
		make_input(oNewForm, 'map_item_value',map_item_value)
		make_input(oNewForm, 'key_id',key_id)
		oNewForm.submit()	
	}

function link_order_j160(order_by,up_down)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j160.cfm'
		var oNewForm = make_form("link_order_j160", sAction, "")
		make_input(oNewForm, 'j160.order_by',order_by)
		make_input(oNewForm, 'j160.up_down',up_down)
		oNewForm.submit()		
	}	
// END This will call the file which searches for a map variable help file

function link_tracking_update(fieldId,DRID,call_type)
	{
		window.open('','def_track_editform','height=0,width=0,status=no,toolbar=no,menubar=no,location=no,resizable=yes,screenX=10000,screenY=40000,top=10000,left=40000')
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/def_track_editform.cfm'
		var oNewForm = make_form("link_tracking_updates", sAction, "def_track_editform")
		make_input(oNewForm, 'call_type',call_type)
		make_input(oNewForm, 'n129.def_field_id',fieldId)
		make_input(oNewForm, 'n129.def_regsystem_id',DRID)
		make_input(oNewForm, 'n129.new_tracking_values',event.srcElement.value)
		oNewForm.submit()		
	}	

function link_user_password_lookup(customer_no)
	{
		window.open('user_password_lookup','user_password_lookup','height=0,width=0,status=no,toolbar=no,menubar=no,location=no,resizable=no,screenX=20,screenY=20,top=20,left=20,height=5,width=500')
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'user_password_lookup.cfm'
		var oNewForm = make_form("user_password_lookup", sAction, "user_password_lookup")
		make_input(oNewForm, 'nf182.customer_no',customer_no)
		oNewForm.submit()		
	}		
	

// End link based functions


// Context Menu Functions
/*
-- var animal_edit_CM_title = new Array("","","");
First order of precedence:
There can be an array attached to the function button with the name
function+"_title" - with each array value coinciding with a button.

-- function reverse_workgroup_cm_title() 
Second order of precedence is a function that returns the title string

-- var reverse_workgroup_cm_title = "List of Workgroups in which this Animal has been a member"
Third order of precedence:
Context menu titles can be attached by way of a global variable
with the same name as the function+"_title"
*/

function reverse_workgroup_cm_title() 
	{
		x = "List of Workgroups in which this Animal has been a member"
		return x
	}

function reverse_workgroup_cm()
	{
		if(frm_menu.menu1_txt.value=='')
		{
		
			if(myregisno.toUpperCase()=='NULL' || myregisno=='')
				{
					retain_menu = 1
					alert('You have no animal to lookup')
				}
			else
				{
					thisRegisno = myregisno
				}
		}
		else
			{thisRegisno = frm_menu.menu1_txt.value}
		
		if(thisRegisno != null)
		{
			link_reverse_workgroup(thisRegisno)
		}
	}


function standard_menu_cm()
	{				
		if(typeof event.srcElement.index != 'undefined')
			{
				x = event.srcElement.index
				button = event.srcElement.epdi_button
				standard_menu(eval(button+'_CM_p0['+x+']'))
			}
	}

var animal_delete_cm_title = "Delete an animal from the system"

function rule_override_cm()
	{standard_menu('control/c1.cfm')}

function repair_missing_events_cm()
	{standard_menu('sidejobs/shane/blonde/repair_missing_events.cfm')}

function logout_cm()
	{standard_menu('logout.cfm')}

function animal_delete_cm()
	{standard_menu('job/j106.cfm')}

function workgroup_force_release_cm()
	{standard_menu('invoice/workgroup_force_release.cfm')}
	
function member_add_cm()
	{standard_menu('registry/new_member_entryform.cfm')}

function herdletters_srch_cm()
	{standard_menu('tool/herdletters.cfm')}

function member_wh_cm()
	{
	
			if(frm_menu.menu1_txt.value!='')
				{
					var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'report/rep1002.cfm'
					var oNewForm = make_form("member_wh", sAction, "member_wh")						
					make_input(oNewForm, 'customer.memberno',frm_menu.menu1_txt.value);
					oNewForm.submit()
				}
			else{
					alert('A Member Number is required.')			
				}
	}


function brangus_owner_history_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'sidejobs/brangus/new_jobs/brangus_owner_history.cfm'
		var oNewForm = make_form("member_wh", sAction, "member_wh")
		make_input(oNewForm, 'owner_history_regisno.srch',frm_menu.menu1_txt.value);
		make_input(oNewForm, 'from_where','Search')
		oNewForm.submit()
	}
	
function brangus_owner_history_cm_title()
	{
		var brangus_owner_history_cm_title = 'Review previous Brangus Owner History'
		return brangus_owner_history_cm_title
	}

// Cstell: This function should display and ask which value to use if both exist...
function member_edit_cm()
	{		
		/*
		
			CSTELL 012502: This requires a numeric value to be used to access the member edit.
			This should be temporary!
			
			To keep this from just dead ending folks, you could add "member_srch()" , as this will just
			go to j35 searching off of the inputs value.
		*/
		if(isNaN(frm_menu.menu1_txt.value))
		{
			alert('A Member Number is required.')
		}
		else
		{
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/customer_editform.cfm'
			var oNewForm = make_form(event.srcElement.name, sAction)
	
			if(frm_menu.menu1_txt.value!='')
				{make_input(oNewForm, 'customer.memberno',frm_menu.menu1_txt.value);oNewForm.submit()}
			else{
					if(mymemberno.toUpperCase()=='NULL' || mymemberno=='')
						{retain_menu = 1;alert('You have no search key - either: \n\n 1) Acquire a workgroup or \n\n 2) Type a Member number in the search box.')}
					else
						{make_input(oNewForm, 'customer.memberno',mymemberno);oNewForm.submit()}
				}
		}
	}


function workgroup_release_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/workgroup_checkout.cfm'
		var oNewForm = make_form("release_wg", sAction, "")
		make_input(oNewForm, 'checkin_step','release_invoice')
		make_input(oNewForm, 'invoice.invoice_id',myinvoice_id)
		make_input(oNewForm, 'curlocation','invoice/invoice_search.cfm')
		oNewForm.submit()
	}
// curlocation can be integrated as a global var

// Table search functions - make these more unified and systemic

function animal_table_search_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/system_search.cfm'
		var oNewForm = make_form("search_animal", sAction, "")
		make_input(oNewForm, 'tablename','animal')
		oNewForm.submit()
	}

function calf_search_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'herd/herd_calf_search.cfm'
		var oNewForm = make_form("calf_search_cm", sAction, "")
		oNewForm.submit()
	}

function active_animal_search_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'herd/herd_active_animal_search.cfm'
		var oNewForm = make_form("active_animal_search_cm", sAction, "")
		oNewForm.submit()
	}
function wh_animal_search_cm()
	{
		if(frm_menu.menu1_txt.value=='' || isNaN(parseInt(frm_menu.menu1_txt.value)))
		{
			alert("You must give a valid regisno.")	
		}
		else
		{
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'report/rep1003.cfm'
			var oNewForm = make_form("wh_animal_search_cm", sAction, "")
			make_input(oNewForm, 'animal.regisno',frm_menu.menu1_txt.value)
			oNewForm.submit()
					
		}
	}

function wh_enrole_search_cm()
	{
		if(frm_menu.menu1_txt.value=='' || isNaN(parseInt(frm_menu.menu1_txt.value)))
		{
			alert("You must give a valid memberno.")	
		}
		else
		{
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'report/rep1005.cfm'
			var oNewForm = make_form("wh_enrole_search_cm", sAction, "")
			make_input(oNewForm, 'customer.memberno',frm_menu.menu1_txt.value)
			oNewForm.submit()
					
		}
	}
	
	
function customer_table_search_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/system_search.cfm'
		var oNewForm = make_form("search_customer", sAction, "")
		make_input(oNewForm, 'tablename','customer')
		oNewForm.submit()
	}

var sys_srch_cm_title = "Search the data in the selected table."

function do_sys_srch_cm()
	{
		x = event.srcElement.index		
		sys_srch_cm(sys_srch_CM_p0[x])
	}

function sys_srch_cm(srch)
	{
		
		if(typeof srch != 'undefined')
			{
				var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/system_search.cfm'
				var oNewForm = make_form("search_"+srch, sAction, "")
				make_input(oNewForm, 'tablename',srch)
				oNewForm.submit()
			}
		else
			{
				var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/system_search_root.cfm'
				var oNewForm = make_form("search_"+srch, sAction, "")
				oNewForm.submit()
			}		
	}	
// END Table search functions - make these more unified and systemic

// File Distribution functions
function j160_file_manage_filter_level()
	{
		var x = event.srcElement.index		
		var mypath = my_p1 //frm_menu.menu1_txt.value
		j160_file_manage_filter(j160_file_manage_filter_CM_p0[x], mypath)

	}
	
function j160_file_manage_filter(level, mypath)
	{
		var mypath_use = new String
		if(level < 100)
			{
				var slash_loc = new Number();
				for(var i=0;i<level;i++)
					{
						slash_loc = mypath.substr(slash_loc,mypath.length-slash_loc).indexOf("\\")+1+slash_loc;
					}
		
					mypath_use = mypath.substr(0,slash_loc)
			}
		else
			{
					mypath_use = mypath
			}
			
			/* MSCNote 030326
			Need to refine the treatment of the path and also add a form element that 
			will allow the sql to do a like or = based on the treatment of the path - if you went
			to the end of the path it should be an equal rather than like
			*/

		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j160.cfm'
		var sTarget = ''
		var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
		make_input(oNewForm, 'from_where','Refresh')
		make_input(oNewForm, 'j160.filter_files',1)
		make_input(oNewForm, 'j160.filter_value', mypath_use)
		oNewForm.submit()	

	}
// END File Distribution functions

// Invoice function
var workgroup_invoice_print_cm_title = "You may type in an invoice number in the search box or look at the invoice for the current Workgroup."


function workgroup_invoice_print_cm()
	{

		if(frm_menu.menu1_txt.value!='')
				{workgroup_invoice_print_go(frm_menu.menu1_txt.value)}
		else{
				if(myinvoice_id.toUpperCase()=='NULL' || myinvoice_id=='')
					{retain_menu = 1;alert('You have no search key - either: \n\n 1) Acquire a workgroup or \n\n 2) Type an Invoice number in the search box.')}
				else
					{workgroup_invoice_print_go(myinvoice_id)}
			}
	}
function workgroup_invoice_print_go(invoice_id)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/workgroup_invoice_print.cfm'
	var oNewForm = make_form("invoice_print", sAction, "Invoice")
	make_input(oNewForm, 'invoice.invoice_id',invoice_id)
	oNewForm.submit()
}
// END Invoice function

// Acquire workgroup function
var workgroup_acquire_cm_title = "Type an invoice number and click this option to Acquire the workgroup."

function workgroup_acquire_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/workgroup_editform.cfm'
		var oNewForm = make_form("invoice_acquire", sAction, "")
		
		if(frm_menu.menu1_txt.value=='' || isNaN(parseInt(frm_menu.menu1_txt.value)))
			{
				retain_menu = 1
				alert('You have no search key - type an Invoice number in the search box to Acquire a workgroup')
			}
		else{
				make_input(oNewForm, 'invoice.invoice_id',frm_menu.menu1_txt.value)
				make_input(oNewForm, 'checkin_step', 'open_invoice')
				oNewForm.submit()
			}

	}
// END Acquire workgroup function

// Animal Sale information  - for herd management package only

var animal_sale_cm_title = "This is used to record sale information for the herd manager data"

function animal_sale_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'herd/animal_sale_editform.cfm'
		var oNewForm = make_form("animal_sale_editform", sAction, "")

		if(frm_menu.menu1_txt.value!='')
			{
				make_input(oNewForm, 'current.regisno',frm_menu.menu1_txt.value)
				oNewForm.submit()
			}
		else{
				if(myinvoice_id.toUpperCase()=='NULL' || myinvoice_id=='')
					{
						retain_menu = 1
						alert('You have no search key - type a regisno in the search box')
					}
				else
					{
						make_input(oNewForm, 'current.regisno',myregisno)
						oNewForm.submit()
					}
			}
	}

// END Animal Sale information 


// Animal Foreign Info Edit
function animal_foreign_edit_cm_title() 
	{
		x = "This editform is primarily used to edit Foreign EPD's"
		return x
	}


function animal_foreign_edit_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/mn_foreign_key_editform.cfm'
		var oNewForm = make_form("animal_foreign_editform", sAction, "")

		if(frm_menu.menu1_txt.value!='')
			{
				make_input(oNewForm, 'current.regisno',frm_menu.menu1_txt.value)
				oNewForm.submit()
			}
		else{
				if(myinvoice_id.toUpperCase()=='NULL' || myinvoice_id=='')
					{
						retain_menu = 1
						alert('You have no search key - type a regisno in the search box')
					}
				else
					{
						make_input(oNewForm, 'current.regisno',myregisno)
						oNewForm.submit()
					}
			}	
	}
// END Animal Foreign Info Edit


function invoice_line_editform_cm_title()
	{
		var invoice_line_editform_cm_title = 'View your Invoice Line Items.'
		return invoice_line_editform_cm_title
	}
	
function invoice_line_editform_cm()
	{
		standard_menu('invoice/invoice_line_editform.cfm')		
	}


function animal_upgrade_cm_title()
	{
		var animal_upgrade_cm_title = 'Upgrade a Performance Animal to Registered.'
		return animal_upgrade_cm_title
	}
	
function animal_upgrade_cm()
	{
		standard_menu('registry/animal_registration_upgrade.cfm')		
	}

// END Context Menu Functions


function link_def_smart_tips(def_smart_tips_id, st_field, st_table, page_mode)
{
	var send_mode = 0

	var sTarget = 'def_smart_tips'
	if(isNaN(page_mode)==false)
	{
		if(page_mode==2)
		{
			sTarget = '_blank'
		}
		send_mode = 1		
	}
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/def_smart_tips_container.cfm'
	var oNewForm = make_form("registry/def_smart_tips_editform", sAction, sTarget)
	make_input(oNewForm, 'def_smart_tips.st_field',st_field)
	make_input(oNewForm, 'def_smart_tips.st_table',st_table)
	make_input(oNewForm, 'def_smart_tips.def_smart_tips_id',def_smart_tips_id)
	if(send_mode==1)
	{
		make_input(oNewForm, 'nf223.page_mode',page_mode)	
	}
	oNewForm.submit()
}

function show_hidden(which)
{

	if(typeof(document.all.parentobj)=='object')
	{
		for(var all_tab=0; all_tab<document.all.parentobj.children.length; all_tab++)		
		{
			document.all.parentobj.children(all_tab).style.display = 'none'				
		}
	}
	if(typeof(eval(which))=='object')
	{
		object = eval(which)
		if(typeof(object.style)=='object')
		{
			if(object.style.display=='none')
			{
				object.style.display = ''
			}
			else
			{
				object.style.display = 'none'				
			}
		}
	}


}

function search_by_letter(varname,url)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+url
	var oNewForm = make_form(url, sAction, "")
	make_input(oNewForm, varname, event.srcElement.value)
	make_input(oNewForm, 'find_how', 1)
	make_input(oNewForm, 'search_by_letter', 1)
	oNewForm.submit()
}

function call_report_window(full_path,printed_id)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'reporting/display_report.cfm'
	var sTarget = 'report' + printed_id
	var oNewForm = make_form('', sAction, sTarget)
	make_input(oNewForm, 'reports_printed_id', printed_id)
	make_input(oNewForm, 'full_path' , full_path)
	event.srcElement.parentElement.style.backgroundColor= "yellow"
	oNewForm.submit()
}

function call_report_window_no_color(full_path,printed_id)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'reporting/display_report.cfm'
	var sTarget = 'report' + printed_id
	var oNewForm = make_form('', sAction, sTarget)
	make_input(oNewForm, 'reports_printed_id', printed_id)
	make_input(oNewForm, 'full_path' , full_path)
	oNewForm.submit()
}


function link_apply_payment(one_of_two_possible_ids, insert_or_update, memberno)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/payment_invoice_link.cfm'
	var sTarget = '_self'
	var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
	if(insert_or_update=='insert')
	{
		make_input(oNewForm, 'payment.payment_id',one_of_two_possible_ids)		
	}
	if(insert_or_update=='update')
	{
		make_input(oNewForm, 'payment_line.payment_line_id',one_of_two_possible_ids)	
	}
		make_input(oNewForm, 'payment.memberno',memberno)		
	oNewForm.submit()
}
function link_payment(memberno, payment_id, sTarget)
{
	if(sTarget=='' || sTarget == null || typeof sTarget == 'undefined')
			{sTarget='payment_edit'}		
	else
			{sTarget='payment_edit'}
			
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/payment_editform.cfm'
	var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
	if(payment_id!='undefined')
	{
		make_input(oNewForm, 'payment.payment_id',payment_id)			
	}
	make_input(oNewForm, 'payment.memberno',memberno)		
	oNewForm.submit()
}
function link_payment_display(memberno)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/payment_display.cfm'
	var sTarget = '_self'
	var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
	make_input(oNewForm, 'payment.memberno',memberno)		
	oNewForm.submit()
}
function make_modified_link(regisno)
{

	var do_update = confirm("Do you want to mark this animal as being MODIFIED?")
	
	if(do_update == true)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/make_modified.cfm'
		var sTarget = 'new'
		var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
		make_input(oNewForm, 'animal.regisno',regisno)		
		oNewForm.submit()
	}
}

function payment_master_link(which)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/payment_report_master.cfm'
	var sTarget = ''
	var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
	var x = event.srcElement.index		
	make_input(oNewForm, 'nf261.tables_to_show',accounting_CM_p0[x])		
//	make_input(oNewForm, 'nf260.customer.memberno',mymemberno)		We decided not to default pass it
	oNewForm.submit()
}

function link_customer_containerPOPUP(memSearch)
{

	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'customer/customer_container.cfm'
	var sTarget = '_new_top'
	var oNewForm = make_form('go_on_form', sAction, sTarget)
	make_input(oNewForm, 'customer.Search', memSearch)
	oNewForm.submit()
}

function link_customer_container(memNum)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'customer/customer_container.cfm'
	var sTarget = ''
	var oNewForm = make_form('go_on_form', sAction, sTarget)
	make_input(oNewForm, 'customer.memberno',memNum)		
	oNewForm.submit()
}

function link_users_container(user_id)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'customer/users_container.cfm'
	var sTarget = ''
	var oNewForm = make_form('go_on_form', sAction, sTarget)
	make_input(oNewForm, 'users.user_id',user_id)
	oNewForm.submit()
}


function link_users_createform(memberno)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'customer/users_container.cfm'
	var sTarget = ''
	var oNewForm = make_form('go_on_form', sAction, sTarget)
	make_input(oNewForm, 'customer.memberno',memberno)
	oNewForm.submit()
}



function at_link_member_view(memberNo,what)
	{
		//Changes color to appear clicked.
		event.srcElement.style.color = "green"
			
		if(what==5)
		{
			window.open('','edit','')
			sTarget = "edit"		
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'atlanta_transformation/edit/at_member_edit.cfm'
		}
		else
		{
			sTarget = "top_right"			
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'atlanta_transformation/display/at_member_display.cfm'
		}
		

		var oNewForm = make_form("member.srch", sAction, sTarget)
		make_input(oNewForm, 'at_member.srch',memberNo)
		make_input(oNewForm, 'find_how',0)
		make_input(oNewForm, 'from_where','search')		
		make_input(oNewForm, 'find_what',what)		
		oNewForm.submit()
	}

function artb_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'accounting/brangus_artb.cfm'
		var oNewForm = make_form("active_animal_search_cm", sAction, "")
		oNewForm.submit()
	}

function at_link_group_view(memberNo,what)
	{
		//Changes color to appear clicked.
		event.srcElement.style.color = "green"
			
		if(what==5)
		{
			window.open('','edit','height=450,width=850,status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars')
			sTarget = "edit"		
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'atlanta_transformation/edit/at_group_edit.cfm'
		}
		else
		{
			sTarget = "self"			
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'atlanta_transformation/display/at_group_display.cfm'
		}
		

		var oNewForm = make_form("gropu.srch", sAction, sTarget)
		make_input(oNewForm, 'at_group.srch',memberNo)
		make_input(oNewForm, 'find_how',0)
		make_input(oNewForm, 'from_where','search')		
		make_input(oNewForm, 'find_what',what)		
		oNewForm.submit()
	}

function daily_receipts_report()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/daily_receipt_summary.cfm'
		var oNewForm = make_form('', sAction)
		oNewForm.submit()
	}

function daily_sales_report()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/daily_sales_report.cfm'
		var oNewForm = make_form('', sAction)
		oNewForm.submit()
	}

function post_invoices()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/invoice_posting.cfm'
		var oNewForm = make_form('', sAction)
		oNewForm.submit()
	}

function post_payments()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/payment_posting.cfm'
		var oNewForm = make_form('', sAction)
		oNewForm.submit()
	}

function payment_editform_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/payment_editform.cfm'
		var oNewForm = make_form('', sAction)
		oNewForm.submit()
	}

function inventory_editform_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/inventory_editform.cfm'
		var oNewForm = make_form('', sAction)
		oNewForm.submit()
	}
	
function period_sales_status_report_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'invoice/period_sales_status_report.cfm'
		var oNewForm = make_form('', sAction)
		oNewForm.submit()
	}

function view_statistics_report_cm()
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'reporting/statistics_reports_main.cfm'
		var oNewForm = make_form('', sAction)
		oNewForm.submit()
	}

function home()
	{
		home_page()
	}

function link_committee_manager(org)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'cattlemen/committee/committee_manage.cfm'
		var oNewForm = make_form('', sAction)
		make_input(oNewForm, 'organization.organization_id',org)
		oNewForm.submit()
	}


function link_forgot_password(username,fw)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'forgot_password.cfm'
		var oNewForm = make_form('_new', sAction,'_new')
		make_input(oNewForm, 'users.username',username)
		make_input(oNewForm, 'from_where',fw)
		oNewForm.submit()
	}
	
function open_mem_herd_epd_report(membernumber,sql_order_string)
   {
		window.open('','mem_herd_epd_report','height=600,width=500,status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars')
		var sAction = 'http:/'+'/'+mydomain_data_path+'reporting/mem_herd_epd_report_core.cfm'
		var oNewForm = make_form("mem_herd_epd_report", sAction, "mem_herd_epd_report")
		var sTarget = 'mem_herd_epd_report'
		make_input(oNewForm, 'sql_order_str',sql_order_string)
		make_input(oNewForm, 'memnumber', membernumber)
		oNewForm.submit()
	}
	
function link_mem_herd_epd_report(id,name)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'reporting/mem_herd_epd_report.cfm'
		var oNewForm = make_form("new", sAction)
		make_input(oNewForm, 'membernumber', id)
		make_input(oNewForm, 'membername', name)	
		oNewForm.submit()
	}

function Please_Wait(){
  var oPopup = window.createPopup();
  var oPopupBody = oPopup.document.body;
  oPopupBody.innerHTML = "<P><span style='position:relative;left:220'><img src='./icons/runner1.gif'></span></P><span style='font-size:22;color:red;position:relative;left:185'>PLEASE WAIT...</span><BR><span style='font-size:14;position:relative;left:185'>We're retrieving your data.</span>";
  // The following popup object is used only to detect what height the 
    // displayed popup object should be using the scrollHeight property. 
    // This is important because the size of the popup object varies 
    // depending on the length of the definition text. This first 
    // popup object is not seen by the user.
	oPopupBody.bgColor='#B0E0E6';
	oPopupBody.style.border = "solid black 1px";
    oPopup.show(0, 0, 300, 0);
    var realHeight = oPopupBody.scrollHeight;
    // Hides the dimension detector popup object.
    oPopup.hide();
    // Shows the actual popup object with correct height.
  oPopup.show(250, 250, 500, realHeight, document.body);
 }

function verify_regn(s1_search)
{
	sTarget = "_new"
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'search/s1.cfm'
	var oNewForm = make_form("s1_shot", sAction, sTarget)
	make_input(oNewForm, 's1_search',s1_search)
	make_input(oNewForm, 'from_where','s1_do_search')
	oNewForm.submit()
}

function link_c21(id,col)
{
	window.open('','c21','height=300,width=700,status=yes,toolbar=no,menubar=no,location=no,resizable=no')
	var sAction = 'http:/'+'/'+mydomain_data_path+'control/c21.cfm'
	var sTarget = 'c21'
	var oNewForm = make_form("c21", sAction, "c21")
	make_input(oNewForm, 'invoice_workgroup.invoice_id', id)
	make_input(oNewForm, 'edit_column', col)
	oNewForm.submit()		
}
	

function markWorkNoteDone(id)
	{
		var sTarget = ''
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j246.cfm'
		var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
		make_input(oNewForm, 'work_note.work_note_id', id)
		oNewForm.submit()	
	}
	
function link_show(id)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'show/show_container.cfm'
	var sTarget = ''
	var oNewForm = make_form('a', sAction, sTarget)	
	make_input(oNewForm, 'show_animal_link.show_id',id)		
	oNewForm.submit()
}	

function link_show_animal_link(id)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'show/show_animal_link_manage.cfm'
	var sTarget = ''
	var oNewForm = make_form('a', sAction, sTarget)	
	make_input(oNewForm, 'show_animal_link.show_id',id)		
	oNewForm.submit()
}


function export_show_animal_link(id)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'show/export_show.cfm'
	var sTarget = ''
	var oNewForm = make_form('a', sAction, sTarget)	
	make_input(oNewForm, 'show.show_id',id)		
	oNewForm.submit()
}

// MSC Added 05112004
function find_this_report_from_invoice_search(invoice_id)
	{
		sTarget = "reports"

		var sAction = myhttp_mode+":/"+"/"+mydomain_data_path+"reporting/report_search.cfm"
		var oNewForm = make_form("count_lines", sAction, sTarget)
		
		make_input(oNewForm, 'report_search',invoice_id)
		make_input(oNewForm, 'find_how',0)
		make_input(oNewForm, 'from_where','report_do_search')
		oNewForm.submit()
	}
// MSC Added 05112004

// MSC Added 05122004
function do_invoice_count_lines(invoice_id)
	{
		window.open('','count_lines','width=400,height=500,resizable=1,status=0,toolbar=0,menubar=0,scrollbars,screenX=-50,screenY=-50,top=50,left=50');
		sTarget = "count_lines"

		var sAction = myhttp_mode+":/"+"/"+mydomain_data_path+"invoice/invoice_count_lines.cfm"
		var oNewForm = make_form("count_lines", sAction, sTarget)
		
		make_input(oNewForm, 'ica_invoice_id',invoice_id)
		make_input(oNewForm, 'show_info',1)
		oNewForm.submit()
	}
// MSC Added 05122004

// MSC Added 05122004
function do_report_query_review(invoice_id,report_variation_id)
	{
		window.open('','report_query_review','width=800,height=500,resizable=1,status=0,toolbar=0,menubar=0,scrollbars,screenX=-50,screenY=-50,top=50,left=50');
		sTarget = "report_query_review"

		var sAction = myhttp_mode+":/"+"/"+mydomain_data_path+"control/c27.cfm"
		var oNewForm = make_form("report_query_review", sAction, sTarget)
		
		make_input(oNewForm, 'report_variation.report_variation_id_srch',report_variation_id)
		make_input(oNewForm, 'invoice.invoice_id_srch',invoice_id)
		oNewForm.submit()
	}
// MSC Added 05122004



// MSC Added 05152004
function open_kickout(criteria,kc_data)
   {
   		var get_report = confirm('Would you like to produce the error report for '+criteria +' '+ kc_data+' in PDF format?') // \n
		
		if(get_report)
			{
				window.open('','kickout_report','height=600,width=500,status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars')
				var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'reporting/kickout_report.cfm'
				var oNewForm = make_form("kickout_report", sAction, "kickout_report")
				var sTarget = 'kickout_report'
				make_input(oNewForm, 'kc_data',kc_data)
				make_input(oNewForm, 'criteria',criteria) //This is reg or mem -  determines the search key
				oNewForm.submit()
			}
	}
// MSC Added 05152004

// MSC Added 05252004
function verify_memberno(find_memberno)
	{
		window.open('', 'verify', 'height=600,width=520,status=no,toolbar=no,menubar=no,location=no,resizable=yes')
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'job/j35.cfm'
		var sTarget = 'verify'
		var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
		make_input(oNewForm, 'edit_memberno',find_memberno)
		oNewForm.submit()
	}
// MSC Added 05252004

// CStell Added 16Aug2004
function copy(data)
{
	x = frm_menu.menu1_txt.value
	frm_menu.menu1_txt.value = data
	therange=frm_menu.menu1_txt.createTextRange()
	therange.execCommand("Copy")
	frm_menu.menu1_txt.value = x
}

function emailUpdate(which, data)
	{
		window.open('', 'emailUpdate', 'height=600,width=520,status=no,toolbar=no,menubar=no,location=no,resizable=yes')
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'customer/email_update.cfm'
		var sTarget = 'emailUpdate'
		var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
		if(which==1)
		{
			make_input(oNewForm, 'cattasc_member.cattasc_member_id', data)
		}
		if(which==2)
		{
			make_input(oNewForm, 'users.user_id', data)		
		}
		oNewForm.submit()
	}
//End 16Aug2004


// CStell Add 24Dec2004
	function project_work_record(project_id, action)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'management/project_work_record.cfm'
		var sTarget = 'project_work'
		

		
		if(window.name=='project_work')
		{
			var oNewForm = make_form('project_work', sAction, sTarget)		

		}
		else
		{
			window.open(sAction, 'project_work','height=100,width=300,status=no,toolbar=no,menubar=no,location=no,resizable=yes,screenX=1,screenY=1,top=450,left=600')
			var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
		}
		

		make_input(oNewForm, 'project_work.project_id', project_id)
		make_input(oNewForm, 'project_work.action', action)
		
		oNewForm.submit()
	}

	function project_edit(project_id)
	{
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'management/project_manager.cfm'
		var sTarget = '_Make_A_New_Window'+project_id
		var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
		make_input(oNewForm, 'project.project_id', project_id)
		make_input(oNewForm, 'from_where', 'edit')		
		oNewForm.submit()
	}

	function project_delete(project_id)
	{
		var confirm_project_delete
		confirm_project_delete = confirm('Are you sure you wish to delte this Project and all records of work on it?')
	
		if(confirm_project_delete)
		{
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'management/project_manager.cfm'
			var sTarget = ''
			var oNewForm = make_form(event.srcElement.name, sAction, sTarget)
			make_input(oNewForm, 'project.project_id', project_id)
			make_input(oNewForm, 'from_where', 'delete')		
			oNewForm.submit()
		}	
	}

	/* Display tbody function*/
	function display_table_section(which)
		{
			
			if(typeof (eval('document.all.'+which)) != 'undefined')
			{
				if(eval('document.all.'+which+'.style.display') == 'none')
					{
						action = 'block'
					}
				else
					{
						action = 'none'
					}
				
				eval('document.all.'+which+'.style.display = action')
			}
			else
			{
				alert('ERROR: '+which+' is not properly referenced on this form.')
			}
		}
	/* END: Display tbody function*/
	
		function start_new(with_note, project_id)
		{
			var confirm_new
	
			confirm_new = confirm('You have not started on this project to stop it. Would you like to Start?')
	
			if(confirm_new)
			{
				if(with_note==1)
				{
					project_work_record(project_id, 4)
				}
				else
				{
					project_work_record(project_id, 3)			
				}
			}
			else
			{
			}
		}	

		function end(with_note, project_id)
		{
			var confirm_end
	
			confirm_end = confirm('You have already started on a project. Would you like to Stop?')
	
			if(confirm_end)
			{
				if(with_note==1)
				{
					project_work_record(project_id, 1)
				}
				else
				{
					project_work_record(project_id, 2)			
				}
			}
			else
			{
			}
		}			
		
		function ask_for_note(project_work_id, action, project_id)
		{
			if(action==1)
			{
				msg = '- This is your End Note'
			}
			else
			{
				msg = '- This is your Start Note'			
			}
			note = prompt('Enter Your Note'+msg,'')
			if(action==1)
			{
				project_work_start = ''
				project_work_start_note = ''
				project_work_end = document.all.now.value
				project_work_end_note = note
			}			
			else
			{
				project_work_start = document.all.now.value
				project_work_start_note = note
				project_work_end = ''
				project_work_end_note = ''			
			}
			
			record(project_work_id, project_work_start, project_work_start_note, project_work_end, project_work_end_note, project_id)
		}	

		function record(project_work_id, project_work_start, project_work_start_note, project_work_end, project_work_end_note, project_id)
		{
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'management/project_work_core.cfm'
			var sTarget = 'project_work'
			var oNewForm = make_form('project_work', sAction, sTarget)		

			make_input(oNewForm, 'project_work.project_work_id', project_work_id)		
			make_input(oNewForm, 'project_work.project_work_start', project_work_start)
			make_input(oNewForm, 'project_work.project_work_start_note', project_work_start_note)
			make_input(oNewForm, 'project_work.project_work_end', project_work_end)
			make_input(oNewForm, 'project_work.project_work_end_note', project_work_end_note)
			make_input(oNewForm, 'project_work.project_id', project_id)


			oNewForm.submit()
		}
	
		function extremeDate(project_work_id)
		{
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'management/project_work_extreme.cfm'
			var sTarget = 'Project_work_extreme'
			var oNewForm = make_form('Project_work_extreme', sAction, sTarget)		

			make_input(oNewForm, 'project_work.project_work_id', project_work_id)


			oNewForm.submit()
		}

		function projectWorkSummary(week_containting_day, user_id, def_regsystem_id)
		{
			var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'management/project_work_summary.cfm'
			var sTarget = ''
			var oNewForm = make_form('', sAction, sTarget)		

			make_input(oNewForm, 'project_work.user_id', user_id)
			make_input(oNewForm, 'project_work.def_regsystem_id', def_regsystem_id)
			make_input(oNewForm, 'week_containting_day', week_containting_day)

			oNewForm.submit()
		}
// END: CStell Add 31Dec2004


// MSC Add 02192005 
function xls_file_builder_cm(report_name)
	{
		report_name = event.srcElement.p0
		xls_file_builder(report_name)
	}


function xls_file_builder(report_name)
	{		
		var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'exim/manual_export/manual_export_1.cfm?requesttimeout=600'
		var sTarget = 'filebuilder'

		short_domain = mydomain.substr(0,mydomain.indexOf("/"))
		do_file_build = confirm('This program will build an XLS file for your selected information.\n\nRequirements:\n\n'+myhttp_mode+':/'+'/'+short_domain+' must be a trusted site for your browser.\nFor best results, save the file on your computer before opening.\n\nPlease wait for the file save dialog box. \nIf you place your pointer over the small window and see your hourglass, the system is working as it should to produce your requested file.')

		if(do_file_build)
		{
			window.open('',sTarget,'height=100,width=200,status=no,toolbar=no,menubar=no,location=no,resizable=yes,screenX=10,screenY=40,top=10,left=40')
			var oNewForm = make_form('file_builder', sAction, sTarget)		
			make_input(oNewForm, 'export.report_name', report_name)
			make_input(oNewForm, 'export.menu1_txt', frm_menu.menu1_txt.value)
			oNewForm.submit()	
		}
	}
// END: MSC Add 02192005 

function breedingLink(breeding_regisno)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/breeding_editform.cfm'
	var sTarget = ''
	var oNewForm = make_form('', sAction, sTarget)		

	make_input(oNewForm, 'breeding.breeding_regisno', breeding_regisno)

	oNewForm.submit()
}

function deleteBreedingSire(breeding_regisno, breeding_sire_id)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'registry/breeding_editform.cfm'
	var sTarget = ''
	var oNewForm = make_form('', sAction, sTarget)		

	make_input(oNewForm, 'breeding.breeding_regisno', breeding_regisno)
	make_input(oNewForm, 'delete_breeding_sire.breeding_sire_id', breeding_sire_id)
	
	oNewForm.submit()
}

function recruitmentList(cattasc_member_id)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'customer/recruiter_list.cfm'
	var sTarget = ''
	var oNewForm = make_form('', sAction, sTarget)		

	make_input(oNewForm, 'cattasc_member.cattasc_member_id', cattasc_member_id)
	
	oNewForm.submit()
}


function link_new_com_type(organization_id)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'cattlemen/committee/committee_type_editform.cfm'
	var oNewForm = make_form("", sAction, "")
	make_input(oNewForm, 'organization.organization_id', organization_id)
	oNewForm.submit()
}
function link_new_com(organization_id)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'cattlemen/committee/committee_unit_editform.cfm'
	var oNewForm = make_form("", sAction, "")
	make_input(oNewForm, 'organization.organization_id', organization_id)
	oNewForm.submit()
}
function link_new_comPos(organization_id)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'cattlemen/committee/committee_position_editform.cfm'
	var oNewForm = make_form("", sAction, "")
	make_input(oNewForm, 'organization.organization_id', organization_id)
	oNewForm.submit()
}

function manage_commitee(organization_id)
{
	var sAction = myhttp_mode+':/'+'/'+mydomain_data_path+'cattlemen/committee/committee_manage.cfm'
	var oNewForm = make_form("", sAction, "")
	make_input(oNewForm, 'organization.organization_id', organization_id)
	oNewForm.submit()
}
	