function confirmSubmit()
{
	if (confirm('Tahad tõepoolest kustutada?')) return true;
	else return false;
}
function backToTop(){
	for (I=250;I>0;I=I-2){
	scroll(1,I) }
	scroll(1,0);
}
function openPopForm(loc)
{
window.open(loc,"_blank","toolbar=0, fullscreen=0, location=0, directories=0, status=0, menubar=0, scrollbars=1, resizable=1, copyhistory=0, width=760, height=550,left=100,top=10")
}
function openObj(loc,w,h)
{
window.open(loc,"_blank","toolbar=0, fullscreen=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0, copyhistory=0, width="+w+", height="+h+",left=100,top=100")
}
function openPic(loc,w,h)
{
window.open(loc,"_blank","toolbar=0, fullscreen=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=1, copyhistory=0, width="+w+", height="+h+",left=100,top=100")
}
function loader(flag){
	document.getElementById("bar").style.visibility = (flag) ? 'visible' : 'hidden'
}

function toggle(expand_id){
var obj=document.getElementById(expand_id).style.visibility;
	if(obj=="hidden"){
		document.getElementById(expand_id).style.position="static";
		 document.getElementById(expand_id).style.visibility="inherit";
	 }else{
	 	document.getElementById(expand_id).style.position="absolute";
		 document.getElementById(expand_id).style.visibility="hidden";
	 }
}

function vis(id){
a=document.getElementById(id).style.visibility;
if(a=="visible"){
document.getElementById(id).style.position='absolute';
document.getElementById(id).style.visibility='hidden';
}else{
document.getElementById(id).style.position='relative';
document.getElementById(id).style.visibility='visible';

}
}

function edited(value,test){

if(value==true)this.change=true;else if(test!="test" && value==false)this.change=false;

else if(test=="test" && this.change && document.form1){
	if(confirm('Kas salvestan muutused?'))document.form1.submit();}


}
var change;
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
