function submitForm (fname) {
var sFORM=new GetObj(fname);
sFORM.obj.submit();
return true;
}

function fnREADFILE(fname) {
	var txtFORM="";
	txtFORM+="<html>";
	txtFORM+="<head>";
	txtFORM+="<title>READ FILE</title>";
	txtFORM+="</head>";
	txtFORM+="<body>";
	txtFORM+="<FORM action="+cgiDIR+cgiREAD+" id='readfile' method=post>";
	txtFORM+="<INPUT type=hidden name=fDIR  value='"+srcDIR+"'> ";
	txtFORM+="<INPUT type=hidden name=fNAME value='"+fname+"'> ";
	txtFORM+="<input type=submit value='Go Read'>";
	txtFORM+="<a href='"+cgiDIR+cgiREAD+"' ";
	txtFORM+="   onClick = 'return submitForm(\"readfile\")'";
	txtFORM+=">READ "+fname+"</a>";
	txtFORM+="</form>";
	txtFORM+="</body>";
	txtFORM+="</head>";
	txtFORM+="</html>";
	document.writeln(txtFORM);
}

function fnWRITEFILE(fname) {
	var txtFORM="";
	txtFORM+="<html>";
	txtFORM+="<head>";
	txtFORM+="<title>READ FILE</title>";
	txtFORM+="</head>";
	txtFORM+="<body>";
	txtFORM+="<FORM action="+cgiDIR+cgiREAD+" id='writefile' method=post>";
	txtFORM+="<INPUT type=hidden name=fDIR  value='"+srcDIR+"'> ";
	txtFORM+="<INPUT type=hidden name=fNAME value='"+fname+"'> ";
	txtFORM+="<input type=submit value='Go Write'>";
	txtFORM+="<a href='"+cgiDIR+cgiREAD+"' ";
	txtFORM+="   onClick = 'return submitForm(\"writefile\")'";
	txtFORM+=">WRITE "+fname+"</a>";
	txtFORM+="</form>";
	txtFORM+="</body>";
	txtFORM+="</head>";
	txtFORM+="</html>";
	document.writeln(txtFORM);
}
