// JavaScript Document
var processComplete = false;
var beginProcess;

setActions = function()
{
	DoProcess();
	if (processComplete)
	{
		clearTimeout(beginProcess); 
	}
	else
	{
		beginProcess = window.setTimeout(setActions, 15000);
	}
	
}


function DoProcess() {
	if (processComplete) return;
	if (document.forms) {
		// Iterate forms
		formsCollection = document.forms;
		for(i=0; i<formsCollection.length; i++)
		{
			//alert("inForms"+formsCollection[i].name);
			// Iterate Element
			elementsCollection = formsCollection[i].elements;
			for(j=0; j<elementsCollection.length; j++)
			{
				node = elementsCollection[j];
				//alert(node.nodeName);
				if (node.nodeName == "INPUT")
				{
					if ((node.type == "text") || (node.type == "password"))
					node.onfocus = function() {
						this.value= "" ;
						this.onfocus = function(){
							// Unset The onFocus event for this object
							return false;
						}
					}
				}
				else if (node.nodeName == "TEXTAREA" && node.readOnly == false)
				//else if (node.nodeName == "TEXTAREA")
				{
					node.onfocus = function() {
						//alert(this.defaultValue);
						this.defaultValue = "";
						this.value = "";
						this.onfocus = function(){
							// Unset The onFocus event for this object
							return false;
						}
					}
				}
			}
		}
	}
	processComplete = true;
}

window.onload=setActions;
