//<![CDATA[

function saveListing(sysid){
	var xmlHttp = makeXmlHttpObject();

	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4){			
				alert(xmlHttp.responseText);
				//displaySavedListings();
				}//readystate 4
    		}//end response function
  
  var varstring = "?sysid=" + sysid; 
  xmlHttp.open("GET","mlsframe/cgi/savedlistingshandler"+varstring, true);
  xmlHttp.send(null);  
}//end function saveListing

function deleteListing(sysid){
	var xmlHttp = makeXmlHttpObject();

	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4){			
				alert(xmlHttp.responseText);
				//displaySavedListings();
				location.reload(true);
				}//readystate 4
    		}//end response function
  
  var varstring = "?sysid=" + sysid + "&action=delete"; 
  xmlHttp.open("GET","mlsframe/cgi/savedlistingshandler"+varstring, true);
  xmlHttp.send(null);  
}//end function saveListing

function saveNotes(sysid, notes){

	var xmlHttp = makeXmlHttpObject();
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4){			
			alert(xmlHttp.responseText);
			//displaySavedListings();
			}//readystate 4
    	}//end response function
  
  var varstring = "?sysid=" + sysid + "&notes=" + notes + "&action=notes"; 
  xmlHttp.open("GET","mlsframe/cgi/savedlistingshandler"+varstring, true);
  xmlHttp.send();  

  return false;
}//end function saveListing

function forceLogin(){
	document.getElementById("logintitle").innerHTML = 'You must login or create a free account to see MLS numbers!'; 
	document.getElementById("logindiv").style.display="block";	
	}
//]]>