var ratesArray=new Array();

ratesArray[0] = 560;
ratesArray[1] = 670;
ratesArray[2] = 750;
ratesArray[3] = 890;
ratesArray[4] = 950;
ratesArray[5] = 1010;
ratesArray[6] = 1115;
ratesArray[7] = 1180;
ratesArray[8] = 1240;
ratesArray[9] = 1380;
ratesArray[10] = 1465;
ratesArray[11] = 1535;
ratesArray[12] = 1705;
ratesArray[13] = 1775;
ratesArray[14] = 1960;
ratesArray[15] = 2035;
ratesArray[16] = 2255;

var extraCharges=new Array();
extraCharges[0] = 22;
extraCharges[1] = 25;
extraCharges[2] = 28;
extraCharges[3] = 30;
extraCharges[4] = 32;
extraCharges[5] = 35;
extraCharges[6] = 37;
extraCharges[7] = 40;
extraCharges[8] = 42;
extraCharges[9] = 44;
extraCharges[10] = 46;
extraCharges[11] = 48;
extraCharges[12] = 50;
extraCharges[13] = 52;
extraCharges[14] = 54;
extraCharges[15] = 56;
extraCharges[16] = 58;

	function checkRates(){
		var ind=document.lengthForm.lngth.selectedIndex;
		var val=document.lengthForm.lngth.options[ind].value;
		var rates;
		var start=
				"<html><head><title>"
				+ "Aghada Boatyard Company 2007/2008 Storage Rates"
				+ "</title></head><body><p><img src='rates.jpg'></p>";
		var notes=
				"<br><br>"
				+ "<p>"
				+ "Please Note:"
				+ "<ul><li>"
				+ "The above prices include hauling the boat; power washing; standing and re-launching and are minimum prices."
				+ "</li><li>"
				+ "An additional charge will be levied should a boat have to be collected or returned to its normal base."
				+ "</li><li>"
				+ "There is an extra charge for indoor storage."
				+ "</li><li>"
				+ "Secure indoor storage is available for smaller boats and a limited number of larger boats up to 10 Metres."
				+ "</li><li>"
				+ "Owners must provide proof of adequate insurance cover."
				+ "</li></ul></p>";

		var close=
				"<p align='center'><form>"
				+ "<input type='button' value='Close Window' onClick='window.close()'></form>"
				+ "</p></body></html>";
				
		if(val==document.lengthForm.lngth.options[0].value){
			alert("Please select a boat length in metres");
			}

		if(val==document.lengthForm.lngth.options[1].value){
			var rates=("Price on appliction for boats under " + val + ". Please contact Roddy O'Connor at 086.8358500 for rates.");
			var newWin=window.open("", "Rates", "height=340,width=420");
			newWin.document.write(start + rates + close);
			newWin.focus();
			}


		if(val==document.lengthForm.lngth.options[2].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[0] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[0] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}

		if(val==document.lengthForm.lngth.options[3].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[1] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[1] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}


		if(val==document.lengthForm.lngth.options[4].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[2] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[2] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}


		if(val==document.lengthForm.lngth.options[5].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[3] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[3] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}


		if(val==document.lengthForm.lngth.options[6].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[4] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[4] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}


		if(val==document.lengthForm.lngth.options[7].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[5] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[5] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}


		if(val==document.lengthForm.lngth.options[8].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[6] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[6] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}


		if(val==document.lengthForm.lngth.options[9].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[7] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[7] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}


		if(val==document.lengthForm.lngth.options[10].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[8] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[8] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}


		if(val==document.lengthForm.lngth.options[11].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[9] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[9] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}


		if(val==document.lengthForm.lngth.options[12].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[10] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[10] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}


		if(val==document.lengthForm.lngth.options[13].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[11] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[11] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}

		if(val==document.lengthForm.lngth.options[14].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[12] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[12] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}


		if(val==document.lengthForm.lngth.options[15].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[13] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[13] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}


		if(val==document.lengthForm.lngth.options[16].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[14] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[14] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}


		if(val==document.lengthForm.lngth.options[17].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[15] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[15] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}


		if(val==document.lengthForm.lngth.options[18].value){
			var rates=("18 weeks outdoor storage for " + val + " boats is " + "<b>" + ratesArray[16] + " euros </b>" + ". Each additional week after that is " + "<b>" + extraCharges[16] + " euros </b>" + "per week.");
			var newWin=window.open("", "Rates", "height=550,width=420");
			newWin.document.write(start + rates + notes + close);
			newWin.focus();
			}


		else if(val==document.lengthForm.lngth.options[19].value){
			var rates=("For boats " + val + " price is on application. Please contact Roddy O'Connor at 086.8358500 for rates.");
			var newWin=window.open("", "Rates", "height=340,width=420");
			newWin.document.write(start + rates + close);
			newWin.focus();
			}
	document.forms[0].reset();

	}


