
function banss_init(){
        var hasReqestedVersion = DetectFlashVer(9, 0, 0);
		document.getElementById("navi_google").style.display = 'none';
        if(hasReqestedVersion==true){
			$file = "swf/banss_topnavi_en_v2.swf";
			document.getElementById("div_flashnavi").innerHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="980" height="100" id="banss_topnavi" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="'+$file+'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="wmode" value="transparent" /><embed wmode="transparent" src="'+$file+'" quality="high" bgcolor="#ffffff" width="980" height="100" name="banss_topnavi" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
		} else {
			prototype_divaustauschen("includes/inc_navi_noflash.php", "div_flashnavi");
		}
}

function banss_ladeseite($name){
        prototype_divaustauschen("sites/"+$name, "div_content");
                pageTracker._trackPageview($name);
        flashnavivar($name);
}

function banss_ladeseite_post($name, $vars){
        prototype_divaustauschen_post("sites/"+$name, $vars, "div_content");
                pageTracker._trackPageview($name);
        flashnavivar($name);
}

function flashnavivar($str){
        switch($str){
                case "produkte_logistik.php":
                case "produkte_rind.php":
                case "produkte_rind_betaeubung.php":
                case "produkte_rind_einrichtungen.php":
                case "produkte_rind_enthaeutung.php":
                case "produkte_robotik.php":
                case "produkte_robotik_grobzerlegung.php":
                case "produkte_robotik_schlachtlinie.php":
                case "produkte_robotik_werkzeuge.php":
                case "produkte_schaf.php":
                case "produkte_schwein.php":
                case "produkte_schwein_betaeubung.php":
                case "produkte_schwein_bruehung.php":
                case "produkte_schwein_einrichtungen.php":
                case "produkte_schwein_enthaarung.php":
                case "produkte_schwein_nachbearbeitung.php":
                case "produkte_schwein_schlachtung.php":
                        $str = "produkte_schwein.php";
                        break;
        }


        if(window.banss_topnavi) window.document["banss_topnavi"].SetVariable("doit", $str);
        if(document.banss_topnavi) document.banss_topnavi.SetVariable("doit", $str);
}

function sendserviceform(){
        $firma = document.form_service.firma.value;
        $anrede = document.form_service.anrede.value;
        $vorname = document.form_service.vorname.value;
        $nachname = document.form_service.nachname.value;
        $email = document.form_service.email.value;
        $telefon = document.form_service.telefon.value;
        if(document.form_service.rueckruf.checked==true){$rueckruf=1;} else{$rueckruf=0;}
        $nachricht = document.form_service.nachricht.value;
        $vars = "send=1&firma="+$firma+"&anrede="+$anrede+"&vorname="+$vorname+"&nachname="+$nachname+"&email="+$email+"&telefon="+$telefon+"&rueckruf="+$rueckruf+"&nachricht="+$nachricht+"";
        banss_ladeseite_post("gewaehrleistung.php", $vars);
        return false;
}

function sendkontaktform(){
        $firma = document.form_kontakt.firma.value;
        $anrede = document.form_kontakt.anrede.value;
        $vorname = document.form_kontakt.vorname.value;
        $nachname = document.form_kontakt.nachname.value;
        $email = document.form_kontakt.email.value;
        $telefon = document.form_kontakt.telefon.value;
        if(document.form_kontakt.rueckruf.checked==true){$rueckruf=1;} else{$rueckruf=0;}
        $nachricht = document.form_kontakt.nachricht.value;
        $vars = "send=1&firma="+$firma+"&anrede="+$anrede+"&vorname="+$vorname+"&nachname="+$nachname+"&email="+$email+"&telefon="+$telefon+"&rueckruf="+$rueckruf+"&nachricht="+$nachricht+"";
        banss_ladeseite_post("kontakt.php", $vars);
        return false;
}

function sendspezialkontaktform(){
		$firma = document.form_kontakt.firma.value;
        $anrede = document.form_kontakt.anrede.value;
        $vorname = document.form_kontakt.vorname.value;
        $nachname = document.form_kontakt.nachname.value;
        $email = document.form_kontakt.email.value;
        $to = document.form_kontakt.to.value;
        $telefon = document.form_kontakt.telefon.value;
        if(document.form_kontakt.rueckruf.checked==true){$rueckruf=1;} else{$rueckruf=0;}
        $nachricht = document.form_kontakt.nachricht.value;
        $vars = "send=1&to="+$to+"&firma="+$firma+"&anrede="+$anrede+"&vorname="+$vorname+"&nachname="+$nachname+"&email="+$email+"&telefon="+$telefon+"&rueckruf="+$rueckruf+"&nachricht="+$nachricht+"";
        banss_ladeseite_post("kontaktformular.php", $vars);
        return false;
}

function sendloginform(){
        $benutzername = document.form_login.benutzername.value;
        $passwort = document.form_login.passwort.value;
        $vars = "login=1&benutzername="+$benutzername+"&passwort="+$passwort;
        banss_ladeseite_post("downloads.php", $vars);
        return false;
}



wmtt = null;
objektblase = null;
wmtt_plusx = 0;
wmtt_plusy = 0;

document.onmousemove = updateWMTT;

function updateWMTT(e) {
        x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
        y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
        if (wmtt != null) {
                x+=wmtt_plusx;
                y+=wmtt_plusy;
                wmtt.style.left = x + "px";
                wmtt.style.top = y + "px";
        }
		if(objektblase != null) {
				x-= 175;
				y-=3;
                objektblase.style.left = x + "px";
                objektblase.style.top = y + "px";
        }
}

function banss_zoom($zoom, $width, $height, $left){
  if($left==1){
          wmtt_plusx = 0 - (40+Math.round($width)+16);
  } else {
          wmtt_plusx = 40;
  }
  wmtt_plusy = 0 - Math.round($height/2);

  wmtt_plusy-= 16;

  wmtt = document.getElementById("div_zoom");
  wmtt.innerHTML = '<img src="'+$zoom+'" width="'+$width+'" height="'+$height+'" />';
  wmtt.style.display = "block";
}

function banss_hidezoom(){
        wmtt.style.display = "none";
		wmtt = null;
}


var sprache_opentimer        = 0;

function banss_sprache_ein(){
        if(sprache_opentimer){
                window.clearTimeout(sprache_opentimer);
                sprache_opentimer = null;
        } else {
                if(document.getElementById("div_sprache_auswahl").style.display=="none"){
                        Effect.BlindDown('div_sprache_auswahl');
                }
        }
}
function banss_sprache_killaus(){
        if(sprache_opentimer){
                window.clearTimeout(sprache_opentimer);
                sprache_opentimer = null;
        }
}
function banss_sprache_aus(){
        sprache_opentimer = window.setTimeout(banss_sprache_aus_go, 500);
}
function banss_sprache_aus_go(){
        window.clearTimeout(sprache_opentimer);
        sprache_opentimer = null;
        Effect.BlindUp('div_sprache_auswahl');
}

function showinfoblase($text){
	objektblase = document.getElementById("infoblase");
  	objektblase.style.display="block";
  	document.getElementById("infoblase_text").innerHTML=$text;
}

function hideinfoblase(){
  objektblase.style.display="none";
  objektblase = null;
}
