// Search Functions
	function clearSearchField()
		{
		if(document.getElementById('Thumbprints_Header_Controls_Search_Input').value == 'Search...')
			{
			document.getElementById('Thumbprints_Header_Controls_Search_Input').value = '';
			}
		}

	function resetSearchField()
		{
		if(document.getElementById('Thumbprints_Header_Controls_Search_Input').value == '')
			{
			document.getElementById('Thumbprints_Header_Controls_Search_Input').value = 'Search...';
			}
		}

// Comments
	function reloadComments(dataCode)
		{
		var req = false;

		if(window.XMLHttpRequest)
			{
			req = new XMLHttpRequest();
			}
		else if(window.ActiveXObject)
			{
			req = new ActiveXObject('Microsoft.XMLHTTP');
			}

		req.open('GET','/Includes/Thumbprints_Content_Comments_List.php?$graf_ID=' + dataCode);

		req.onreadystatechange = function()
			{
			if(req.readyState == '4' && req.status == '200')
				{
				if(document.getElementById('Thumbprints_Content_Comments_ListContainer')) // Reload Asynchronously
					{
					document.getElementById('Thumbprints_Content_Comments_ListContainer').innerHTML = req.responseText;
					}
				else // Reload Webpage
					{
					window.location.reload();
					}
				}
			}

		req.send(null);
		}

// Comments - Block
	function takeComment(dataCode)
		{
		// Display Verarbeitung
			eisenJS_Verarbeitung_DISPLAY();

		// Dis-able Form Fields
			document.getElementById('TPC_Form_ViewerName').disabled = true;
			document.getElementById('TPC_Form_ViewerEmail').disabled = true;
			document.getElementById('TPC_Form_ViewerWebsite').disabled = true;
			document.getElementById('TPC_Form_Comment').disabled = true;
			document.getElementById('TPC_Form_Submit').disabled = true;
			document.getElementById('TPC_Form_Cancel').disabled = true;

		// Create XML HTTP Object
			var req = false;
	
			if(window.XMLHttpRequest)
				{
				req = new XMLHttpRequest();
				}
			else if(window.ActiveXObject)
				{
				req = new ActiveXObject('Microsoft.XMLHTTP');
				}

		// Take Form Data
			tpc_Form_Re_Art = document.getElementById('TPC_Form_Re_Art').value;
			tpc_Form_Re_Comment = document.getElementById('TPC_Form_Re_Comment').value;
			tpc_Form_ViewerName = document.getElementById('TPC_Form_ViewerName').value;
			tpc_Form_ViewerEmail = document.getElementById('TPC_Form_ViewerEmail').value;
			tpc_Form_ViewerWebsite = document.getElementById('TPC_Form_ViewerWebsite').value;
			tpc_Form_Comment = document.getElementById('TPC_Form_Comment').value;

		// Compose and Encode Query String
			tpc_Form_ViewerName_Encoded = tpc_Form_ViewerName.replace('+','&#43;');
			tpc_Form_ViewerName_Encoded = urlencode(tpc_Form_ViewerName_Encoded);

			tpc_Form_ViewerEmail_Encoded = tpc_Form_ViewerEmail.replace('+','&#43;');
			tpc_Form_ViewerEmail_Encoded = urlencode(tpc_Form_ViewerEmail_Encoded);

			tpc_Form_ViewerWebsite_Encoded = tpc_Form_ViewerWebsite.replace('+','&#43;');
			tpc_Form_ViewerWebsite_Encoded = urlencode(tpc_Form_ViewerWebsite_Encoded);

			tpc_Form_Comment_Encoded = tpc_Form_Comment.replace('+','&#43;');
			tpc_Form_Comment_Encoded = urlencode(tpc_Form_Comment_Encoded);

			getData = '?TPC_Form_Re_Art=' + tpc_Form_Re_Art + '&TPC_Form_Re_Comment=' + tpc_Form_Re_Comment + '&TPC_Form_ViewerName=' + tpc_Form_ViewerName_Encoded + '&TPC_Form_ViewerEmail=' + tpc_Form_ViewerEmail_Encoded + '&TPC_Form_ViewerWebsite=' + tpc_Form_ViewerWebsite_Encoded + '&TPC_Form_Comment=' + tpc_Form_Comment_Encoded + '&DataCode=' + dataCode;

		// Configure Asynchronous Action
			req.open('GET','/Scripts/Thumbprints_TakeComments.php' + getData);

		// Configure Callback Action
			req.onreadystatechange = function()
				{
				if(req.readyState == '4')
					{
					// Generate Output
						switch(req.status)
							{
							case 200 : // Okay
								reloadComments(dataCode);
								break;

							default: // General Error
								alert('An error occured while responding to your request. Please refresh this page and try again.');
							}

					// Enable Form Fields
						document.getElementById('TPC_Form_ViewerName').disabled = false;
						document.getElementById('TPC_Form_ViewerEmail').disabled = false;
						document.getElementById('TPC_Form_ViewerWebsite').disabled = false;
						document.getElementById('TPC_Form_Comment').disabled = false;
						document.getElementById('TPC_Form_Submit').disabled = false;
						document.getElementById('TPC_Form_Cancel').disabled = false;

					// Clear Data
						document.getElementById('TPC_Form_Comment').value = '';

					// Remove Verarbeitung
						eisenJS_Verarbeitung_REMOVE();
					}
				}

		// Send Request
			req.send(null);

		// Return
			return false;
		}

// Comments - Inline
	function takeInlineComment(dataCode,commID)
		{
		// Display Verarbeitung
			eisenJS_Verarbeitung_DISPLAY();

		// Dis-able Form Fields
			document.getElementById('TPC_Form_ViewerName' + commID).disabled = true;
			document.getElementById('TPC_Form_ViewerEmail' + commID).disabled = true;
			document.getElementById('TPC_Form_ViewerWebsite' + commID).disabled = true;
			document.getElementById('TPC_Form_Comment' + commID).disabled = true;
			document.getElementById('TPC_Form_Submit' + commID).disabled = true;
			document.getElementById('TPC_Form_Cancel' + commID).disabled = true;

		// Create XML HTTP Object
			var req = false;
	
			if(window.XMLHttpRequest)
				{
				req = new XMLHttpRequest();
				}
			else if(window.ActiveXObject)
				{
				req = new ActiveXObject('Microsoft.XMLHTTP');
				}

		// Take Form Data
			tpc_Form_Re_Art = document.getElementById('TPC_Form_Re_Art' + commID).value;
			tpc_Form_Re_Comment = document.getElementById('TPC_Form_Re_Comment' + commID).value;
			tpc_Form_ViewerName = document.getElementById('TPC_Form_ViewerName' + commID).value;
			tpc_Form_ViewerEmail = document.getElementById('TPC_Form_ViewerEmail' + commID).value;
			tpc_Form_ViewerWebsite = document.getElementById('TPC_Form_ViewerWebsite' + commID).value;
			tpc_Form_Comment = document.getElementById('TPC_Form_Comment' + commID).value;

		// Compose and Encode Query String
			tpc_Form_ViewerName_Encoded = tpc_Form_ViewerName.replace('+','&#43;');
			tpc_Form_ViewerName_Encoded = urlencode(tpc_Form_ViewerName_Encoded);

			tpc_Form_ViewerEmail_Encoded = tpc_Form_ViewerEmail.replace('+','&#43;');
			tpc_Form_ViewerEmail_Encoded = urlencode(tpc_Form_ViewerEmail_Encoded);

			tpc_Form_ViewerWebsite_Encoded = tpc_Form_ViewerWebsite.replace('+','&#43;');
			tpc_Form_ViewerWebsite_Encoded = urlencode(tpc_Form_ViewerWebsite_Encoded);

			tpc_Form_Comment_Encoded = tpc_Form_Comment.replace('+','&#43;');
			tpc_Form_Comment_Encoded = urlencode(tpc_Form_Comment_Encoded);

			getData = '?TPC_Form_Re_Art=' + tpc_Form_Re_Art + '&TPC_Form_Re_Comment=' + tpc_Form_Re_Comment + '&TPC_Form_ViewerName=' + tpc_Form_ViewerName_Encoded + '&TPC_Form_ViewerEmail=' + tpc_Form_ViewerEmail_Encoded + '&TPC_Form_ViewerWebsite=' + tpc_Form_ViewerWebsite_Encoded + '&TPC_Form_Comment=' + tpc_Form_Comment_Encoded + '&DataCode=' + dataCode;

		// Configure Asynchronous Action
			req.open('GET','/Scripts/Thumbprints_TakeComments.php' + getData);

		// Configure Callback Action
			req.onreadystatechange = function()
				{
				if(req.readyState == '4')
					{
					// Remove Verarbeitung
						eisenJS_Verarbeitung_REMOVE();

					// Enable Form Fields
						document.getElementById('TPC_Form_ViewerName' + commID).disabled = false;
						document.getElementById('TPC_Form_ViewerEmail' + commID).disabled = false;
						document.getElementById('TPC_Form_ViewerWebsite' + commID).disabled = false;
						document.getElementById('TPC_Form_Comment' + commID).disabled = false;
						document.getElementById('TPC_Form_Submit' + commID).disabled = false;
						document.getElementById('TPC_Form_Cancel' + commID).disabled = false;

					// Clear Data
						document.getElementById('TPC_Form_Comment' + commID).value = '';

					// Generate Output
						switch(req.status)
							{
							case 200 : // Okay
								reloadComments(dataCode);
								break;

							default: // General Error
								alert('An error occured while responding to your request. Please refresh this page and try again.');
							}
					}
				}

		// Send Request
			req.send(null);

		// Return
			return false;
		}