function clickIconAddToWatchList( kaango_WatchListAdID ) {
    ajaxModWatchList( 'add', kaango_WatchListAdID );
    kaango_elementID = document.getElementById("kaango_addToWatchList_"+kaango_WatchListAdID);
    kaango_elementID.style.display = "none";
    kaango_elementID = document.getElementById("kaango_delFromWatchList_"+kaango_WatchListAdID);
    kaango_elementID.style.display = "";
}

function clickIconDelFromWatchList( kaango_WatchListAdID ) {
    ajaxModWatchList( 'del', kaango_WatchListAdID );
    kaango_elementID = document.getElementById("kaango_addToWatchList_"+kaango_WatchListAdID);
    kaango_elementID.style.display = "";
    kaango_elementID = document.getElementById("kaango_delFromWatchList_"+kaango_WatchListAdID);
    kaango_elementID.style.display = "none";
}

function hideWatchListAd( kaango_WatchListAdID ) {
    kaango_elementID = document.getElementById("kaango_watchListAd_"+kaango_WatchListAdID);
    kaango_elementID.style.display = "none";
    kaango_elementID = document.getElementById("kaango_watchListAdDesc_"+kaango_WatchListAdID);
    kaango_elementID.style.display = "none";
}

function hideAndDelete(ad_id)
{
	clickIconDelFromWatchList(ad_id);
	hideWatchListAd(ad_id);
	return false;
}

var kaango_modWatchListReq = null;

function ajaxModWatchList( kaango_watchListMode, kaango_watchListAdID ) {
    if(window.XMLHttpRequest)
        kaango_moveOnWatchListReq = new XMLHttpRequest();
    else if(window.ActiveXObject)
        kaango_moveOnWatchListReq = new ActiveXObject("Microsoft.XMLHTTP");

    url = siteURL+"ajaxModWatchList/"+kaango_watchListMode+"/"+kaango_watchListAdID;

    kaango_moveOnWatchListReq.open("GET", url, true);
    kaango_moveOnWatchListReq.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
    kaango_moveOnWatchListReq.send(null);
}