function cookie_update(new_data)
{
	var cookieValue = document.cookie.indexOf( "WishList=" );

	//check to see if cookie already exists with data in it
	if (cookieValue == -1)
	{
		//start new cookie
		fresh_data = new_data;
		document.cookie = "WishList=" + escape(fresh_data) + "; path=/";
	}
	else
	{
		//append to cookie
		var endstr = document.cookie.indexOf(";", cookieValue);
		
		if(endstr == -1)
		{
			endstr = document.cookie.length;
		}
		
		var cookieData = unescape(document.cookie.substring(cookieValue+9, endstr));
		var old_cookie = "WishList=" + cookieData;//need to add wishList to cookie data so we always read correct cookie //safari
		var fresh_data = new_data;
	
		document.cookie = old_cookie + "," + escape(fresh_data) + "; path=/";
	}
	document.getElementById('AlertBox').style.display = 'block';
}




function hideAlert(){
	document.getElementById('AlertBox').style.display = 'none';
}

