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", sFlashVars:"textalign=center"}));
			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 close_window() {
    window.close();
}

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=340.5,top=109";
	newWindow = window.open(url, 'newWin', tools);
	newWindow.focus();
}*/

/*var win=null;

function popUpWin(mypage,myname,w,h,scroll,pos){
	
	if(pos=="random"){
		LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
	}
	if(pos=="center"){
		LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;
	}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20
	}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}*/


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;
	}