//****************************************************************
// Fenster Name für Sitemap
//****************************************************************
this.name="main_window";

//****************************************************************
// Navigation
//****************************************************************

/*function change_grundlagen(where, onoff)
{
  if (onoff)
    document.getElementById(where).src="../../images/navi/grundlagen_on.gif";
  else
    document.getElementById(where).src="../../images/navi/grundlagen_off.gif";
}

function change_projekte(where, onoff)
{
  if (onoff)
    document.getElementById(where).src="../../images/navi/projekte_on.gif";
  else
    document.getElementById(where).src="../../images/navi/projekte_off.gif";
}

function change_oeffentlichkeitsarbeit(where, onoff)
{
  if (onoff)
    document.getElementById(where).src="../../images/navi/oeffentlichkeitsarbeit_on.gif";
  else
    document.getElementById(where).src="../../images/navi/oeffentlichkeitsarbeit_off.gif";
}

function change_aktuelles(where, onoff)
{
  if (onoff)
    document.getElementById(where).src="../../images/navi/aktuelles_on.gif";
  else
    document.getElementById(where).src="../../images/navi/aktuelles_off.gif";
}*/

function change_kontakt(where, onoff)
{
  if (onoff)
    document.getElementById(where).src="../../images/navi/kontakt_on.gif";
  else
    document.getElementById(where).src="../../images/navi/kontakt_off.gif";
}

function change_sitemap(where, onoff)
{
  if (onoff)
    document.getElementById(where).src="../../images/navi/sitemap_on.gif";
  else
    document.getElementById(where).src="../../images/navi/sitemap_off.gif";
}

function change_impressum(where, onoff)
{
  if (onoff)
    document.getElementById(where).src="../../images/navi/impressum_on.gif";
  else
    document.getElementById(where).src="../../images/navi/impressum_off.gif";
}
/*
function change_grundstuecksangebote(where, onoff)
{
  if (onoff)
    document.getElementById(where).src="../../images/navi/grundstuecksangebote_on.gif";
  else
    document.getElementById(where).src="../../images/navi/grundstuecksangebote_off.gif";
}
*/
function changepic1(where, onoff)
{
  if (onoff)
    document.getElementById(where).src="../../images/navi/grundlagen_on.gif";
  else
    document.getElementById(where).src="../../images/navi/grundlagen_off.gif";
}


//subnavigation
/*
function montre(id) {
 if (document.getElementById) {
  document.getElementById(id).style.display="block";
} else if (document.all) {
  document.all[id].style.display="block";
} else if (document.layers) {
  document.layers[id].display="block";
} } 

function cache(id) {
 if (document.getElementById) {
  document.getElementById(id).style.display="none";
} else if (document.all) {
  document.all[id].style.display="none";
} else if (document.layers) {
  document.layers[id].display="none";
} } 
*/


//****************************************************************
// Formular Input-Change
//****************************************************************
function inputColorChange(feldObject, new_style) 
{ 
feldObject.className=new_style;
}


//****************************************************************
// Popup
//****************************************************************
function popup(source, width, height)
{  
  window.open(source,"","width="+width+",height="+height+",resize=no,scrollbars=no,menubar=no,directories=no"); 
} 

function popup_sitemap(source, width, height)
{  
  window.open(source,"","width="+width+",height="+height+",resize=no,scrollbars=yes,menubar=no,directories=no, left="+screen.width+", top=0"); 
} 

//****************************************************************
// Popup - Dynamisches HTML
//****************************************************************
var popup_var="", num=0; 
function popup_dyn(x,y,titel,bild) 
{ 
popup_var=window.open("", num, "width="+(x+30)+",height=600") 
popup_var.document.write("<html>"); 
popup_var.document.write("<head><link rel='STYLESHEET' type='text/css' href='../../scripts/styles.css'> "); 
popup_var.document.write("<title>Hahn, Reinermann & Partner | "+titel+"</title></head>"); 
popup_var.document.write("<body scroll='auto' style='margin-top:20px; margin-bottom:20px'>"); 
popup_var.document.write("<center><img src="+bild+" width="+x+" height="+y+"><p>"); 
popup_var.document.write("<a href='javascript:window.close()' onfocus='blur()'><strong>Fenster schliessen</strong></a></center>"); 
popup_var.document.write("</body></html>"); 
num++; 
} 
 
//****************************************************************
// FORMULAR-CHECK ( Kontakt )
//****************************************************************

function checkform()

{
   
	 
    if ((document.mailform.email.value.indexOf('@', 0) == -1) || (document.mailform.email.value.indexOf('.') == -1)) 
   {
   alert("Bitte geben Sie eine gültige Email-Adresse ein!");
   document.mailform.email.focus();
   return false; 
   }  
	
	
    if(document.mailform.name.value == "")
   {
    alert("Bitte geben Sie Ihren Nachnamen an!");
    document.mailform.name.focus();
    return false;
   } 	
 

    if ((document.mailform.tel.value=="")) 
   {
   alert("Bitte geben Sie eine Telefonnummer ein!");
   document.mailform.tel.focus();
   return false; 
   }    
	
     else
   {document.mailform.submit();
   return document.mailform.submit()}
}

//****************************************************************
// FORMULAR-CHECK ( Newsletter )
//****************************************************************

function checkform_newsletter()

{     
    if ((document.mailform.email.value.indexOf('@', 0) == -1) || (document.mailform.email.value.indexOf('.') == -1)) 
   {
   alert("Bitte geben Sie eine gültige Email-Adresse ein!");
   document.mailform.email.focus();
   return false; 
   }  

     else
   {document.mailform.submit();
   return document.mailform.submit()}
}


/*
//****************************************************************
// Suche-Check
//****************************************************************
function checkSearch(){
  if(document.frmSearch.term.value == ""){
    alert("Sie müssen einen Suchbegriff eingeben!");
    return false;
  }
  document.frmSearch.submit();
}*/
