//<SCRIPT Language="JavaScript">
//this function not to be used except through a function below
function openWindow(urlstring) 
{
  winStats='toolbar=no,location=no,directories=no,menubar=no,';
  winStats+='scrollbars=yes,resizable';
  if (navigator.appName.indexOf("Microsoft")>=0) 
  {
      winStats+=',left=50,top=25,height=400,width=650';
  }
  else
  {
      winStats+=',screenX=10,screenY=25';
  }
  floater=window.open(urlstring,'',winStats);
}

function openStandardWindow(urlstring) 
{
  winStats='toolbar=yes,location=yes,directories=yes,menubar=yes,';
  winStats+='scrollbars=yes,resizable';
  if (navigator.appName.indexOf("Microsoft")>=0) 
  {
      winStats+=',left=50,top=25';
  }
  else
  {
      winStats+=',screenX=10,screenY=25';
  }
  floater=window.open(urlstring,'',winStats);
}

agent = navigator.userAgent;
browserOk = 0;
if (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= 2) 
{
    browserOk = 1;
} 
else 
{
    if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= 3) 
    {
      browserOk = 1;
    }
}

function checkUncheck(strForm, strCheckboxControl, strElementGrp) 
{
  if (browserOk) 
  {
      theform = eval(document.forms[strForm]);
      len = theform.elements.length;
      checkboxcontrol = eval(theform.elements[strCheckboxControl]);
      for (i = 0; i < len; i++) 
      {
          if (theform.elements[i].name == strElementGrp)
          	theform.elements[i].checked=checkboxcontrol.checked;
      }
  }
}

function setRadioButtons(strForm, strCheckboxControl, strElementGrp, strNewValue) 
{
  if (browserOk) 
  {
      theform = eval(document.forms[strForm]);
      len = theform.elements.length;
      //checkboxcontrol = eval(theform.elements[strCheckboxControl]);
      for (i = 0; i < len; i++) 
      {
      	  //alert('found: ' + theform.elements[i].name);      
          if (theform.elements[i].name.indexOf(strElementGrp) > -1)
          {
       	    if (theform.elements[i].value == strNewValue)
       	    {
       	        //alert('found: ' + theform.elements[i].name + ', new value: ' + strNewValue);
       	    	theform.elements[i].checked=true;
       	    }
          }
      }

  }
}

function uncheckAllExcludingCaller(strForm, oChkbxcontrol, strElementGrp, bCheckedvalue) 
{
	if (browserOk) 
	{
		theform = eval(document.forms[strForm]);
		len = theform.elements.length;
		//loop all elements in form

		for (i = 0; i < len; i++) 
		{
			// is in the group
			if (theform.elements[i].name == strElementGrp) 
			{
				// set the checked value on all controls but the calling one
				if (oChkbxcontrol.value != theform.elements[i].value) 
				{
					theform.elements[i].checked = bCheckedvalue;
				}
			}
		}
	}
}

function uncheckAny(strForm, oChkbxcontrol, strElementGrp, strDefaultValue, bCheckedvalue) 
{
	if (browserOk) 
	{
		theform = eval(document.forms[strForm]);
		len = theform.elements.length;
		//loop all elements in form
		for (i = 0; i < len; i++) 
		{
			// is in the group
			if (theform.elements[i].name == strElementGrp) 
			{
				// set the checked value on all controls but the calling one
				if (strDefaultValue == theform.elements[i].value)
					theform.elements[i].checked = bCheckedvalue;
			}
		}
	}
}

function doFramesBuster()
{
  var sThisURL = unescape(window.location.href);
  if ( top != self )
  {
    top.location.replace( sThisURL );
  }
}