// Functions modified 1/6/07 for compatibility with INNOVA's Editor
// Function assumes form name = form, and uses the document.forms.form reference.
//window.opener.document.form.

function hideOpenerSubmit() {
	if (document.all || document.getElementById) {
		for (i=0; i<window.opener.document.forms.form.length; i++) 	{
			try {
				var tempobj=window.opener.document.forms.form.elements[i];
				if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="button") 
					{
					var found = tempobj.name.match(/_hidden$/);
					if (found)
						tempobj.style.display="inline";
					else
						tempobj.style.display="none";
					}
				}
			catch(errorObject) {}	
			}
		}
}

function hideSubmit(form) {
	if (document.all || document.getElementById) {
		for (i=0; i<document.forms.form.length; i++) 	{
			try {
				var tempobj=document.forms.form.elements[i];
				if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="button") 
					{
					var found = tempobj.name.match(/_hidden$/);
					if (found)
						tempobj.style.display="inline";
					else
						tempobj.style.display="none";
					}
				}
			catch(errorObject) {}	
			}
		}
}

function enableSubmit() {
if (document.form == null)  return;
	if (document.all || document.getElementById) {
		for (i=0; i<document.forms.form.length; i++){
			try {
				var tempobj=document.forms.form.elements[i]
				if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="button") {
//					alert(tempobj.name.substring(0,13));
// do not turn on the hidden field in the editor -- ahhh!!
					if (tempobj.id.substring(0,13) != "iwe_btnSubmit") {
						tempobj.disabled = false;
						var found = tempobj.name.match(/_hidden$/);
						if (found)
							tempobj.style.display="none";
						else
							tempobj.style.display="inline";
						}
				}
			}
			catch(errorObject) {}	
		}
	}

}
