
var openPhones = new Object();
getOpenPhoneList();
function addToList(bidClickUrl, listingClickInfo)
{
// try to get the listing id
var id="";
var startIndex=listingClickInfo.indexOf("LID=");
if (startIndex != -1) {
var endIndex=listingClickInfo.indexOf("&", startIndex);
if (endIndex == -1) endIndex = listingClickInfo.length;
id = listingClickInfo.substring(startIndex+4, endIndex);
}
else {
// if there is no listing id, use the bid id - get it from the bidClickUrl
startIndex=bidClickUrl.indexOf("bid=");
if (startIndex != -1) {
endIndex=bidClickUrl.indexOf("&", startIndex);
if (endIndex == -1) endIndex = bidClickUrl.length;
id = bidClickUrl.substring(startIndex+4, endIndex);
}
}
if (id != "") {
addToOpenPhoneList(id);
}
}