function savecookie()
{
	var args = savecookie.arguments;
	var txtName; 
	var txtPhone;
	var txtEmail;
	var txtComment;
	//alert(args.length)
	if(args.length<0)
	{
		txtName = document.aspnetForm.ctl00$ctlBostonRealtyNet$txtName.value;
		txtPhone = document.aspnetForm.ctl00$ctlBostonRealtyNet$txtPhone.value;
		txtEmail = document.aspnetForm.ctl00$ctlBostonRealtyNet$txtEmail.value;
		txtComment = document.aspnetForm.ctl00$ctlBostonRealtyNet$txtComment.value;
	}
	else 
	{
		txtName = args[0];
		txtPhone = args[1];
		txtEmail = args[2];
		txtComment = args[3];		
	}
	var intexpiredays;
	intexpiredays =99999;
	setCookie("txtName",txtName,intexpiredays);
	setCookie("txtPhone",txtPhone,intexpiredays);
	setCookie("txtEmail",txtEmail,intexpiredays);
	setCookie("txtComment",txtComment,intexpiredays);			
	return true;
}
		
function getCookie(NameOfCookie)
	{ 
		if (document.cookie.length > 0) 
		{ 
			begin = document.cookie.indexOf(NameOfCookie+"="); 
			if (begin != -1) 
			{ 
				begin += NameOfCookie.length+1; 
				end = document.cookie.indexOf(";", begin);
				if (end == -1) end = document.cookie.length;
				return unescape(document.cookie.substring(begin, end)); 
			} 
		}
		return null; 
	}

function setCookie(NameOfCookie, value, expiredays) 
{	var ExpireDate = new Date ();
	ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
	document.cookie = NameOfCookie + "=" + escape(value) + 
	((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString()) + "; path=/;";
}
			
			
function FillCookie()
{
	/*alert(getCookie('txtName'));
	alert(getCookie('txtPhone'));
	alert(getCookie('txtEmail'));
	alert(getCookie('txtComment'));*/
	if(getCookie('txtName')&&getCookie('txtPhone')&&getCookie('txtEmail'))
	{
		document.aspnetForm.ctl00$ctlBostonRealtyNet$txtName.value = getCookie('txtName');
		document.aspnetForm.ctl00$ctlBostonRealtyNet$txtPhone.value = getCookie('txtPhone');
		document.aspnetForm.ctl00$ctlBostonRealtyNet$txtEmail.value = getCookie('txtEmail');
		if(getCookie('txtComment')!=null)
			document.aspnetForm.ctl00$ctlBostonRealtyNet$txtComment.value = getCookie('txtComment');		
	}
	return false;
}
