function changeFile() {
  site = document.myform.myformelect.value;
  document.myform.method = "post";
  document.myform.action = "../bilderbox/" + site + ".html";
  document.myform.target = "_self";
  //alert('submit: ' + document.myform.action);  
  document.myform.submit();
}

/* */

document.getElementById? ref="document.getElementById":ref="document.all";
var IE = document.all? true:false;
if(!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = mousePos;
var tempY = 0;
var nsY = 0;

if(!IE) document.writeln('das script funzt leider nur im explorer, sorry ;-) ... weiter/zur&uuml;ck >> <a href="http://www.uwee.de">www.uwee.de</a>"')

function mousePos(e){
  if(!IE){ nsY = e.pageY; }
}

function showBigFoto(foto, text){
  var description = unescape(text);
  var layerbody = '<table cellspacing="0" cellpadding="0" border="0">'+
  ' <tr><td colspan="2"><a href="javascript:hideBigFoto();"><img src="' + foto + '" alt="" border="0" width="360"></a></td></tr>'+
  ' <tr>'+
  ' <td id=bigtextbg><img src="images/pixel.gif" width="2" height="1" border="0">'+
  ' <span class="small">' + description + '</span></td>'+
  ' <td id=bigtextbg width="2"><img src="images/pixel.gif" width="2" height="1" border="0"></td>'+
  ' </tr>'+
  ' <tr><td>&nbsp;</td></tr>'+
  '</table>';
  if(document.getElementById){
    document.getElementById("big_foto").innerHTML = layerbody;
  } else if(document.all){
    document.all.big_foto.innerHTML = layerbody;
  } else if(document.layers){
    document.big_foto.document.open();
    document.big_foto.document.write("<span>" + layerbody + "</span>");
    document.big_foto.document.close();
  }
  eval(ref + '("big_foto")' + '.style.visibility = "visible"');
}

function bigFotoPos(){
  if(IE){ tempY = event.clientY + document.body.scrollTop; }
  else{ tempY = nsY }
  tempY -= 35;
  eval(ref + '("big_foto")' + '.style.top = tempY');
  return true;
}

function hideBigFoto(){
  eval(ref + '("big_foto")' + '.style.visibility = "hidden"');
}


/* **** */

function writeTHUMB(imagename, imagedescr, imagealt) {
  var src_thumb = thumbfolder + imagename;
  var src_image = imagefolder + imagename;
  
  var html = '';
  html+= '<a ';
  html+= 'href="javascript:showBigFoto(\'' + src_image + ' \', \'' + imagedescr + '\')" ';
  html+= 'onclick=bigFotoPos()><img alt="' + imagealt + '" border=0 height=113 width=150 ';
  html+= 'src="' + src_thumb + '"></a>';
  return html;
}



// zeilenumbruch f&uuml;r schleifen, ...
// countBreak(cb++, 4, '</tr><tr>';
// 030521
function countBreak(counter, divider, returnBreakValue) {
    if ((counter/divider) == Math.ceil(counter/divider)) return returnBreakValue;
    return '';
}

function writeBilderHTML(textarea, table) {
  cb=1;
  t='';
  if(textarea==1) t+= '<textarea cols=80 rows=18>';
  if(table==1) t+= '<table border=0 cellpadding=3 cellspacing=5>';
  if(table==1) t+= '<tr>';
  if(textarea==1) t+= '\n';
  for (i=0; i<bilder.length; i++) {
    if(bilder[i].imagedescr != '') { // nur bilder mit description anzeigen
      if(table==1) t+= '<td>';
      t+= eval('writeTHUMB(\'' + bilder[i].imagename + '\', \'' + bilder[i].imagedescr + '\', \'' + bilder[i].nr + '\')');
      if(table==1) t+= '</td>';
      if(table==1) t+= countBreak(cb++, 4, '</tr><tr>');
      if(textarea==1) t+= '\n';
    }
  }
  if(table==1) t+= '</table>';
  if(textarea==1) t+= '</textarea>';
  document.writeln(t);
}

// writeBilderHTML(0,1); // 1 f&uuml;r textarea, 1 f&uuml;r table


