<!--

//alert('javascripts.js');

///// JS-Variable für Pullouts ($JQUERY kann in client.inc gesetzt werden)
var JQUERY = false;


///// Bilder bei Mouseover zeigen
function showPicDiv(i, image_height, clientX, clientY) {

  var winHeight = document.body.clientHeight;   
  //var winHeight = window.innerHeight;         // nur Mozilla

  //alert('>>> '+clientY);

  var plus = 0;
  if((winHeight - clientY) < image_height -10){
    plus = image_height;
  }

  document.getElementById('pic_'+i).style.display = 'inline';
  document.getElementById('pic_'+i).style.top  = clientY -(-10) -(plus);
  document.getElementById('pic_'+i).style.left = clientX -(-10);

}

///// Bilder bei Mouseover verbergen
function hidePicDiv(i) {
  document.getElementById('pic_'+i).style.display='none';
}

///// mailto per JS
function js_mailTo(adress) {
  location.href = 'mailto:'+adress;
}


///// MouseOver
function high(elem,color) {
  elem.bgColor = color;
}
function low(elem,color)  {
  elem.bgColor = color;
}


// Für Input im Menu
var select_allowed = false;


////////////// Picview
function picview_alttext(file,alttext) {
//alert(file);
//alert(alttext);
//alert(variables);
var picwin = window.open('../php/picview_alttext.php?'+variables+'&file='+file+'&alttext='+alttext,'picview','width=100,height=100,scrollbars=0,resizable=1,status=1');
picwin.focus();
}


function picview(file) {
//alert(file);
//alert(variables);
//var picwin = window.open('../php/picview.php?file=' +file,'picview','width=100,height=100');
var picwin = window.open('../php/picview.php?'+variables+'&file=' +file,'picview','width=100,height=100,scrollbars=0,resizable=1,status=1');
picwin.focus();
}

// TEST ****
function videoview(file) {
//alert(file);
//alert(variables);
var videowin = window.open('../php/videoview.php?'+variables+'&file=' +file,'videowin','width=320,height=290,scrollbars=0,resizable=1,status=1');
videowin.focus();
}

////////////// Picview für alle Bilder des Eintrags
function picview_all(database_dir,data_table,i) {
var picwin = window.open('../php/picview_all.php?database_dir=' + database_dir + '&data_table=' +data_table+ '&i_wahl=' +i,'picview','width=100,height=100,scrollbars=1,resizable=0,status=1');
picwin.focus();
}

////////////// Picview SCROLL
function picview_scroll(file) {
//alert();
//var picwin = window.open('../php/picview_scroll.php?file=' +file,'picview','width=100,height=100,scrollbars=1,resizable=1,status=1');

var picwin = window.open('../php/picview.php?file=' +file,'picview','width=100,height=100,scrollbars=1,resizable=1,status=1');
picwin.focus();
}

////////////// Picview mit Text - Version 1
function picview_text(file,data_table,i_wahl) {
//alert(variables);
var picwin = window.open('../php/picview_text.php?data_table='+data_table+'&i_wahl='+i_wahl+'&file=' +file,'picview','width=100,height=100');
picwin.focus();
}


////////////// Picview mit Text - Version 2
function picview_text2(database_dir,data_table,line_id_wahl) {
var picwin = window.open('../php/picview_text2.php?database_dir=' + database_dir + '&data_table=' +data_table+ '&line_id_wahl=' +line_id_wahl,'picview','width=100,height=100,scrollbars=1,resizable=0,status=1');
picwin.focus();
}

////////////// MouseOver im Menu
function over(elem) {
if(elem.className != "on") {elem.className = "over"}
}

//////////////
function out(elem) {
if(elem.className != "on") {elem.className = "out"}
}


/////////////////////
function w_open(URL, name, features) {
var fensterneu = window.open(URL, name, features);
fensterneu.focus();
}


/////////////////////
function load(URL) {
if(navigator.userAgent.indexOf ( 'MSIE' ) == -1) {window.location=(URL);}
else{window.location=(URL);}
}


/////////////////////
function load_in_frame(FrameName,URL) {
top.frames[FrameName].document.location=URL;
return;
}

//////////////
function load_in_frame2(FrameName,URL) {
parent.frames[FrameName].location=URL;
return;
}


/////////////////////
function check_adress() {
bad = new Boolean;
bad = false;

if (adress_input.vorname.value == '') { bad = true; }
if (adress_input.nachname.value == '') { bad = true; }
if (adress_input.ort.value == '') { bad = true; }
if (adress_input.plz.value == '') { bad = true; }
if (adress_input.strasse.value == '') { bad = true; }
if (adress_input.email.value == '') { bad = true; }


if (bad == true) {
alert('Bitte füllen Sie alle mit einen Stern gekennzeichnet Felder aus!');
} else {
adress_input.submit();
}
}



//////////////
function load_menu(FrameName,URL) {
parent.frames[FrameName].location=URL;
return;
}


//////////////////////////////////////////////////////////////////////////////////

// Fehlermeldung in body.inc unterdrücken wenn Pullout nicht geladen
// - var pullout_included wird für alle Seiten in javascripts.js gesetzt
// - wird durch Laden des Pullouts in pullout_frame.js auf true gesetzt
var pullout_included;

/* */
// für Ausblenden der Pullouts im BODY - NICHT ausblenden wenn Cursor über SUBDIV
var dont_hide_pullout;

// für Ausblenden der Pullouts durch Klick auf BODY im Menu
var mouse_over_menu;

var clicked1;
var clicked2;
var clicked3;

var clicked_pull1;
var clicked_pull2;




/////////////////////////////////////////////
// MENU-BODY MouseUp

function MENU_body_mouseup() {
//alert();

// Einblenden Pullout
//if(!mouse_over_menu) {  // überflüssig ???
//  if(top.frames['main'].clicked_pull1) top.frames['main'].clicked_pull1.style.visibility = 'hidden';
//  if(top.frames['main'].clicked_pull2) top.frames['main'].clicked_pull2.style.visibility = 'hidden';
//}
//alert(JQUERY);
  if(!JQUERY) {
    if(top.frames['main'].clicked_pull1) top.frames['main'].clicked_pull1.style.visibility = 'hidden';
    if(top.frames['main'].clicked_pull2) top.frames['main'].clicked_pull2.style.visibility = 'hidden';
  }
  if( JQUERY) {
    if(top.frames['main'].clicked_pull1) top.frames['main'].clicked_pull1.style.display = 'none';
    if(top.frames['main'].clicked_pull2) top.frames['main'].clicked_pull2.style.display = 'none';
  }
 
// Element zurücksetzen - wenn Ebene 1
if(clicked1) {
if(clicked1.id != 'active_1') {
  clicked1.style.background = inactive_menu1_color;
  clicked1.style.color      = inactive_menu1_fontcolor;
  clicked1='';
}

if(clicked1.id == 'active_1') {
  clicked1.style.background = active_menu1_color;
  clicked1.style.color      = active_menu1_fontcolor;
}
}

// Element zurücksetzen - wenn Ebene 2
if(clicked2) {
if(clicked2.id != 'active_2') {
  clicked2.style.background = inactive_menu2_color;
  clicked2.style.color      = inactive_menu2_fontcolor;
  clicked2='';
}

if(clicked2.id == 'active_2') {
  clicked2.style.background = active_menu2_color;
  clicked2.style.color      = active_menu2_fontcolor;
}
}

// evtl. aktives Pullout zurücksetzen
if(pull_clicked2 = top.frames['main'].clicked2) {
  pull_clicked2.style.background = inactive_menu2_color;
  pull_clicked2.style.color      = inactive_menu2_fontcolor;
  pull_clicked2 = '';
}
}



/////////////////////////////////////////////
// PAGE-BODY MouseDown

function PAGE_body_mousedown() {
//alert();

if(!dont_hide_pullout) {

  // Einblenden Pullout
//  if(top.frames['main'].clicked_pull1) top.frames['main'].clicked_pull1.style.visibility = 'hidden';
//  if(top.frames['main'].clicked_pull2) top.frames['main'].clicked_pull2.style.visibility = 'hidden';

  if(!JQUERY) {
    if(top.frames['main'].clicked_pull1) top.frames['main'].clicked_pull1.style.visibility = 'hidden';
    if(top.frames['main'].clicked_pull2) top.frames['main'].clicked_pull2.style.visibility = 'hidden';
  }
  if( JQUERY) {
    if(top.frames['main'].clicked_pull1) top.frames['main'].clicked_pull1.style.display = 'none';
    if(top.frames['main'].clicked_pull2) top.frames['main'].clicked_pull2.style.display = 'none';
  }


  // Demarkieren des geklickten Menupunktes im Menu-Frame - wenn Ebene 1
  if(menu_clicked1 = top.frames['menu'].clicked1) {
    if(menu_clicked1.id != 'active_1') {
      menu_clicked1.style.background = inactive_menu1_color;
      menu_clicked1.style.color      = inactive_menu1_fontcolor;
      top.frames['menu'].clicked1='';
    }

    if(menu_clicked1.id == 'active_1') {
      menu_clicked1.style.background = active_menu1_color;
      menu_clicked1.style.color      = active_menu1_fontcolor;
    }
  }

  // Demarkieren des geklickten Menupunktes im Menu-Frame - wenn Ebene 2
  if(menu_clicked2 = top.frames['menu'].clicked2) {
    if(menu_clicked2.id != 'active_2') {
      menu_clicked2.style.background = inactive_menu2_color;
      menu_clicked2.style.color      = inactive_menu2_fontcolor;
      top.frames['menu'].clicked2='';
    }

    if(menu_clicked2.id == 'active_2') {
      menu_clicked2.style.background = active_menu2_color;
      menu_clicked2.style.color      = active_menu2_fontcolor;
    }
  }


  // Demarkieren des evtl. geklickten Menupunktes im Pullout im Main-Frame
  if(clicked2) {
    clicked2.style.background = inactive_menu1_color;
    clicked2.style.color      = inactive_menu1_fontcolor;
  }

  // geklicktes Element zurücksetzen - sonst kein MouseOver
  clicked2 = '';
}

}




//-->

