/* created by Kutscha Systems */

function popup(w,h,image,imagetext) {
  site  = '<html><head><title>Gro&szlig;ansicht</title>';
  site += '<link rel="stylesheet" href="../../stylesheets/popup.css" type="text/css" media="all"></head>';
  site += '<body><table cellspacing="0" cellpadding="0" class="fond"><tr><td valign="middle"><a href="javascript:window.close();"><img src="'+image+'" border="0"></a></td></tr></table>';
  
  if(imagetext != '') {
    site += '<div class="fondtext">'+imagetext+'</div>';
  }

  site += '</body></html>';
    x = screen.availWidth/2-w/2;
    y = screen.availHeight/2-h/2;
    var popupWindow = window.open(
        '','','width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y);
    popupWindow.document.write(site);
}

function popup_anfahrt(w,h,image,imagetext) {
  site  = '<html><head><title>Gro&szlig;ansicht</title>';
  site += '<link rel="stylesheet" href="../../stylesheets/popup_anfahrt.css" type="text/css" media="all"></head>';
  site += '<body><table cellspacing="0" cellpadding="0" class="fond"><tr><td valign="middle"><a href="javascript:window.close();"><img src="'+image+'" border="0"></a></td></tr></table>';

  if(imagetext != '') {
    site += '<div class="fondtext">'+imagetext+'</div>';
  }

  site += '</body></html>';
    x = screen.availWidth/2-w/2;
    y = screen.availHeight/2-h/2;
    var popupWindow = window.open(
        '','','width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y);
    popupWindow.document.write(site);
}

function swapMenuStyle(framesource, itemid, newClass) {
  try {
    if(itemid != 'cat_6')
        framesource.getElementById(itemid).className = newClass;
  } catch (e) {
    // herre
  }
}

function checkFields() {
  try {
    value01 = document.getElementById("contact_email");

    if(value01.value=="") {
      document.getElementById("contact_email_label").style.fontWeight='bold';
      return false;
    } else
      return true;
  } catch (e) {
      // herre
  }
}

function rotatePic() {
  var BildTDTagID = "rdmpic";
  var BildOrdner = "images/randompics/";
  var BildName = "random_";
  var BildFormat = ".gif";
  var AnzahlBilder = 59;
  var StartCounter = 1;

  RandBild = Math.round(Math.random()*AnzahlBilder);
  if( AnzahlBilder == RandBild ) RandBild = 0;
  rb = BildOrdner + BildName + (RandBild + StartCounter) + BildFormat;

  if (document.images) {
     document.images[BildTDTagID].src=rb;
  }
}
