function confirmLink(theLink, theSqlQuery)
{
    confirmMsg = " Do realy want to ";
    // Confirmation is not required in the configuration file
    // or browser is Opera (crappy js implementation)
    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + ' :\n' + theSqlQuery);
    if (is_confirmed) {
        theLink.href += '&is_js_confirmed=1';
    }

    return is_confirmed;
}
function confirmChngAdmin(theSelection, status)
{
    if(theSelection.selectedIndex!=4){ 
    //  alert(theSelection.selectedIndex); 
      return; 
    }
    confirmMsg = " Do realy want to set adminstrator priviliges ";
    // Confirmation is not required in the configuration file
    // or browser is Opera (crappy js implementation)
    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg);
    if (is_confirmed) {
        theSelection.selectedIndex  = 4;
    }else{
        theSelection.selectedIndex  = status;
    }

    return;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function tmt_findObj(n){
	var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
	x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
	}else{x=document.getElementById(n)}return x;
}

function tmt_DivSwitch(){
	var vis=(document.layers) ? ".visibility" : ".style.visibility";
	var fun=(document.getElementById) ? "tmt_findObj" : "MM_findObj";
	var args=tmt_DivSwitch.arguments;
	for(var i=0;i<args.length;i++){	
		if(eval(fun+"(args[i])")){
			var oldVis=eval(fun+"(args[i])"+vis);
			if(document.getElementById||document.all){
				var newVis=(oldVis=="hidden")?"visible":"hidden";
			}else{var newVis=(oldVis=="hide")?"show":"hide";}
			eval(fun+"(args[i])"+vis+"=newVis");}}
}