function opCt(theURL,winName,winWidth,winHeight,features) {
  var w = (screen.width - winWidth)/2;
  var h = (screen.height - winHeight)/2 - 60;
  features = features+',width='+winWidth+',height='+winHeight+',top='+h+',left='+w;
  window.open(theURL,winName,features);
}

function refresh()
{
    window.location.replace( sURL );
}

function refresh()
{
    window.location.reload( false );
}

function submitform(nomeform)
{
  var form = document.getElementById(nomeform);
  form.submit();
}

function zoom() {
	imanew = document.getElementById('imgo').innerHTML;
//		alert(imanew);
//		window.open(imanew);
	opCt(imanew,'popfoto','530','530');
}

function zoomfoto(foto) {
	opCt(foto,'popfoto','530','530');
}

	var isIE = document.all?true:false;
	var isNS = document.layers?true:false;

function onlyDigits(e,decReq) {
	var key = (isIE) ? window.event.keyCode : e.which;
	var obj = (isIE) ? event.srcElement : e.target;
	var isNum = (key > 47 && key < 58) ? true:false;
	var dotOK = (key==44 && decReq=='decOK' && (obj.value.indexOf(",")<0 || obj.value.length==0)) ? true:false;
	if(key < 32)
	   return true;
	return (isNum || dotOK);
}

function onlyDigits2(e,decReq) {
	var key = (isIE) ? window.event.keyCode : e.which;
	var obj = (isIE) ? event.srcElement : e.target;
	var isNum = (key > 47 && key < 58) ? true:false;
	var dotOK = (key==444 && decReq=='decOK' && (obj.value.indexOf(",")<0 || obj.value.length==0)) ? true:false;
	if(key < 32)
	   return true;
	return (isNum || dotOK);
}