Window.addEvent( 'domready', function() {
	
	if(Cookie.get("name")){
		$('name').setProperty('value',Cookie.get ("name"));
	}else{
		$('name').setProperty('value','');
	}
	if(Cookie.get("company")){
		$('company').setProperty('value',Cookie.get ("company"));
	}else{
		$('company').setProperty('value','');
	}
	if(Cookie.get("address1")){
		$('address1').setProperty('value',Cookie.get ("address1"));
	}else{
		$('address1').setProperty('value','');
	}
	if(Cookie.get("address2")){
		$('address2').setProperty('value',Cookie.get ("address2"));
	}else{
		$('address2').setProperty('value','');
	}
	if(Cookie.get("city")){
		$('city').setProperty('value',Cookie.get ("city"));
	}else{
		$('city').setProperty('value','');
	}
	if(Cookie.get("state")){
		$('state').setProperty('value',Cookie.get ("state"));
	}else{
		$('state').setProperty('value','');
	}
	if(Cookie.get("zip")){
		$('zip').setProperty('value',Cookie.get ("zip"));
	}else{
		$('zip').setProperty('value','');
	}
	if(Cookie.get("country")){
		$('country').setProperty('value',Cookie.get ("country"));
	}else{
		$('country').setProperty('value','');
	}
	if(Cookie.get("email")){
		$('email').setProperty('value',Cookie.get ("email"));
	}else{
		$('email').setProperty('value','');
	}
	if(Cookie.get("phone")){
		$('phone').setProperty('value',Cookie.get ("phone"));
	}else{
		$('phone').setProperty('value','');
	}
	if(Cookie.get("fax")){
		$('fax').setProperty('value',Cookie.get ("fax"));
	}else{
		$('fax').setProperty('value','');
	}
	
	$('make').addEvent ('click',function(e) {
		// e = new Event(e).stop (); //this stops the form from actually submitting
		Cookie.set ("name", $('name').getProperty('value'), {path: '/'}, {duration: 365});
		Cookie.set ("company", $('company').getProperty('value'), {path: '/'}, {duration: 365});
		Cookie.set ("address1", $('address1').getProperty('value'), {path: '/'}, {duration: 365});
		Cookie.set ("address2", $('address2').getProperty('value'), {path: '/'}, {duration: 365});
		Cookie.set ("city", $('city').getProperty('value'), {path: '/'}, {duration: 365});
		Cookie.set ("state", $('state').getProperty('value'), {path: '/'}, {duration: 365});
		Cookie.set ("zip", $('zip').getProperty('value'), {path: '/'}, {duration: 365});
		Cookie.set ("country", $('country').getProperty('value'), {path: '/'}, {duration: 365});
		Cookie.set ("email", $('email').getProperty('value'), {path: '/'}, {duration: 365});
		Cookie.set ("phone", $('phone').getProperty('value'), {path: '/'}, {duration: 365});
		Cookie.set ("fax", $('fax').getProperty('value'), {path: '/'}, {duration: 365});
		// $('make').setProperty('enabled','enabled'); //disable the submit button - i don't know if this is necessary for your purposes or not, just adding it in anyway.
	});
});

