

function dec(s) {
s=unescape(s);
sdec='';
var slength = s.length;
for(var i = 0; i < slength; i++) {
sdec+=String.fromCharCode((s.charCodeAt(i)^255));
}
return sdec;
}

function NewWindow(mypage, myname, w, h, scroll)
{
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'height=' + h + ',width=' + w + ',top=' + wint + ',left=' + winl + ',scrollbars=' + scroll + ',resizable'
  win = window.open (mypage, myname, winprops)
  if (parseInt (navigator.appVersion) >= 4)
  {
    win.window.focus();
  }
}

var NS4=((navigator.appName.indexOf('Netscape') != -1) && (parseInt(navigator.appVersion) ==4));

function setVars() {
innerY = 0;
object = "leftcol";
if (NS4)
{
v = ".top=+";
dS = "document.";
sD = "";
y = "window.pageYOffset";
}
else {
v = ".pixelTop=";
dS = "";
sD = ".style";
y = "document.body.scrollTop";
}
checkLocA();
}
movey = 0;
ydiff = 0;
ystart = 0;

function checkLoc() {
yy = eval(y);
ydiff = ystart - yy;
if ((ydiff < (-1)) || (ydiff > (1))) movey = Math.round(ydiff / 15), ystart -= movey;
if (NS4){
eval(dS + object + sD + v + (ystart + innerY));}
else
{
document.getElementById(object).style.top=(ystart + innerY)+"px";
}
setTimeout("checkLoc()", 10);
}

function checkLocA() {
ystart = eval(y);
}

function posSearchGoogle(){
var footer;
var gs;
if (document.getElementById) {
footer = document.getElementById('footer');
gs=document.getElementById('SearchGoogle');
}
else if (document.all) {
footer = document.all['footer'];
gs=document.all['SearchGoogle'];
}
if ((footer) && (gs)){
gs.style.top=footer.offsetTop-gs.offsetHeight;
gs.style.left=0;
gs.style.visibility="visible";
}
}

function start() {
setVars();
if (document.getElementById(object))
checkLoc();
posSearchGoogle();
}

window.onload = start;
window.onresize=posSearchGoogle;

