//calculate total price on various forms.  Change the price HERE only!
var bookPrice = 50.00;
var lapelpinPrice = 5.00;
var vipPrice = 5.00;
var FiveYrPrice = 5.00;
var lifePrice = 10.00;
//Make sure all prices are here.

function calculateprice(ttlField, numPurchased, priceType){
	ttlField.value =  (numPurchased * priceType);
}


// JavaScript Document
function OpenNewCustomWindow( file, win ) {
        var newwindow = window.open(file, win, "left=300, top =120, width=800, height=500, scrollbars,statusbar=0,menubar=1");
      if (newwindow.opener == null ) newwindow.opener = self;
}

function anotherWindow(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=0,statusbar=1,menubar=1,resizable=1,width=600,height=400');");
}

function insertRow(){
	//get the value of the hidden field 'animalNumber'
	//convert it to a number a reset the value of the hidden field 'animalNumber'
	var nameCount = Number(document.form1.nameCount.value) + 1;
	document.form1.nameCount.value = nameCount;

	//insert the new row
	var a = names.insertRow();
	
	//insert the new cells into the newly created row
	var a_1 = a.insertCell(0);
	var a_2 = a.insertCell(1);
	var a_3 = a.insertCell(2);
	var a_4 = a.insertCell(3);
	var a_5 = a.insertCell(4);
	var a_6 = a.insertCell(5);
	var a_7 = a.insertCell(6);
	var a_8 = a.insertCell(7);
	
	//set the inner text & html of the newly inserted cells of the newly inserted row
	a_1.innerHTML="<input type='text' name='firstName"+nameCount+"'>";
	a_2.innerText="";
	a_3.innerHTML="<input type='text' name='lastName"+nameCount+"'>";
	a_4.innerText="";
	//<%= RS("County") %>  this goes into the value field below.
	a_5.innerHTML="<input type='text' name='county"+nameCount+"' size='25' value=''>";	
	a_6.innerText="";
	a_7.innerHTML="<select name='year"+nameCount+"'><option value='1980'>1980</option><option value='1981'>1981</option><option value='1982'>1982</option><option value='1983'>1983</option><option value='1984'>1984</option><option value='1985'>1985</option><option value='1986'>1986</option><option value='1987'>1987</option><option value='1988'>1988</option><option value='1989'>1989</option><option value='1990'>1990</option><option value='1991'>1991</option><option value='1992'>1992</option><option value='1993'>1993</option><option value='1994'>1994</option><option value='1995'>1995</option><option value='1996'>1996</option><option value='1997'>1997</option><option value='1998'>1998</option><option value='1999'>1999</option><option value='2000'>2000</option><option value='2001'>2001</option><option value='2002'>2002</option><option value='2003'>2003</option><option value='2004'>2004</option><option value='2005'>2005</option><option value='2006'>2006</option><option value='2007'>2007</option><option value='2008'>2008</option><option value='2009'>2009</option><option value='2010'>2010</option></select>";
	a_8.innerHTML="<select name='style"+nameCount+"'><option>Pin</option><option>Magnet</option></select>";
}



