function WatchThisLot(AuctionID,LotID,LotNum,Status){
	if(BidderID != ""){
		var RequestURL = "/asp/xml/WatchThisLotXML.asp?lid=" + LotID + "&sts=" + Status;
		var wRequest = new Sys.Net.WebRequest();
		wRequest.set_url(RequestURL);
		wRequest.set_httpVerb("GET");
			    
		wRequest.add_completed(WatchThisLotDone);
	    
		var executor = wRequest.get_executor(); 
	    
		wRequest.invoke();
		/*if(Status == 0){
			document.getElementById("Lot:"+LotID).innerHTML = "<a href='javascript:WatchThisLot(" + AuctionID + "," + LotID + ",\"" + LotNum + "\",1)'>Watch Lot</a>";
			document.getElementById("LotTable:"+LotID).style.backgroundColor = "#A3B8CC";
		}
		else{
			document.getElementById("Lot:"+LotID).innerHTML = "<a href='javascript:WatchThisLot(" + AuctionID + "," + LotID + ",\"" + LotNum + "\",0)'>Cancel Watch</a>";
			document.getElementById("LotTable:"+LotID).style.backgroundColor = "#000099";
		}*/
		if(document.getElementById("LotWatch:"+LotID).className.indexOf(" lotWidgetWatching") != -1){
			document.getElementById("LotWatch:"+LotID).className = document.getElementById("LotWatch:"+LotID).className.replace(/\slotWidgetWatching/gi, "");
			document.getElementById("LotWatchAnc:"+LotID).href = document.getElementById("LotWatchAnc:"+LotID).href.replace(/,0\)/,",1)");
			document.getElementById("LotWatchAnc:"+LotID).title="click to add this lot to your watch list.";
		}
		else{
			document.getElementById("LotWatch:"+LotID).className += " lotWidgetWatching";
			document.getElementById("LotWatchAnc:"+LotID).href = document.getElementById("LotWatchAnc:"+LotID).href.replace(/,1\)/,",0)");
			document.getElementById("LotWatchAnc:"+LotID).title="you are watching this lot. click to remove it from your watch list.";
		}
	}
	else{
		var temp;
		temp = confirm("You must be logged in to use this feature, Would you like to login now?");
		if(temp){
			temp = "LoginBidder.asp?aid=" + AuctionID + "&lid=" + LotID + "&lnm=" + LotNum;
			window.location = temp;
		}
	}
}

function WatchThisLotDone(executor){
	var XMLOutput, WatchStatus;
	if(executor.get_responseAvailable()){
		XMLOutput = executor.get_xml();
		WatchStatus = XMLOutput.getElementsByTagName("Status")[0].childNodes[0].nodeValue; 
		/*
		if(WatchStatus == 1){
			alert("Lot watch set");
		}else{
			alert("Lot watch removed");	
		}
		*/
	}
}