function isDigit(allowNeg){return((event.keyCode>=48)&&(event.keyCode<=57)||(allowNeg&&(event.keyCode==45)))}
function getSelectValue(obj){return obj.options[obj.selectedIndex].value}
function getSelectText(obj){return obj.options[obj.selectedIndex].text}
function selectValue(obj,value){obj.selectedIndex=getSelectIndex(obj,value)}
function getSelectIndex(obj,value){for(var i=0;i<obj.options.length;i++){if(obj.options[i].value==value)return i}; return 0}
function getRadioValue(obj){if(!obj.length)return(obj.checked?obj.value:null);for(var i=0;i<obj.length;i++){if(obj[i].checked){return obj[i].value}};return null}
function setRadioValue(obj,val){for(var i=0;i<obj.length;i++)if(obj[i].value==val)obj[i].checked=true}

var wnd // allow only 1 window!
function openWindow(url,name,w,h,pos,props){
	var left,top
	if(pos=='center'){left=(screen.width)?(screen.width-w)/2:100; top=(screen.height)?(screen.height-h)/2:100;}
	else{left=0;top=0}
	props='width='+w+',height='+h+',top='+top+',left='+left+(props==''?'':','+props)
	if(window.wnd&&!wnd.closed)wnd.close()
	wnd=window.open(url,name,props)
}

function Llink()
{
var path = window.location.pathname
var fileName = path.substring(path.lastIndexOf("/")+1,path.length)
return fileName
}

function FLlink()
{
var path = parent.location.pathname
var fileName = path.substring(path.lastIndexOf("/")+1,path.length)
return fileName
}

