// JavaScript Document

function CWishCorr() {
	this.AddToWish = function(iid, iIndex) {
		AjaxRequest.SendRequest('add_to_wish.php?pge=wish&iid=' + iid); 
		GetObjectByID('AddRemWishButton' + iIndex).innerHTML = eval('sRemoveWishButton' + iIndex);
	}
	
	this.RemoveFromWish = function(iid, iIndex) {
		AjaxRequest.SendRequest('remove_from_wish.php?pge=wish&iid=' + iid); 
		AddRemWishButton = GetObjectByID('AddRemWishButton' + iIndex)
		
		if (AddRemWishButton !== null)
			AddRemWishButton.innerHTML = eval('sAddWishButton' + iIndex);
		iWishItem = GetObjectByID('WishItem' + iIndex);
		
		if (iWishItem !== null) {
			iWishItem.innerHTML = '';	
			aItems[iIndex].m_ID = null;
		}
		

	}
}


var WishCorr = new CWishCorr();