/* javascript */

mc=new Array()
mc[0]='55276330625260594755233952445926343133573039';

function mc2(e) {
op='';chars='st2-n74opr.uyqz9m:0vwk_5x16hjab3igcdel8@f'; m='39525560243040';
inp=m+mc[e];for(i=0; i<inp.length; i+=2) {id=parseInt(inp.substr(i,2));op+=chars.charAt(id-23);}
window.location.href= op;
}


  function findPosY(obj)
  {
  // this function from http://blog.firetree.net/2005/07/04/javascript-find-position/
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }

function startShape() { 
window.onresize = function() {  startShape(); }
if(!arrHover) { var arrHover = new Image;arrHover.src = '/_img/arrlite.gif'; }
setTimeout(setShape,10); 
}

function setShape() {
var abShape;var elemTop;var elemLeft;
var marker; var markerLeft; var markerRight;
var documentWidth=0; var documentHeight=0;
var abShapeHeight=120;
var markerYPos=0;

if (document.getElementById) {
abShape=document.getElementById("absh");
abShape.style.visibility='hidden';

markerLeft=document.getElementById("markerLeft");
markerLeftYPos=findPosY(markerLeft);
markerRight=document.getElementById("markerRight");
markerRightYPos=findPosY(markerRight);
markerYPos = (markerLeftYPos>markerRightYPos)? markerLeftYPos : markerRightYPos;
// establish width and height

if(window.innerWidth) {
documentWidth=window.innerWidth;
} else if(document.body.clientWidth) {
documentWidth=document.body.clientWidth;
} 
if(window.innerHeight) {
documentHeight=window.innerHeight;
} else if(document.body.clientHeight) {
documentHeight=document.body.clientHeight;
} 
contentBottom =markerYPos+10; // offset plus a few pixels spacing

if(documentWidth>0 && documentHeight>0 && markerYPos>0 ) {
alignBrowserBottom=(documentHeight-abShapeHeight);
// check the bottom of content marker and adjust accordingly
if(alignBrowserBottom<contentBottom) {
	targetYpos=contentBottom;
} else {
	targetYpos=alignBrowserBottom;
}

elemTop=targetYpos+"px";
elemLeft=((documentWidth/2)+90)+"px";
abShape.style.top=elemTop;
abShape.style.left=elemLeft;
abShape.style.visibility='visible';
}}
}
