function ff() {
  var y = 0, o = rspage.w;
  do { y += o.offsetTop; o = o.offsetParent; } while (o != document.body);
  if (document.body.scrollTop < y)
    with (rspage.w.createTextRange()) { collapse(false); select(); }
}
function st(t) { window.status=t.getAttribute('title'); return true; }
function nost() { window.status=""; }
function sfocus(){if(document.rstop){ try{document.rstop.w.focus()}catch(e){} };}

var isDHTML = 0;
var isID = 0;
var isAll = 0;
var isLayers = 0;

if (document.getElementById) {isID = 1; isDHTML = 1;}
else {
if (document.all) {isAll = 1; isDHTML = 1;}
else {
browserVersion = parseInt(navigator.appVersion);
if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {isLayers = 1; isDHTML = 1;}
}}

function findDOM(objectID,withStyle)
{
	var result=false;
	if (withStyle == 1) {
		if (isID && ( e = document.getElementById(objectID) ) ) { result = e.style ; }
		else 
		if (isAll && ( e = document.all[objectID] ) ) { result = e.style; }
		else
		if (isLayers && ( e = document.layers[objectID] ) ) { result = e; }
	}
	else {
		if (isID && ( e = document.getElementById(objectID) )) { result = e; }
		else 
		if (isAll && ( e = document.all[objectID] )) { result = e; }
		else
		if (isLayers && ( e = document.layers[objectID] )) { result = e; }
	}
	return result;
}
	
function setVisibility(objectID,state) {
	var dom = findDOM(objectID,1);
	dom.visibility = state;
}

function setDisplay(objectID,state) {
	var dom = findDOM(objectID,1);
	dom.display = state;
}

function toggleVisibility(objectID) {
	var dom = findDOM(objectID,1);
	state = dom.display;
	if (state == 'none' )
		dom.display = 'inline';
	else {
		if (state == 'inline')
			dom.display = 'none';
	else dom.display = 'inline';
	}
}
function popupwindow(url,windowname,properties) {
  var popupwindow = null;
  // set name of parent window so we can popback to it
  window.name = 'swickimain';
  if (!properties) { properties = 'width=688,height=527,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,directories=no,status=no,screenx=0,screenY=0,top=0,left=0'; }
  if (!windowname) { windowname = 'swickiPopup'; }
    popupwindow = window.open(url,windowname,properties);
    if (popupwindow.opener == null) {popupwindow.opener = self; }
    popupwindow.focus();
}
function popback(url,target) {
  if (target != '') {
    window.opener.location.href = url;
  } else {
    window.location.href = url;
  }
  window.opener.focus();
}

/*
        ADDED BY AMADEUS
*/
function toggleDisplay(toAct){
                var theBlock = document.getElementById(toAct);
                if (theBlock.style.display=='block') theBlock.style.display='none';
                else theBlock.style.display='block';
        }
/*
        END OF ADDITION BY AMADEUS
*/


