	function EditPassword()
	{
		location.href = 'SetPassword.asp';
	}

	function EditDetails()
	{
		location.href = 'EditCustomer.asp';
	}

	function ViewCustomer()
	{
		location.href = 'ViewCustomer.asp';
	}

	function ViewFolder(FolderId)
	{
		location.href = 'ViewFolder.asp?FolderId=' + FolderId;
	}

	function AddFolder()
	{
		location.href = 'AddFolder.asp';
	}

	function DeleteFolder(FolderId)
	{
		location.href = 'DeleteFolder.asp?FolderId=' + FolderId;
	}

	function ConfirmDeleteFolder(FolderId)
	{
		location.href = 'DeleteFolder.asp?FolderId=' + FolderId + '&Action=Delete';
	}

	function ViewFolders()
	{
		location.href = 'ViewCustomer.asp';
	}

	// This function polls the server to see if a pdf is already converted into several jpg's
	function checkPdfToJpg()
	{
		var now = new Date();
		loadXMLDoc(imgXmlHttp, 'MonitorPdfProcessor.asp?FolderId=' + folderId + '&FileId=' + fileId + '&Action=Monitor&timestamp=' + now.getYear() + now.getMonth() + now.getDate() + now.getHours() + now.getMinutes() + now.getSeconds(), monitorLoaded, 0);
	}
	function monitorLoaded()
	{
		if (imgXmlHttp.readyState==4)
		{
			if (imgXmlHttp.status==200)
			{
				document.getElementById('ResultDiv').innerHTML = imgXmlHttp.responseText;
				if (imgXmlHttp.responseText.indexOf('ViewFolder') == -1)
				{
					window.setTimeout('checkPdfToJpg()', 2000);
				}
				else
				{
					document.getElementById('WaitDiv').innerHTML = '';
				}
			}
			else { alert('Probleem tijdens ontvangen van gegevens van de server.\nProbeer het dadelijk nog eens.'); }
		}
	}

	function checkPdfToJpgStart(foldId, fId)
	{
		folderId = foldId;
		fileId = fId;
		setTimeout(checkPdfToJpg, 2000);
	}
	
	
