<!--
// BEGIN --- Cookie's functions Quick List ---

function readCookie(cookieName) {
 var theCookie=""+document.cookie;
 var ind=theCookie.indexOf(cookieName);
 if (ind==-1 || cookieName=="") return ""; 
 var ind1=theCookie.indexOf(';',ind);
 if (ind1==-1) ind1=theCookie.length; 
 return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}



function includeInCookie(property_id, path, type) {
	if (!isNaN(property_id)) {
		var name = "bookmark"+type;
		var d = new Date();
		if (!path) path = "/";
		d.setTime(d.getTime() + (15*24*60*60*1000));
		var expires = '; expires=' + d.toGMTString();
		var bookmark = readCookie("bookmark"+type);
		if (!bookmark) {
			bookmark = "'" + property_id + "'";
		}
		else {
			if (bookmark.indexOf("'" + property_id + "'") == -1) {
				bookmark = bookmark + "," + "'" + property_id + "'";
			}
		}
		document.cookie = name + '=' + escape(bookmark) + expires + '; path=' + path;
		alert ('Item Added to your list');
	}
}

function removeFromCookie(property_id, path,type) {
	var name = "bookmark"+type;
	var d = new Date();
	if (!path) path = "/";
	d.setTime(d.getTime() + (15*24*60*60*1000));
	var expires = '; expires=' + d.toGMTString();
	if (isNaN(property_id)) {
		if (property_id == "all") {
			var bookmark = "";
			document.cookie = name + '=' + escape(bookmark) + expires + '; path=' + path;
		}
	} else {
		var bookmark = readCookie("bookmark"+type);
		if (bookmark.length > 0) {
			if (bookmark.indexOf("'" + property_id + "'") > -1) {
				finalvar = bookmark.indexOf("'" + property_id + "'") + property_id.length + 3;
				var aux = "";
				aux = bookmark.substr(0, bookmark.indexOf("'" + property_id + "'"));
				aux += bookmark.substr(finalvar);
				bookmark = aux;
			}
		}
		len = bookmark.length;
		len--;
		if (bookmark.lastIndexOf(",") == len) {
			bookmark = bookmark.substr(0, len);
		}
		document.cookie = name + '=' + escape(bookmark) + expires + '; path=' + path;
		alert (showText(LANG_JS_FAVORITEDEL));
	}
	window.location.reload();
}

// END --- Cookie's functions Quick List ---
//-->
