//<SCRIPT LANGUAGE=javascript>

var newWindow=null
var newWindow2=null
function openWindow(theURL) {
//theURL=changeURL(theURL); //stamp random number at end URL to assure page is refreshed
	// check if window already exists
	if (!newWindow || newWindow.closed) {
		// store new window object in global variable
		newWindow = window.open(theURL,"Admin","scrollbars=no,resizable=no,top=275,width=460,height=275");
	} else {
	// window already exists, close it, reopen it, bring it forward
                newWindow = window.close
		newWindow = window.open(theURL,"Admin","scrollbars=no,resizable=no,top=275,width=460,height=275");
                newWindow.focus()
	}
}

function openWindow2(theURL) {
//theURL=changeURL(theURL); //stamp random number at end URL to assure page is refreshed
	// check if window already exists
	if (!newWindow || newWindow.closed) {
		// store new window object in global variable
		newWindow = window.open(theURL,"Admin","scrollbars=no,resizable=no,width=580,height=550");
	} else {
	// window already exists, close it, reopen it, bring it forward
                newWindow = window.close
		newWindow = window.open(theURL,"Admin","scrollbars=no,resizable=no,width=580,height=550");
                newWindow.focus()
	}
}
function openWindow2b(theURL) {
//theURL=changeURL(theURL); //stamp random number at end URL to assure page is refreshed
	// check if window already exists
	if (!newWindow || newWindow.closed) {
		// store new window object in global variable
		newWindow = window.open(theURL,"Admin","scrollbars=no,resizable=no,width=540,height=370");
	} else {
	// window already exists, close it, reopen it, bring it forward
                newWindow = window.close
		newWindow = window.open(theURL,"Admin","scrollbars=no,resizable=no,width=540,height=370");
                newWindow.focus()
	}
}

function openWindow2blng(theURL) {
//theURL=changeURL(theURL); //stamp random number at end URL to assure page is refreshed
	// check if window already exists
	if (!newWindow || newWindow.closed) {
		// store new window object in global variable
		newWindow = window.open(theURL,"Admin","scrollbars=no,resizable=no,width=520,height=400");
	} else {
	// window already exists, close it, reopen it, bring it forward
                newWindow = window.close
		newWindow = window.open(theURL,"Admin","scrollbars=no,resizable=no,width=520,height=400");
                newWindow.focus()
	}
}


function openWindow2c(theURL) {
//theURL=changeURL(theURL); //stamp random number at end URL to assure page is refreshed
	// check if window already exists
	if (!newWindow || newWindow.closed) {
		// store new window object in global variable
		newWindow = window.open(theURL,"Admin","scrollbars=no,resizable=no,width=610,height=510");
	} else {
	// window already exists, close it, reopen it, bring it forward
                newWindow = window.close
		newWindow = window.open(theURL,"Admin","scrollbars=no,resizable=no,width=610,height=510");
                newWindow.focus()
	}
}

function openWindow2d(theURL) {
//theURL=changeURL(theURL); //stamp random number at end URL to assure page is refreshed
	// check if window already exists
	if (!newWindow || newWindow.closed) {
		// store new window object in global variable
		newWindow = window.open(theURL,"Admin","scrollbars=no,resizable=no,width=540,height=650");
	} else {
	// window already exists, close it, reopen it, bring it forward
                newWindow = window.close
		newWindow = window.open(theURL,"Admin","scrollbars=no,resizable=no,width=540,height=650");
                newWindow.focus()
	}
}

function openWindow3(theURL) {
//theURL=changeURL(theURL); //stamp random number at end URL to assure page is refreshed
	// check if window already exists
	if (!newWindow || newWindow.closed) {
		// store new window object in global variable
		newWindow = window.open(theURL,"Admin","top=275,scrollbars=no,resizable=no,width=440,height=300");
	} else {
	// window already exists, close it, reopen it, bring it forward
                newWindow = window.close
		newWindow = window.open(theURL,"Admin","top=275,scrollbars=no,resizable=no,width=440,height=300");
                newWindow.focus()
	}
}

function openWindow3b(theURL) {
//theURL=changeURL(theURL); //stamp random number at end URL to assure page is refreshed
	// check if window already exists
	if (!newWindow || newWindow.closed) {
		// store new window object in global variable
		newWindow = window.open(theURL,"Admin","top=175,left=250,  scrollbars=no,resizable=no,width=440,height=340");
	} else {
	// window already exists, close it, reopen it, bring it forward
                newWindow = window.close
		newWindow = window.open(theURL,"Admin","top=175,left=250, scrollbars=no,resizable=no,width=440,height=340");
                newWindow.focus()
	}
}

function openWindow3c(theURL) {
//theURL=changeURL(theURL); //stamp random number at end URL to assure page is refreshed
	// check if window already exists
	if (!newWindow || newWindow.closed) {
		// store new window object in global variable
		newWindow = window.open(theURL,"Admin","top=175,left=250,  scrollbars=no,resizable=no,width=490,height=340");
	} else {
	// window already exists, close it, reopen it, bring it forward
                newWindow = window.close
		newWindow = window.open(theURL,"Admin","top=175,left=250, scrollbars=no,resizable=no,width=490,height=340");
                newWindow.focus()
	}
}

function openWindow3z(theURL) {
//theURL=changeURL(theURL); //stamp random number at end URL to assure page is refreshed
	// check if window already exists
	if (!newWindow || newWindow.closed) {
		// store new window object in global variable
		newWindow = window.open(theURL,"Admin","top=175,left=250,  scrollbars=no,resizable=no,width=440,height=380");
	} else {
	// window already exists, close it, reopen it, bring it forward
                newWindow = window.close
		newWindow = window.open(theURL,"Admin","top=175,left=250, scrollbars=no,resizable=no,width=440,height=380");
                newWindow.focus()
	}
}

function openWindow4(theURL) {
//theURL=changeURL(theURL); //stamp random number at end URL to assure page is refreshed
	// check if window already exists
	if (!newWindow || newWindow.closed) {
		// store new window object in global variable
		newWindow = window.open(theURL,"Admin","scrollbars=no,resizable=no,width=400,height=414");
	} else {
	// window already exists, close it, reopen it, bring it forward
                newWindow = window.close
		newWindow = window.open(theURL,"Admin","scrollbars=no,resizable=no,width=400,height=414");
        	newWindow.focus()
	}
}

function openWindow5(theURL) {
//theURL=changeURL(theURL); //stamp random number at end URL to assure page is refreshed
	// check if window already exists
	if (!newWindow || newWindow.closed) {
		// store new window object in global variable
		newWindow = window.open(theURL,"Admin","scrollbars=no,left=50,top=75,resizable=no,width=330,height=250");
	} else {
	// window already exists, close it, reopen it, bring it forward
                newWindow = window.close
		newWindow = window.open(theURL,"Admin","scrollbars=no,resizable=no,width=330,height=250");
        	newWindow.focus()
	}
}
function openWindow18(theURL) {
//theURL=changeURL(theURL); //stamp random number at end URL to assure page is refreshed
	// check if window already exists
	if (!newWindow || newWindow.closed) {
		// store new window object in global variable
		newWindow = window.open(theURL,"Admin","scrollbars=yes,resizable=yes,width=440,height=280");
	} else {
	// window already exists, close it, reopen it, bring it forward
                newWindow = window.close
		newWindow = window.open(theURL,"Admin","scrollbars=yes,resizable=yes,width=440,height=280");
                newWindow.focus()
	}
}
function openWindow18b(theURL) {
//theURL=changeURL(theURL); //stamp random number at end URL to assure page is refreshed
	// check if window already exists
	if (!newWindow || newWindow.closed) {
		// store new window object in global variable
		newWindow = window.open(theURL,"Admin","scrollbars=yes,resizable=yes,width=490,height=490");
	} else {
	// window already exists, close it, reopen it, bring it forward
                newWindow = window.close
		newWindow = window.open(theURL,"Admin","scrollbars=yes,resizable=yes,width=490,height=490");
                newWindow.focus()
	}
}
function openWindow18c(theURL) {
//theURL=changeURL(theURL); //stamp random number at end URL to assure page is refreshed
	// check if window already exists
	if (!newWindow || newWindow.closed) {
		// store new window object in global variable
		newWindow = window.open(theURL,"Admin","scrollbars=yes,resizable=yes,width=480,height=320");
	} else {
	// window already exists, close it, reopen it, bring it forward
                newWindow = window.close
		newWindow = window.open(theURL,"Admin","scrollbars=yes,resizable=yes,width=480,height=320");
                newWindow.focus()
	}
}
function openWindow18d(theURL) {
//theURL=changeURL(theURL); //stamp random number at end URL to assure page is refreshed
	// check if window already exists
	if (!newWindow || newWindow.closed) {
		// store new window object in global variable
		newWindow = window.open(theURL,"Admin","scrollbars=yes,resizable=yes,width=480,height=420");
	} else {
	// window already exists, close it, reopen it, bring it forward
                newWindow = window.close
		newWindow = window.open(theURL,"Admin","scrollbars=yes,resizable=yes,width=480,height=420");
                newWindow.focus()
	}
}


function jumpURL(selected_url) {				
		var new_url = selected_url.options[selected_url.selectedIndex].value;
		goto_submit(new_url);
}

//append date/time to URL to assure that page is refreshed
function changeURL(goURL) 
{
	if(goURL.indexOf("?") < 0)
		goURL = goURL + "?Stamp=" + ((new Date()).getTime());
	else
		goURL = goURL + "&Stamp=" + ((new Date()).getTime());
	return goURL;
}



function directit(aURL)
{

  var xURL = aURL;
  parent.window.location.href= xURL;

}


function validChars(fieldName,name) {
	// Validate for characters [A-Za-z0-9]
	var field = document.form1.elements[fieldName]

    
	var str=field;
	var valid = 0;
	var space = 0;

	if (!str){
		window.alert("You must enter a " + name); {
		valid =1 ;return(false)}
	}

	for (i=0;i<str.length;i++){
		ascii = str.charCodeAt(i)
		if (ascii<48 || ascii>122 || (ascii>58 && ascii<65) || (ascii>90 && ascii<97))
			valid = 1;
		if (ascii==32)
			space = 1;
	}

		if (space == 1) {
				window.alert("Your " + name + " must not contain spaces.");
				field.select(); 
				field.focus() }
			else if (valid == 1) {
				window.alert("Your " + name + " must contain only\nletters and numbers: (A-Z a-z 0-9).");
				field.select(); 
				field.focus(); }	

if (valid==1)
  return(false);
else
  return(true);
}

function preloadImages() { 
  if (document.images) {
    var imgFiles = preloadImages.arguments;
    if (document.preloadArray==null) document.preloadArray = new Array();
    var i = document.preloadArray.length;
    with (document) for (var j=0; j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){
      preloadArray[i] = new Image;
      preloadArray[i++].src = imgFiles[j];
  } }
}

function swapImgRestore() { 
  if (document.swapImgData != null)
    for (var i=0; i<(document.swapImgData.length-1); i+=2)
      document.swapImgData[i].src = document.swapImgData[i+1];
}

function swapImage() { 
  var i,j=0,objStr,obj,swapArray=new Array,oldArray=document.swapImgData;
  for (i=0; i < (swapImage.arguments.length-2); i+=3) {
    objStr = swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1];
    if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||
        (objStr.indexOf('document.all[')   ==0 && document.all   ==null))
      objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
    obj = eval(objStr);
    if (obj != null) {
      swapArray[j++] = obj;
      swapArray[j++] = (oldArray==null || oldArray[j-1]!=obj)?obj.src:oldArray[j];
      obj.src = swapImage.arguments[i+2];
  } }
  document.swapImgData = swapArray; 
}		


