// Function to capture the horizontal scrollvalue in the window
function getScroll() {
document.forms.vertical_scroll = document.getElementById("siteObjects").scrollTop;
alert(document.forms.vertical_scroll);
}

function popupWin(sFile, sWin, width, height) {
   // Open a new window and dispaly content for picture contribution
   window.open(sFile, sWin,"toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width="+width+",height="+height);
}

var writeWin = null;
function showbigfile(sFile, sWin, width, height) {
   writeWin = window.open('', sWin,"toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width="+width+",height="+height); 
   var ePen ='<html><head><title></title></head>'; 
   ePen += '<img src="'+sFile;
   ePen += '"></html>';
   var wd = writeWin.document;
   wd.open();
   wd.write(ePen);
   wd.close();
}

// Writes the selected language into the cookie
// The cookie is set to be alive for one day!
function writecookie(variable, value) {
   days = 1;
   var expdate = new Date(); 
   expdate.setTime(expdate.getTime() + days*24*60*60*1000);
   document.cookie = variable + "=" + escape(value) + "; path=\;";
}

function setupclock(now,day) {
   today = (new Date(now)).getTime();
   the_day = (new Date(day)).getTime();
   time = (the_day - today);
   document.forms["info"].timeleft2.value=time;
}

function repeat() {
   countdown("info");
   setTimeout("repeat()",1000);
}

function foobar() {
   writecookie('selection', document.select_criteria.selection.value);
   document.select_criteria.submit();
}

function loadImages() {
if (document.getElementById) {  // DOM3 = IE5, NS6
document.getElementById('hidepage').style.visibility = 'hidden';
}
else {
if (document.layers) {  // Netscape 4
document.hidepage.visibility = 'hidden';
}
else {  // IE 4
document.all.hidepage.style.visibility = 'hidden';
      }
   }
}
