function hotlistAdd(LID) {
	var lf = "\n";
    var CookieString = document.cookie;
    var CookieSet = CookieString.split (';');
    var SetSize = CookieSet.length;
    var CookiePieces
    var ReturnValue = "";
    var x = 0;
		var expiredays = 30 // set the max number of days for cookie here
		var ExpireDate = new Date ();
  	ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
    for (x = 0; ((x < SetSize) && (ReturnValue == "")); x++) {
      CookiePieces = CookieSet[x].split ('=');
      if (CookiePieces[0].substring (0,1) == ' ') {
        CookiePieces[0] = CookiePieces[0].substring (1, CookiePieces[0].length);
      }
      if (CookiePieces[0] == "hotlist") { //HOTLIST IS THE NAME OF THE COOKIE THAT YOU WANT TO RETRIEVE
        ReturnValue = CookiePieces[1];
      }
     }	 		  
		 if(ReturnValue != ""){
					var ListA = unescape(ReturnValue);
					if (ListA == "undefined") { ListA = "";}
					else {ListA = ListA ;} 
					var ListB = ListA + ',' + LID;	//adid id number will go inplace of 22
					document.cookie = "hotlist" + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/";
					document.cookie = "hotlist" + "=" + escape(ListB) + ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString() + "; path=/");
					}
		 else {
					document.cookie = "hotlist" + "=" + LID + ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString()) + "; path=/";
					}	
					alert('Added to Saved Listings');				
 }

 function hotlistDel(LID) {
 		var lf = "\n";
    var CookieString = document.cookie;
    var CookieSet = CookieString.split (';');
    var SetSize = CookieSet.length;
    var CookiePieces
    var ReturnValue = "";
    var x = 0;
		var expiredays = 30 // set the max number of days for cookie here
		var ExpireDate = new Date ();
  	ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
    for (x = 0; ((x < SetSize) && (ReturnValue == "")); x++) {
      CookiePieces = CookieSet[x].split ('=');
      if (CookiePieces[0].substring (0,1) == ' ') {
        CookiePieces[0] = CookiePieces[0].substring (1, CookiePieces[0].length);
      }
      if (CookiePieces[0] == "hotlist") { //HOTLIST IS THE NAME OF THE COOKIE THA YOU WANT TO RETRIEVE
        ReturnValue = CookiePieces[1];
      }
     }
		 if(ReturnValue != ""){
		 			var ListA = unescape(ReturnValue);
					var PreListRemoved = ListA.replace("," + LID, '');
					var PreListRemovedA = PreListRemoved.replace("undefined",'');
					var ListRemoved =	PreListRemovedA.replace(LID, '');
					if (ListRemoved != ""){
					document.cookie = "hotlist" + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/";
					document.cookie = "hotlist" + "=" + escape(ListRemoved) + ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString()) + "; path=/";
					}
					else if (ListRemoved == ""){
		 			document.cookie = "hotlist" + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/";
					
					}
					alert('Removed from Saved Listings');
					}
	
 }
 