		// Read the Cookies Value
		function Init()
		{	
			// Read params in the query string
			var theMsrp;
			var thePrice;
			var theDnPay;
			var thePtge;
			var theTmMn;
			var theTmYr;
			var theAir;
			var thisIndid;
			
			theMsrp =   getQueryVariable("msrp");
			thePrice =  getQueryVariable("Price");
			theDnPay =  getQueryVariable("DnPay");
			thePtge  =  getQueryVariable("Ptge");
			theTmMn  =  getQueryVariable("TmMn");
			theTmYr  =  getQueryVariable("TmYr");
			theAir   =  getQueryVariable("Air");
			thisIndid=	getQueryVariable("indid");
			// Read params from cookies
			var airCookie = getCookie('AIR');
			var dnpayCookie = getCookie('DPA');
			var ptgeCookie = getCookie('DPP');
			
			// Load Fields
			// Price
			if ((theMsrp == "" ) || (theMsrp == null))
				document.FormPaymentCalc.TxtBoxPrice.value="$0.00";
			else
				document.FormPaymentCalc.TxtBoxPrice.value=theMsrp;
				
			// Down Payment
			if ((theDnPay == "" ) || (theDnPay == null))
				if (dnpayCookie == null)
					document.FormPaymentCalc.TxtBoxDownPayment.value="$0.00";
				else
					document.FormPaymentCalc.TxtBoxDownPayment.value=dnpayCookie;
			else
				document.FormPaymentCalc.TxtBoxDownPayment.value=theDnPay;
				
			// Down %
			if ((thePtge == null) || (thePtge == ""))
				if (ptgeCookie == null)
					document.FormPaymentCalc.TxtBoxDnPayPctage.value="0.00";
				else
					document.FormPaymentCalc.TxtBoxDnPayPctage.value=ptgeCookie;
			else
				document.FormPaymentCalc.TxtBoxDnPayPctage.value=thePtge;	
				
			// indid
			if ((thisIndid == "") || (thisIndid == null))
			{
				document.FormPaymentCalc.TxtBoxAnnlIntRate.value = "9.00";
				document.FormPaymentCalc.TxtBoxMonth.value= "120";
				document.FormPaymentCalc.TxtBoxYear.value= "10";
			}
			else
			{
				readIndid(document.FormPaymentCalc);
			}			
			
			// Air
			if ((theAir == "") || (theAir == null))
			{
				if (airCookie == null)
				{
					if ((thisIndid == "") || (thisIndid == null))
					{
						document.FormPaymentCalc.TxtBoxAnnlIntRate.value = "9.00";
					}
					else
					{
					}
				}
				else 
				{
					document.FormPaymentCalc.TxtBoxAnnlIntRate.value = airCookie;
				}
			}
			else
			{
				document.FormPaymentCalc.TxtBoxAnnlIntRate.value = theAir;
			}
			// TmMn
			if ((theTmMn =="") || (theTmMn == null))
			{
				if ((thisIndid == "") || (thisIndid == null))
				{
					document.FormPaymentCalc.TxtBoxMonth.value= "120";
				}
				else
				{
				}
			}
			else
			{
				document.FormPaymentCalc.TxtBoxMonth.value= theTmMn;
			}
			// TmYr			
			if ((theTmYr =="") || (theTmYr == null))
			{
				if ((thisIndid == "") || (thisIndid == null))
				{
					document.FormPaymentCalc.TxtBoxYear.value= "10";
				}
				else
				{
				}
			}
			else
			{
				document.FormPaymentCalc.TxtBoxYear.value= theTmYr;
			}
		}
		
		function getQueryVariable(variable)
		{
			var query = window.location.search.substring(1);
			var vars = query.split("&");
			var strResult = "";
			for (var i=0;i<vars.length;i++) 
			{
				var pair = vars[i].split("=");
				if (pair[0] == variable) 
				{
					strResult = pair[1];
					
				}
			} 
			return strResult;
		}
		
		function getCookie(name)
		{
			var dc = document.cookie;
			var prefix = name + "=";
			var begin = dc.indexOf("; " + prefix);
			if (begin == -1)
			{
				begin = dc.indexOf(prefix);
				if (begin != 0) return null;
			}
			else
			{
				begin += 2;
			}
			var end = document.cookie.indexOf(";", begin);
			if (end == -1)
			{
				end = dc.length;
			}
			return unescape(dc.substring(begin + prefix.length, end));
		}
		
