function decode(text1, text2, text3)
{
document.write('<a class="grau" href="' + 'mailto:' + text1 + '@' + text2 + '.' + text3 + '">' + text1 + '@' + text2 + '.' + text3 + '</a>');
}

function search_mod()
{
var m = document.forms.searchform.search_herst.value;
location.href='index.php?path=content/gebrauchtwagen.php&' + m;
}

function search_mod_pro()
{
var m = document.forms.searchform.search_herst.value;
location.href='?path=content/gw-profisuche.php&' + m;
}
function pop_uwex()
{
f=window.open('http://kp2.my-motion.de/formular.php?user=30053&zeilen=15' ,'Gebrauchtwagen','dependent=yes,scrollbars=yes,resizable=yes, width=650, height=770');
f.window.focus();
}
function mess_herst()
{
   alert("Bitte wählen Sie zuerst einen Hersteller aus!");
   document.searchform.search_herst.focus();
}

function pop_karte(l)
{
f=window.open('../allgemein/g-karte.php?l='+l ,'Kartenansicht','status=no, toolbar=no, scollbars=no, resizable=yes, directores=no, menubar=no, width=650, height=450');
f.window.focus();
}
function pop()
{
f=window.open('' ,'grossbild','status=no, toolbar=no, scollbars=no, resizable=yes, directores=no, menubar=no, width=600, height=450');
f.window.focus();
}
function suchdiv_off()
{
document.getElementById('such_div').style.display = 'none';
}

function pop_img()
{
f=window.open('content/popup_img.php','grossbild','status=no, toolbar=no, scollbars=no, resizable=yes, directores=no, menubar=no, width=650, height=620');
f.window.focus();
}


function mail_on(x, y)
{
f=window.open('content/ask.php?id=' +x+'&wd=' +y ,'grossbild','status=no, toolbar=no, scollbars=no, resizable=yes, directores=no, menubar=no, width=670, height=550');
f.window.focus();
}

function chk_Form()
{
 if(document.form2.name.value == "")
  {
   alert("Bitte geben Sie Ihren Namen ein!");
   document.form2.name.focus();
   return false;
  }

 if(document.form2.telefon.value == "")
  {
   alert("Keine Telefonnummer angegeben!");
   document.form2.telefon.focus();
   return false;
  }

 if(document.form2.email.value == "")
  {
   alert("Keine Emailadresse angegeben!");
   document.form2.email.focus();
   return false;
  }

}

