
function OffWindowH()

{

 var OffWindowH=0;

 

 window.scrollTo(0,10000000);

 

 if(typeof self.pageYOffset!='undefined')

 OffWindowH=self.pageYOffset;

 else if(document.compatMode && document.compatMode != 'BackCompat')

OffWindowH=document.documentElement.scrollTop;

 else if(document.body && typeof(document.body.scrollTop)!='undefined')

OffWindowH=document.body.scrollTop;

 window.scrollTo(0,0);

 

 return OffWindowH;

}

 

function WindowHeight()

{

  var WindowHeight = 0;

  if( typeof( window.innerWidth ) == 'number' )

  WindowHeight = window.innerHeight;

  else if (document.documentElement &&  document.documentElement.clientHeight)

  WindowHeight = document.documentElement.clientHeight;

  else if(document.body && document.body.clientHeight)

  WindowHeight = document.body.clientHeight;

 

  return WindowHeight;

}



function pHeight()

{

  var pHeight = OffWindowH() + WindowHeight();

  return pHeight;

}

 

function favBg()

{

  var favBg = document.getElementById('favBg');

  favBg.style.height = pHeight() + 'px';

}

var cdiv = "blank";

function favArea() {

  if (cdiv == "blank") { cdiv = window.setInterval("favArea()", 50); }

 var Element = document.getElementById("favArea");

 objh = parseFloat(Element.style.height)/2;

 objw = parseFloat(Element.style.width)/2;

 Element.style.top = Math.floor((Math.round((document.documentElement.offsetHeight/2)+document.documentElement.scrollTop)-objh))+'px';

 Element.style.left = Math.floor(Math.round((document.documentElement.offsetWidth/2)+document.documentElement.scrollLeft)-objw)+'px';

}

function showHideItems(Item1,Item2){
	myItem1 = document.getElementById(Item1);
    if (myItem1.style.visibility != "hidden") {
        myItem1.style.visibility = "hidden";
    } else {
 		myItem1.style.visibility = "visible";
	}
	myItem2 = document.getElementById(Item2);
    if (myItem2.style.visibility != "hidden") {
        myItem2.style.visibility = "hidden";
    } else {
 		myItem2.style.visibility = "visible";
	}
}