function StdGetFieldValue(sName)
{
var w = window;
var f = w.document.forms[0];
if (f==null) return null;
var fld = f[sName]; 
if (fld==null) return null;
if (fld.length>0&&fld[0]&&fld[0].type=="hidden") {
var s = "";
for (var n=0; n<fld.length; n++)  s += fld[n].value;
return s;   
}
if (fld.type=="text"||fld.type=="textarea"||fld.type=="hidden"||fld.type=="password") {
return fld.value
}
if (fld.type=="select-one" ) {
var opt = fld.options[fld.selectedIndex]
return (opt.value.length) ? opt.value : opt.text 
}
if (fld.type=="radio") return (fld.checked=="1") ? fld.value : null;
if (fld.length>1) {
if (fld[0].type=="radio") {
for (var i=0; i<fld.length; i++) 
if (fld[i].checked=="1") return fld[i].value;        
return null;
}
}
return null;
}
function _StdOnLoad()
{
if (OldOnLoad) OldOnLoad();
}
function NavOpen2(targetURL, navURL, bExternalLink, reopenCurrent) {
if (bExternalLink) {
NavOpen(targetURL, false, false);
} else {
if (reopenCurrent != "") {
NavOpen(DbURL + "/vwWebContent/" + CurrentUNID + "?OpenDocument&" + navURL, false, false); 
} else {
if (navURL == "<compute>") {
NavOpen(targetURL + window.location.search, false, false); 
} else {
NavOpen(targetURL + "?OpenDocument&" + navURL, false, false);
}
}
}
}
function NavOpen(url, bBacklink, bReload) {
window.location.href = url; 
}
function NavOpenPopupWindow(sUrl,sOptions,iWidth,iHeight,sName)
{
var x = Math.floor(screen.availWidth * 0.1) ;
var y = Math.floor(screen.availHeight* 0.06) ;
if (iWidth == null) {
var w = Math.floor(screen.availWidth * 0.75);
} else {
var w = iWidth;
}
if (iHeight == null) {
var h = Math.floor(screen.availHeight * 0.8);
} else {
var h = iHeight;
}
var sPos = 'width='+w+',height='+h+',screenX='+x+',screenY='+y+',left='+x+',top='+y;
if (sOptions==null) sOptions = 'toolbar=yes,menubar=yes,status=no,resizable=yes,scrollbars=yes'
setTimeout ("var vwin=window.open('"+sUrl+"','"+sName+"','"+ sPos+","+sOptions +"');                                            vwin.focus();", 1);  }
