<!--
//<![CDATA[
FixElement.interval = 15;
var Opera = ua.indexOf('opera/7')>-1 ? true : false;
var ie6 = ua.indexOf('msie 6.0')>-1 ?true : false;
var Mac = ua.indexOf('mac')>-1 ?true : false;

if(ua.indexOf('firefox')>-1)
	Opera = true;
function FixElement (id, vertical, horizontal) {
  this.elementId = id;
  this.vertical = vertical ? vertical : 'top';
  this.horizontal = horizontal ? horizontal : 'left';
  this.id = FixElement.elements.length;
  FixElement.elements[this.id] = this;
  this.init();
}
function FixElement_init () {
  if (document.layers) {
    this.element = document[this.elementId];
    this.width = this.element.document.width;
    this.height = this.element.document.height;
  }
  else if (Opera) {
    this.element = document.getElementById(this.elementId);
    this.width = this.element.style.pixelWidth;
    this.height = this.element.style.pixelHeight;
  }
  else if (document.all) {
    this.element = document.all[this.elementId];
    this.width = this.element.offsetWidth;
    this.height = this.element.offsetHeight;
  }
  else if (document.getElementById) {
    this.element =document.getElementById(this.elementId);
    this.width = this.element.offsetWidth;
    this.height = this.element.offsetHeight;
 }
  this.fixPosition();
  this.makeVisible();
  /* want here
     if (!Opera && document.all && !Mac)
       window.onscroll = fixElements;
     else if (this.id == 0)
       FixElement.tid = setInterval('fixElements()', FixElement.interval);
     but due to a initial positioning problem with IE we don't use onscroll
  */
  if (this.id == 0)
    FixElement.tid = setInterval('fixElements()', FixElement.interval);
}
FixElement.prototype.init = FixElement_init;

function FixElement_fixPosition () {
  if(Mac){
	return;
  }
  if (document.layers) {
    if (this.horizontal == 'left')
      this.element.left = window.pageXOffset;
    else
      this.element.left = 
        window.pageXOffset + window.innerWidth - this.width - 15;
    if (this.vertical == 'middle')
      this.element.top = window.pageYOffset+200;
    else
      this.element.top =
        window.pageYOffset + window.innerHeight - this.height;
  }
  else if (Opera) {
    if (this.horizontal == 'left')
      this.element.style.pixelLeft = window.pageXOffset+2;
    else 
      this.element.style.pixelLeft = 
        window.pageXOffset + window.innerWidth - this.width;
    if (this.vertical == 'middle')
      this.element.style.pixelTop = window.pageYOffset+200;
    else
      this.element.style.pixelTop = window.pageYOffset +42;
  }
  else if (document.all) {
    if (this.horizontal == 'left')
      this.element.style.pixelLeft = document.body.scrollLeft;
    else 
      this.element.style.pixelLeft = 
        document.body.scrollLeft + document.body.clientWidth - this.width;
    if (this.vertical == 'middle')
	{
		if(ie6)
			this.element.style.pixelTop=(document.documentElement.clientHeight/2)-50;
		else
	      this.element.style.pixelTop = document.body.clientHeight/2;
	}
    else
      this.element.style.pixelTop =
        document.body.scrollTop +60;
  }
  else if (document.getElementById) {
    if (this.horizontal == 'left')
      this.element.style.left = window.pageXOffset +2+ 'px';
    else
      this.element.style.left =
        (window.pageXOffset + window.innerWidth - this.width - 60) + 'px';
    if (this.vertical == 'middle')
      this.element.style.top = (window.pageYOffset+window.innerHeight)/2+this.height+ 'px';
    else
      this.element.style.top =
        (window.pageYOffset - 40) + 'px';
  }
}
FixElement.prototype.fixPosition = FixElement_fixPosition;
function FixElement_makeVisible () {
  if (document.layers)
    this.element.visibility = 'show';
  else
    this.element.style.visibility = 'visible';
}
FixElement.prototype.makeVisible = FixElement_makeVisible;
function fixElements () {
  for (var e = 0; e < FixElement.elements.length; e++)
    FixElement.elements[e].fixPosition();
}
FixElement.elements = new Array();
//]]>
-->

