function rusurePro(what) { 

 if (confirm(what)) { 
 document.formi.reset()
 return true;  
 } else { 

return false; 
 } 
} 

function validateNumber(field)
{
  var val = field.value;
  if(!/(^\d+$)|(^\d+\.\d+$)/.test(val)||val=="")
  {
      field.value = 0;
      field.focus();
      field.select();
  }
}

function PopWIN(str,namei){
	window.open(str,namei,'top='+(screen.height-100)/2+',left='+(screen.width-100)/2+',width=1,height=1,scrollbars=Yes,status=no,toolbar=no,menubar=no,location=no,resizable=no,titlebar=no')
}

function PopWIN2(str,namei,w,h){
	window.open(str,namei,'top='+(screen.height-100)/2+',left='+(screen.width-100)/2+',width='+w+',height='+h+',scrollbars=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,titlebar=no')
}

function PopWIN3(str,namei,w,h){
	window.open(str,namei,'top='+(screen.Height/2)-250+',left='+(screen.width/2)-250+',width='+w+',height='+h+',scrollbars=yes,status=no,toolbar=no,menubar=no,location=no,resizable=no,titlebar=no')
}


function key(){
		if (event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;
	}
	
function key2(){
if (event.keyCode < 45 || event.keyCode > 57){
	event.returnValue = true;
	}else{
		event.returnValue = false;
		}
}

function key3(){
if (event.keyCode <= 46 || event.keyCode > 57 || event.keyCode == 47){event.returnValue = false;}
}

function key3Zero(){
if (event.keyCode <= 46 || event.keyCode==48 || event.keyCode > 57 || event.keyCode == 47){event.returnValue = false;}
}

function key4(){
if (event.keyCode <= 45 || event.keyCode > 57 || event.keyCode == 47){event.returnValue = false;}
}

function key6(){
if (event.keyCode <= 45 || event.keyCode > 58 || event.keyCode == 47){event.returnValue = false;}
}
function changePos(what){
 var what
 if(what.style.direction=="rtl"){
   what.style.direction = 'ltr'
 }else{
   what.style.direction = 'rtl'
 }
 }
 
 //Start text area limit
function taLimit() {
	var taObj=event.srcElement;
	if (taObj.value.length==taObj.maxLength*1) return false;
}

function taCount(visCnt) { 
	var taObj=event.srcElement;
	if (taObj.value.length>taObj.maxLength*1) taObj.value=taObj.value.substring(0,taObj.maxLength*1);
	if (visCnt) visCnt.innerText=taObj.maxLength-taObj.value.length;
}
//End text area limit


function getSub(who){
    document.getElementById('Sub'+who).className = "SubsOn"
}

function endSub(who){
    document.getElementById('Sub'+who).className = "SubsOff"
}

function getSub2(who,classi){
    document.getElementById('Sub'+who).className = "SubsOn"
	document.getElementById('Menu'+who).className = classi
}

function endSub2(who,classi){
    document.getElementById('Sub'+who).className = "SubsOff"
	document.getElementById('Menu'+who).className = classi
}