var lastObj;

function do_over(obj,color) {
   if (obj != lastObj) { obj.style.backgroundColor = '#' + color;        obj.style.color = 'black'; obj.style.cursor = 'hand'; } }

function do_out(obj) {
   if (obj != lastObj) { obj.style.backgroundColor = ''; obj.style.color = ''; }}

function PreloadImages()
{
 if (document.images)
 {
  var imgFiles = PreloadImages.arguments;
  var preloadArray = new Array();
  for (var i=0; i<imgFiles.length; i++)
  {
   preloadArray[i] = new Image;
   preloadArray[i].src = imgFiles[i];
  }
  }
}

function put_contact(user, host, stl, name) {
  var mail = user+'@'+host;
  if (name)  {
    document.write('<a href="mailto:'+mail+'" class="'+stl+'">'+name+'</a>');
  } else {
    document.write('<a href="mailto:'+mail+'" class="'+stl+'">'+mail+'</a>');
  }
}

function showimg(imgname)
{       img = document.getElementById(imgname);
        s = img.src.replace(/empty/g, "arrow");
        img.src = s;
        return true;
}

function hideimg(imgname)
{
        img = document.getElementById(imgname);
        s = img.src.replace(/arrow/g, "empty");
        img.src = s;
        return true;
}

/* Gallery Code */

var resId=0;
var imgWndw;

function imgOpen(imgLink,Title) {
    if (typeof(window.resizeBy)=='undefined') return true;
    imgWndw=window.open('',imgLink.target,'width=100,height=100'+
        ',toolbar=no,menubar=no,location=no,status=no,'+
        'resizable=yes,scrollbars=no,left='+(screen.width>>>2)+
        ',top='+(screen.height>>>4));
    self.focus();
    var imgTitle=(Title)?Title:imgLink.href;
    with (imgWndw.document){
        open();
        write('<ht'+'ml><he'+'ad><ti'+'tle>'+imgTitle+'</ti'+'tle>'+
        '</he'+'ad><bo'+'dy leftmargin="0" topmargin="0" '+
        'rightmargin="0" bottommargin="0" marginwidth="0" '+
        'style="margin:0;padding:0;position:fixed;overflow:none;" '+
        'marginheight="0"><img src="'+imgLink.href+'" border="0" '+
        ' alt="'+imgTitle+'" title="'+imgTitle+'" class="r" /></bo'+
        'dy></ht'+'ml>');
        close();
    }
    resId=setInterval('imgResize()',100);
    return false
}

function imgResize() {
    var w=imgWndw.document.images[0].width;
    if (w>screen.availWidth) w=screen.availWidth;
    var h=imgWndw.document.images[0].height;
    if (h>screen.availHeight) h=screen.availHeight;
    if (w>50 && h>50) {
        var ww=(imgWndw.innerWidth)?imgWndw.innerWidth:((document.body)?
            imgWndw.document.body.clientWidth:null);
        var wh=(imgWndw.innerHeight)?imgWndw.innerHeight:((document.body)?
            imgWndw.document.body.clientHeight:null);
        if (ww && wh) {
            imgWndw.resizeBy(w-ww,h-wh);
        }
        imgWndw.focus();
        clearInterval(resId)
    }
}