var BUTTON_OFFSET_SMALL = 16;

//Global page object - called by all appropriate child pages
var page = {
		
		init:function(){
			page.sIFR();
			if(typeof(pagechild) == 'object' && pagechild.init){
				pagechild.init();
			}
		},
		
	sIFR:function(){
			sIFR.replaceElement("h1.auxiliary", named({sFlashSrc: "flash/sifr/AkidenzGrotesqueBoldExtended.swf", sColor: "#230000", sWmode: "transparent", sCase: "upper"}));
			sIFR.replaceElement("h2.auxiliary", named({sFlashSrc: "flash/sifr/AkidenzGrotesqueBoldExtended.swf", sColor: "#FCEFCF", sWmode: "transparent", sCase: "upper"}));

			/*sIFR.replaceElement(".subpagetitle", named({sFlashSrc: "flash/sifr/AkidenzGrotesqueBoldExtended.swf", sColor: "#FBEFCE", sWmode: "transparent", sCase: "upper"}));*/
		}
		
}

var newWindow = null;

function closeWin(){
	if (newWindow != null){
		if(!newWindow.closed)
			newWindow.close();
	}
}

function popUpWin(url, type, strWidth, strHeight){
	
	closeWin();
	
	if (type == "fullScreen"){
		strWidth = screen.availWidth - 10;
		strHeight = screen.availHeight - 160;
	}
	
	var tools="";
	if (type == "standard" || type == "fullScreen") tools = "resizable=no,toolbar=no,location=no,scrollbars=yes,menubar=no,width="+strWidth+",height="+strHeight+",top=112.5,left=187";
	if (type == "console") tools = "resizable=no,toolbar=no,location=no,scrollbars=no,width="+strWidth+",height="+strHeight+",left=240.5,top=109";
	newWindow = window.open(url, 'newWin', tools);
	newWindow.focus();
}


function setOpacity(obj, opacity) {
  opacity = (opacity == 100)?99.999:opacity;
  
  // IE/Win
  obj.style.filter = "alpha(opacity:"+opacity+")";
  
  // Safari<1.2, Konqueror
  obj.style.KHTMLOpacity = opacity/100;
  
  // Older Mozilla and Firefox
  obj.style.MozOpacity = opacity/100;
  
  // Safari 1.2, newer Firefox and Mozilla, CSS3
  obj.style.opacity = opacity/100;
}

function fadeIn(objId,opacity) {
  if (document.getElementById) {
    obj = document.getElementById(objId);
    if (opacity <= 100) {
      setOpacity(obj, opacity);
      opacity += 10;
      window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 50);
    }
  }
}

// Object detection
	var isW3C = (document.getElementById && document.createTextNode) ? true : false;
	var isAll = (document.all) ? true : false;
	
	// Takes the ID of an HTML element and returns an object reference
	function getObj(elemID) {
	var theObj = (isAll) ? document.all[elemID] : ((isW3C) ? document.getElementById(elemID) : null);
		return theObj;
	}