
var submitted = false;

function doSubmit(form) {
if (!submitted) {
submitted = true;
form.submit();
}
}

var submitted = false;

function doMultipleSubmit(form, submitname) {
if (!submitted) {
submitted = true;
form.submithit.value=submitname.name;
form.submit();
}
}




var newwindow='';

function reloadPopup(){
if (!newwindow.closed && newwindow.location) {
newwindow.location.reload();
}
}

function popUp(URL) {
width=800;
if (!newwindow.closed && newwindow.location)
	{
		newwindow.location.href = URL;
	}
	else
	{
	    param='toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width='+width+',height=800';
		newwindow = window.open(URL, 'name', param);
		if (!newwindow.opener) newwindow.opener = self;
	}
	if (window.focus) {newwindow.focus()}


}



function to_old_win(url)
{
	opener.location.href = url;
}



function showDIV(divName){


	if(document.getElementById) {
	     var exists=eval(document.getElementById(divName));
        if (!exists) {
            return;
        }
		document.getElementById(divName).style.display = 'block';
		document.getElementById(divName).style.visibility='visible';
	}
	else if(document.layers) {
		for (i=0; i < document.layers.length; i++) {
			var whichEl = document.layers[i];
			var exists=eval(whichEl.id.indexOf(divName));
            if (!exists) {
                return;
            }

			if (whichEl.id.indexOf(divName) != -1) {
				whichEl.visibility='show';
			}
			arrange();
		}

		document.layers[divName].visibility='show';
		arrange();
	}
	else if(document.all) {
		document.all(divName).style.display = 'block';
		document.all(divName).style.visibility='visible';
	}
}

function hideDIV(divName){

	if(document.getElementById) {
	    var exists=eval(document.getElementById(divName));
        if (!exists) {
            return;
        }
		document.getElementById(divName).style.visibility='hidden';
		document.getElementById(divName).style.display = 'none';
	}
	else if(document.layers) {
		for (i=0; i < document.layers.length; i++) {
			var whichEl = document.layers[i];
			var exists=eval(whichEl.id.indexOf(divName));
            if (!exists) {
                return;
            }

			if (whichEl.id.indexOf(divName) != -1) {
				whichEl.display = 'none';
				whichEl.visibility='hide';
			}
			arrange();
		}

		document.layers[divName].display = 'none';
		document.layers[divName].visibility='hide';

	}
	else if(document.all) {
		document.layers[divName].display = 'none';
		document.all(divName).style.visibility='hidden';
	}
}



/*
Auto tabbing script- By JavaScriptKit.com
http://www.javascriptkit.com
This credit MUST stay intact for use
*/

function autotabpg(original,destination){
if (original.getAttribute&&original.value.length==original.getAttribute("maxlength"))
destination.focus()
}

function PopupHelp(URL){
 ftsWindow1 = window.open(URL,"ftsWin1",
 "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=500,height=600");
 window.name = "main";
 ftsWindow1.focus();
}

/***********************************************
* Gradual Highlight image script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var baseopacity=50

function slowhigh(which2){
imgobj=which2
browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity)
highlighting=setInterval("gradualfade(imgobj)",25)
}

function slowlow(which2){
cleartimer()
instantset(baseopacity)
}

function instantset(degree)
{
   
    if (browserdetect=="mozilla") {
        imgobj.style.MozOpacity=degree/100
    } else {
        if (browserdetect=="ie") {
             if (typeof(imgobj.filters.alpha) == 'object') {
                imgobj.filters.alpha.opacity=degree
             }
        }
    }
}

function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(cur2)
{
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1) {
    cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.1, 0.99)
} else 
    if (typeof(cur2.filters.alpha.opacity) == 'object') {

        if (browserdetect=="ie" && cur2.filters.alpha.opacity<100) {
            cur2.filters.alpha.opacity+=10
        } else if (window.highlighting) {
            clearInterval(highlighting)
        }
    }
}

function selectAll(f,n,v) {
		var chk   = ( v == null ? true : v );
		for (i = 0; i < f.elements.length; i++) {
			if( f.elements[i].type == 'checkbox' &&
f.elements[i].name == n ) {
				f.elements[i].checked = chk;
			}
		}
	}


