	var addObj = new Object();
	addObj.id = 0;
	addObj.name = "";

	function addToMyPlanner( addID, addName, addType ) {
		addObj.id = addID;
		addObj.name = addName;
	
		var strId = "?id=" + addID;
		var strType = "&type=" + addType;
		var strCode = "&code=" + parseInt( 1000 * Math.random() ) + parseInt( 1000 * Math.random() );
		url = "/library/code/add-to-my-planner.aspx" + strId + strType + strCode;
	
		http = getHTTPObject();
		http.onreadystatechange = processAddToMyPlanner;
		http.open("GET", url, true);
		http.setRequestHeader("Cache-Control", "no-cache");
		http.send(null);
	}

	processAddToMyPlanner = function() {
		if (http.readyState == 4) {
			if( http.status == 200 ) {
				var trueResponse = http.responseText.replace("\n","");
				if( trueResponse == "OK" ) {
					if( window.opener )
						window.opener.document.location.reload(true);
					alert( 'Added ' + addObj.name + ' to My Planner!!!');
				}
				else
					alert( 'Error: Could not add ' + addObj.name + ' to My Planner!!!');
			}
			else
				alert( 'Error: Could not add ' + addObj.name + ' to My Planner!!!');
		}
	}

	function useSessionData()
	{
		document.getElementById('useSession').value='true';
	}

	showPreviousPage = function() {
		var startRow = parseInt( document.getElementById('startRow').value );
		var rowsPerPage = parseInt( document.getElementById('rowsPerPage').value );
		
		var newStartRow = startRow - rowsPerPage;
		
		if( newStartRow >= 0 ) {
			document.getElementById('startRow').value = newStartRow;
			
			useSessionData();
			document.forms["attractionSearchForm"].submit();
		}
	}
	
	showNextPage = function() {
		var startRow = parseInt( document.getElementById('startRow').value );
		var rowsPerPage = parseInt( document.getElementById('rowsPerPage').value );
		
		var newStartRow = startRow + rowsPerPage;
		
		if( newStartRow >= 0 ) {
			document.getElementById('startRow').value = newStartRow;
			
			useSessionData();
			document.forms["attractionSearchForm"].submit();
		}
	}

	function Popup(url,windowname,w,h,x,y) {
		window.open(url,windowname,"resizable=yes,toolbar=no,scrollbars=yes,menubar=no,status=no,directories=no,width="+w+",height="+h+",left="+x+",top="+y+"");
	}
