/**
 *
 * @access public
 * @return void
 **/
function addPlacementToWishlist($placementId,$elementToChange){
	new Ajax.Request('/ajax/wishlist.ajax.php', {
	  method: 'get',
	  parameters: 'addToWishlist&projectId='+$placementId,
	  onSuccess: function(transport) {
			if (transport.responseText.match(/OK/)) {
				new Ajax.Updater('brochure-snippet-container', '/ajax/wishlist.ajax.php',{
					method: 'get',
					parameters: 'displayWishlistSnippet'
				});
				$($elementToChange).innerHTML='<a href="/tailored-brochure.html" title="Added to your brochure" class="btn-wishlist-added"><span>Added to your brochure</span></a>';
			} else {
				$($elementToChange).innerHTML='<a href="/tailored-brochure.html" title="Failed to add to your brochure"><span>Add to brochure Failed</span></a>';
			}
	  }
	});
}
/**
 *
 * @access public
 * @return void
 **/
function startBrochureDownload($numberOfPlacements){
	document.getElementById('pdfGenerate').style.display = 'none';
	if ($numberOfPlacements < 10) {
		document.getElementById('wishlist-brochure-creation-message').innerHTML = 'You\'re brochure is being generated. Please be patiant, depending on how many projects are in your wishlist and how fast your internet connection is, the generation and download could take several minutes. When prompted you should save your file to your computer so you can view it, print it, whatever!.';
	}
}
