function init() {
position_bestimmen()
setInterval(position_bestimmen, 3000);

$(".onlyjavascript").css("visibility", "visible")
$("#linker_pfeil").click(function() {

step--;
if(step<=-2) {step=-2;$("#linker_pfeil").animate({opacity: 0}, "fast")}
$("#rechter_pfeil").animate({opacity: 1}, "fast")
str = step_str[step+2];
$("#tag").animate({opacity: 0}, "fast", function() {
$("#tag").animate({opacity: 1}, "fast");
$("#tag").html(str);
})

$("#produkt #slider_container").animate({marginLeft: (step+2)*-770}, "slow");

})

$("#rechter_pfeil").click(function() {

step++;
if(step>=0) {step=0;$("#rechter_pfeil").animate({opacity: 0}, "slow")}
$("#linker_pfeil").animate({opacity: 1}, "fast")
str = step_str[step+2];
$("#tag").animate({opacity: 0}, "fast", function() {
$("#tag").animate({opacity: 1}, "fast");
$("#tag").html(str);
})

$("#produkt #slider_container").animate({marginLeft: (step+2)*-770}, "slow");

})
$("#logo").click(function() {window.location="."})
$("#logo").css("cursor", "pointer")
}

function position_bestimmen() {

try {
var weite = window.innerWidth;
} catch(ex) {
var weite = 950;
}
var links = (weite-950)/2;
links+=5;
if(links<=10) {
links=10
}

$("#produktvorstellung .detailview #img_cont").css("margin-left", links + "px")
$("#produktvorstellung .detailview p").css("left", (links+540)+"px")

}

var step = -1;
var step_str = new Array("GESTRIGES ANGEBOT", "AKTUELLES ANGEBOT", "MORGIGES ANGEBOT")

setTimeout(init, 500)
setTimeout(position_bestimmen, 10)
setTimeout(position_bestimmen, 100)

function freeup() {
return confirm(" Ihre Eingaben wurden nicht gesichert. Sicher dass Sie diese Seite verlassen wollen?");
}

var http = null;

