console.log('loaded standard');
function switch_citys() {
xrequest("/index.php?get_citys=1","city_content");
document.getElementById('big_city_table').style.display='none';
document.getElementById('big_city_table').innerHTML="";
//document.getElementById('city_content').style.height="200px";
set_auto();
}
function set_auto() {
if (!document.all)
document.getElementById('city_content').getElementsByTagName("div")[0].style.overflow='auto';
}
function filter_select(dropdown) {
url=location.href;
if (url.indexOf("staedte")!=-1) {
if (url.indexOf("seite")!=-1)
url=url.replace(/\/staedte\/(.*)?\/(.*)\/firmen\/(.*)/,"/staedte/$1-"+dropdown.options[dropdown.options.selectedIndex].value+"/$2/firmen.php"); else
url=url.replace(/\/staedte\/(.*)?\/(.*)\/firmen.php/,"/staedte/$1-"+dropdown.options[dropdown.options.selectedIndex].value+"/$2/firmen.php");
} else {
url+="/cat_"+dropdown.options[dropdown.options.selectedIndex].value+".html";
}
location.href=url;
}
function show_categories(from_a) {
//from_a.style.display="none";
td=document.getElementById("city_content");
td.innerHTML="Lade alle Kategorien...";
xrequest("/index.php?get_categories=1","city_content");
}
var wgMWSuggestTemplate = "/suggest/suggest.php?action=opensearch\x26search={searchTerms}\x26namespace={namespaces}";
var wgSearchNamespaces = [0];
var wgDBname = "none";
function validEmail(str) {
var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if (str.indexOf(at)==-1){
return false
}
if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
return false
}
if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
return false
}
if (str.indexOf(at,(lat+1))!=-1){
return false
}
if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
return false
}
if (str.indexOf(dot,(lat+2))==-1){
return false
}
if (str.indexOf(" ")!=-1){
return false
}
return true
}
function checkSearchEntry() {
document.getElementById('search_form').action = '/suche.html';
if ((document.getElementById("search_adress").value == "Suche nach Firma oder Branche" || document.getElementById("search_adress").value == "") &&
(document.getElementById("search_city").value == "PLZ oder Ort" || document.getElementById("search_city").value == "" || document.getElementById("search_city").value == "�berall")) {
alert("Bitte geben Sie einen Suchbegriff oder einen Ort bzw. eine Postleitzahl ein!");
//return false;
document.getElementById('search_form').action = 'javascript:void(0)';
} else document.getElementById('search_form').submit();
}
function replaceSearch() {
if (document.location.href.indexOf("suche.html")!=-1)
document.location.replace(document.location.href.replace(/suche.html/,"suche/seite_1.php"));
}