function clickIconAddToWatchList( kaango_WatchListAdID, kaango_userid ) {
    ajaxModWatchList( 'addclip', kaango_WatchListAdID, kaango_userid );
    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,kaango_userid ) {
    ajaxModWatchList( 'delclip', kaango_WatchListAdID, kaango_userid );
    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,kaango_userid)
{
	ajaxModWatchList( 'delclip', ad_id, kaango_userid );
	hideWatchListAd(ad_id);
	return false;
}

var kaango_modWatchListReq = null;

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

    url = siteURL+"Felistadsajax?"+"task=" + kaango_watchListMode+"&adid="+kaango_watchListAdID+"&userid="+kaango_userid;

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