// String code
// ProductForm handling functions

function deleteValue(e,o)
{
	if(o.firstTime){return}
	o.firstTime=true
	o.value=""
}

function updateSubcat()
{
	setTimeout("document.forms['productForm'].submit()",100);
}

function submitSubcat()
{
	var form = document.forms["productForm"];
	for(var i=0;i<form.elements.length;i++)
	{
		var formControl = form.elements[i];
		if(formControl.name=="ready")
		{
			formControl.value = "true";
		}
	}
	form.submit();
}

// Functions to open new windows
function popupWindow(url, event)
{
    // Open a new window
    window.open(url,'HelpInfo','width=410,height=484,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
    
    // Suppress the link action
    if(event && event.preventDefault)
    {
        event.preventDefault();
    }
    return false;
}

function setFormAction(fid, myURL){
	var thisForm =document.getElementById(fid);
    thisForm.action =myURL;
    thisForm.submit();
}