function bildzurueck(bildname) {
  bild = document.getElementsByName(document.title)[0];
  if (bild && bild.name == bildname) {
  	bild.src= 'images/'+bild.name+'.gif';
    document.title='';
  }
}
function bildwechsel(bildobjekt,bildpfad) {
  if (document.title != bildobjekt.name) {
	  bildobjekt.src = bildpfad;
  }
}
function bildauswahl(bildobjekt,bildpfad) {
  bild = document.getElementsByName(document.title)[0];
  if (bild) {
  	bild.src= 'images/'+bild.name+'.gif';
  }
  bildobjekt.src = bildpfad;
  document.title = bildobjekt.name;
}

// Functionen zum Oeffnen von Hilfsfenstern
function get_x(val) {
  if(window.screenX) {
    return window.screenX+val+220;
  } else {
    return window.screenLeft+val;
  }
}
function get_y(val) {
  if(window.screenY) {
    return window.screenY+val+205;
  } else {
    return window.screenTop+val;
  }
}

function show_notes_window() {
	F1=window.open('hs_template.cgi?template=note','note','height=300,width=488,left='+get_x(150)+',top='+get_x(80)+',status=no,toolbar=no,scrollbars=no,menubar=no,location=no,resizable=no');
	F1.focus();
}
function show_note(id,res_flg) {
	F1=window.open('hs_note.cgi?id='+id+'&res='+res_flg,'note','height=300,width=488,left='+get_x(150)+',top='+get_y(80)+',status=no,toolbar=no,scrollbars=no,menubar=no,location=no,resizable=yes');
	F1.focus();
}
function show_help(page,weite,hoehe) {
	F1=window.open(page, 'help', "width="+weite+",height="+hoehe+",left=0,top=0, status=no,toolbar=no,scrollbars=yes,menubar=no,location=no,resizable=yes");
	F1.focus();
}
function print_notes_window(id) {
	F2=window.open('hs_drucken_note.cgi?template=drucken_note&id='+id,'notes');
	F2.focus();
}
function show_selection() {
	F1=window.open('hs_template.cgi?template=saveselection','saveselection','height=300,width=488,left='+get_x(150)+',top='+get_x(80)+',status=no,toolbar=no,scrollbars=no,menubar=no,location=no,resizable=no');
	F1.focus();
}
function show_window(site) {
	F1=window.open('/f.cgi?f='+site,'Window','height=600,width=565,left='+get_x(150)+',top='+get_x(80)+',status=no,toolbar=no,scrollbars=yes,menubar=no,location=no,resizable=no');
	F1.focus();
}
function setinaktiv () {
	document.form2.firmenname.value='';
  document.form2.ort.value='';
}
function setaktiv () {
	document.form2.produkte.value='';
}
function set_schnellsuche () {
	document.form2.firmenname.style.backgroundColor='#EEEEEE';
  document.form2.ort.style.backgroundColor='#EEEEEE';
	document.form2.plz.style.backgroundColor='#EEEEEE';
	document.form2.bundesland.style.backgroundColor='#EEEEEE';
	document.form2.branche.style.backgroundColor='#EEEEEE';
	document.form2.branche08.style.backgroundColor='#EEEEEE';
	document.form2.umsatz_zahl.style.backgroundColor='#EEEEEE';
	document.form2.beschaeftigte_zahl.style.backgroundColor='#EEEEEE';
	document.form2.produkte.style.backgroundColor='#EEEEEE';
  document.form1.volltext.style.backgroundColor='';
}
function set_detailsuche () {
	document.form2.firmenname.style.backgroundColor='';
  document.form2.ort.style.backgroundColor='';
	document.form2.plz.style.backgroundColor='';
	document.form2.bundesland.style.backgroundColor='';
	document.form2.branche.style.backgroundColor='';
	document.form2.branche08.style.backgroundColor='';
	document.form2.umsatz_zahl.style.backgroundColor='';
	document.form2.beschaeftigte_zahl.style.backgroundColor='';
	document.form2.produkte.style.backgroundColor='';
	document.form1.volltext.style.backgroundColor='#EEEEEE';
}




