// JavaScript Document
debugtext = "";
function setimg()
{
bx = 1280;
by = 486;
wx = $(window).width();
wy = $("#stage1").css("height");
wy = wy.replace("px","");
//jetzt = vormals.replace(/Hinz/g, "Kunz, geb. Hinz");
fx = wx/bx;
fy = wy/by;
if (fy < fx) // immmer der größte Faktor ist ausschlaggebend
{
y = by *fx // neue Bildhöhe
mg_korrektur = Math.round ((y-wy)/2)*-1;
$("#testimg1").css('margin-top',mg_korrektur);
$("#testimg1").css('margin-left',"0px");
$("#testimg1").css('width',wx); //100%
$("#testimg1").css('height',y);
$("#testimg2").css('margin-top',mg_korrektur);
$("#testimg2").css('margin-left',"0px");
$("#testimg2").css('width',wx);
$("#testimg2").css('height',y);
}
else
{
x = bx *fy // neue Bildbreite
mg_korrektur = Math.round ((x-wx)/2)*-1;
$("#testimg1").css('margin-top',"0px");
$("#testimg1").css('margin-left',mg_korrektur);
$("#testimg1").css('width',x);
$("#testimg1").css('height',wy);
$("#testimg2").css('margin-top',"0px");
$("#testimg2").css('margin-left',mg_korrektur);
$("#testimg2").css('width',x);
$("#testimg2").css('height',wy);
}
//$("#ornamentimg").css('width',wx);
//$("#ornamentimg").css('height',215); // fixer wert -> verzerrt
//$("#textbalken_bottom").css('height',($(document).height()-500));
$("#leftcontenttable").css('height',($(document).height()-341));
}
img = Array(); flag = Array();
imagelist = Array();
//***** Main
serie = 0;
imagelist[serie] = Array(); flag[serie] = Array(); img[serie] = Array();
Warning: opendir(/usr/www/users/hotele/pixs/teaser/main) [function.opendir]: failed to open dir: No such file or directory in /usr/www/users/hotele/scripts/media_control.php on line 60
//***** hotel
serie = 1;
imagelist[serie] = Array(); flag[serie] = Array(); img[serie] = Array();
Warning: opendir(/usr/www/users/hotele/pixs/teaser/hotel) [function.opendir]: failed to open dir: No such file or directory in /usr/www/users/hotele/scripts/media_control.php on line 70
//***** zimmer
serie = 2;
imagelist[serie] = Array(); flag[serie] = Array(); img[serie] = Array();
Warning: opendir(/usr/www/users/hotele/pixs/teaser/zimmer) [function.opendir]: failed to open dir: No such file or directory in /usr/www/users/hotele/scripts/media_control.php on line 80
//***** preise
serie = 3;
imagelist[serie] = Array(); flag[serie] = Array(); img[serie] = Array();
Warning: opendir(/usr/www/users/hotele/pixs/teaser/preise) [function.opendir]: failed to open dir: No such file or directory in /usr/www/users/hotele/scripts/media_control.php on line 90
//***** restaurant
serie = 4;
imagelist[serie] = Array(); flag[serie] = Array(); img[serie] = Array();
Warning: opendir(/usr/www/users/hotele/pixs/teaser/restaurant) [function.opendir]: failed to open dir: No such file or directory in /usr/www/users/hotele/scripts/media_control.php on line 100
//***** Speisekarte
serie = 5;
imagelist[serie] = Array(); flag[serie] = Array(); img[serie] = Array();
Warning: opendir(/usr/www/users/hotele/pixs/teaser/speisekarte) [function.opendir]: failed to open dir: No such file or directory in /usr/www/users/hotele/scripts/media_control.php on line 110
//***** gästehaus
serie = 6;
imagelist[serie] = Array(); flag[serie] = Array(); img[serie] = Array();
Warning: opendir(/usr/www/users/hotele/pixs/teaser/gaestehaus) [function.opendir]: failed to open dir: No such file or directory in /usr/www/users/hotele/scripts/media_control.php on line 120
//***** freiezit
serie = 7;
imagelist[serie] = Array(); flag[serie] = Array(); img[serie] = Array();
Warning: opendir(/usr/www/users/hotele/pixs/teaser/freizeit) [function.opendir]: failed to open dir: No such file or directory in /usr/www/users/hotele/scripts/media_control.php on line 130
//***** kontakt
serie = 8;
imagelist[serie] = Array(); flag[serie] = Array(); img[serie] = Array();
Warning: opendir(/usr/www/users/hotele/pixs/teaser/kontakt) [function.opendir]: failed to open dir: No such file or directory in /usr/www/users/hotele/scripts/media_control.php on line 140
//***** gaestebuch
serie = 9;
imagelist[serie] = Array(); flag[serie] = Array(); img[serie] = Array();
Warning: opendir(/usr/www/users/hotele/pixs/teaser/gaestebuch) [function.opendir]: failed to open dir: No such file or directory in /usr/www/users/hotele/scripts/media_control.php on line 150
//***** impressum
serie = 10;
imagelist[serie] = Array(); flag[serie] = Array(); img[serie] = Array();
Warning: opendir(/usr/www/users/hotele/pixs/teaser/impressum) [function.opendir]: failed to open dir: No such file or directory in /usr/www/users/hotele/scripts/media_control.php on line 160
function preload(group,nr)
{
//alert(group+ " "+nr);
img[group][nr] = new Image();
img[group][nr].src = imagelist[group][nr];
next = nr + 1;
if (next < imagelist[group].length)
{
img[group][nr].onload = function() {flag[group][nr] = true; preload(group,next);}
}
else
{
img[group][nr].onload = function() {flag[group][nr] = true; }
nextgroup = group+1;
if (nextgroup < imagelist.length)
{preload(nextgroup,0);}
}
if ((nr == 0) & (group == 0)) // Das erste Bild ist geladen
{
//soundManager.createSound({ id: 'esterer_song', url: '/sounds/esterer_song.mp3', autoLoad: true,autoPlay: false, onfinish: function() {soundManager.play('esterer_song');},
/*
soundManager.createSound({ id: 'esterer_song', url: '/sounds/esterer_song.mp3', autoLoad: true,autoPlay: false,
onload: function() {
//alert('The sound '+this.sID+' loaded!');},
volume: 100
});
*/
soundManager.createSound({ id: 'plaetschern', url: '/sounds/Boat-MaRc-8003_hifi.mp3', autoLoad: true,autoPlay: true, onfinish: function() {soundManager.play('plaetschern');},volume:70});
soundManager.createSound({ id: 'birds', url: '/sounds/birds.mp3', autoLoad: true,autoPlay: true, onfinish: function() {soundManager.play('birds');},volume:100});
//soundManager.createSound({ id: 'song', url: '/sounds/000008574218_Pre.mp3', autoLoad: true,autoPlay: true, onfinish: function() {soundManager.play('song');},volume:80});
soundManager.createSound({ id: 'song', url: '/sounds/iStock_000008574218_downsmp.mp3', autoLoad: true,autoPlay: true, onfinish: function() {soundManager.play('song');},volume:80});
}
}
actual_img = -1;
actual_group = 0;
actual_layer = 1;
function changer()
{
new_img = actual_img +1;
if (new_img >= img[actual_group].length) {new_img = 0;}
if (flag[actual_group][new_img] == true)
{
if (actual_layer == 1)
{
$("#testimg2").attr("src",img[actual_group][new_img].src);
debugtext = "2 bekommt Src. 1 fadet jetzt aus";
$("#stage1").animate({opacity: 0},2000,"linear",function()
{
actual_layer = 2;
actual_img = new_img;
debugtext = "2 bekommt Src. 1 fadet jetzt aus - FERTIG";
window.setTimeout("changer()", 3000);
});
}
else
{
$("#testimg1").attr("src",img[actual_group][new_img].src);
debugtext = "1 bekommt Src. 1 fadet jetzt ein";
$("#stage1").animate({opacity: 1},2000,"linear",function()
{
actual_layer = 1;
actual_img = new_img;
debugtext = "1 bekommt Src. 1 fadet jetzt ein - FERTIG";
window.setTimeout("changer()", 3000);
});
}
}
else
{
window.setTimeout("changer()", 500);
}
}
function deb_out()
{
$("#debugger").html(""+flag[1][0]+" "+flag[1][1]+" "+flag[1][2]+" "+flag[1][3]+" - Act: "+actual_group+" - "+actual_img+" - Ly: "+actual_layer+"| Z-Index: "+$("#stage1").css("z-index")+" - "+$("#stage2").css("z-index")+" | Window: "+wx+" - "+wy+"
"+debugtext );
//$("#debugger").html("WTC: "+wtc.join(",")+"
INSTR: "+m_instr.join(",")+"
"+debugtext );
window.setTimeout("deb_out()", 100);
}