function start_img_complex() { loading_bar = new Image(); loading_bar.src = "pics/laden.jpg"; rounds = 0; var all_links = document.getElementsByTagName('a'); if(navigator.appName.indexOf("Explorer")!="-1") { window.document.getElementById("prev").innerHTML = ''; window.document.getElementById("next").innerHTML = ''; } for (var i=0; i"-1") { get_pos = get_pos+5; var get_nr = this.getAttribute('href').substr(get_pos, 15); if(get_nr.indexOf("&")>"-1") { get_nr = get_nr.substr(0,get_nr.indexOf("&")); } var xmlhttp = null; // Mozilla if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } // IE else if (window.ActiveXObject) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET", 'scripts/load_foto.php?id='+get_nr, true); xmlhttp.onreadystatechange = function() { if(xmlhttp.readyState == 4 && xmlhttp.status == 200) { pfad_bilder = "content/fotografie/bilder/"; xmltitel = xmlhttp.responseText.split("%-%")[1]; xmlfilename = xmlhttp.responseText.split("%-%")[0]; window.document.getElementById("titel_big").innerHTML = xmltitel; window.document.getElementById("titel_big2").innerHTML = xmltitel; img_ini(pfad_bilder+xmlfilename); preload_img(xmlfilename); } } xmlhttp.send(null); } return false; } } if (rel_link.getAttribute('href') && (relAttribute.toLowerCase().match('direct'))){ rel_link.onclick = function () { var img_src = this.innerHTML.split('"')[1]; img_ini(img_src); return false; } } } } function prev_img() { curr_pic = sc.src.split("/")[sc.src.split("/").length-1]; window.document.getElementById("titel_big").style.visibility = "hidden"; var xmlhttp = null; // Mozilla if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } // IE else if (window.ActiveXObject) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET", 'scripts/chg_foto.php?direction=prev&id='+curr_pic, true); xmlhttp.onreadystatechange = function() { if(xmlhttp.readyState == 4 && xmlhttp.status == 200) { pfad_bilder = "content/fotografie/bilder/"; xmltitel = xmlhttp.responseText.split("%-%")[1]; xmlfilename = xmlhttp.responseText.split("%-%")[0]; window.document.getElementById("titel_big").innerHTML = xmltitel; window.document.getElementById("titel_big2").innerHTML = xmltitel; img_ini(pfad_bilder+xmlfilename),300000; preload_img(xmlfilename); } } xmlhttp.send(null); } function preload_img(curr_pic) { var xmlhttp = null; // Mozilla if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } // IE else if (window.ActiveXObject) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET", 'scripts/chg_foto.php?direction=preview&id='+curr_pic, true); xmlhttp.onreadystatechange = function() { if(xmlhttp.readyState == 4 && xmlhttp.status == 200) { pfad_bilder = "content/fotografie/bilder/"; preload_1 = new Image(); preload_2 = new Image(); preload_1.src = pfad_bilder+xmlhttp.responseText.split("%-%")[0]; preload_2.src = pfad_bilder+xmlhttp.responseText.split("%-%")[1]; } } xmlhttp.send(null); } function next_img() { curr_pic = sc.src.split("/")[sc.src.split("/").length-1]; window.document.getElementById("titel_big").style.visibility = "hidden"; var xmlhttp = null; // Mozilla if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } // IE else if (window.ActiveXObject) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET", 'scripts/chg_foto.php?direction=next&id='+curr_pic, true); xmlhttp.onreadystatechange = function() { if(xmlhttp.readyState == 4 && xmlhttp.status == 200) { pfad_bilder = "content/fotografie/bilder/"; xmltitel = xmlhttp.responseText.split("%-%")[1]; xmlfilename = xmlhttp.responseText.split("%-%")[0]; window.document.getElementById("titel_big").innerHTML = xmltitel; window.document.getElementById("titel_big2").innerHTML = xmltitel; img_ini(pfad_bilder+xmlfilename); preload_img(xmlfilename); } } xmlhttp.send(null); } function img_ini(imgsrc) { pfad_img = imgsrc; //f = new File(imgsrc); window.document.getElementById("sc").style.visibility = "visible"; window.document.getElementById("prev").style.visibility = "visible"; window.document.getElementById("next").style.visibility = "visible"; window.document.getElementById("overlap").style.visibility = "visible"; window.document.getElementById("bg_dark").style.visibility = "visible"; b = 0; s = 50; /*Geschwindigkeit*/ showimg = new Image(); showimg2 = new Image(); showimg2.src = imgsrc; if(!showimg2.complete&&rounds<3) { showimg.src = "pics/laden.jpg"; img_loaded = 0; window.document.getElementById("sc").style.visibility = "hidden"; window.document.getElementById("img_div").style.visibility = "hidden"; window.document.getElementById("img_div").style.overflow = "hidden"; window.document.getElementById("load_screen").style.visibility = "visible"; } else { window.document.getElementById("load_screen").style.visibility = "hidden"; window.document.getElementById("img_div").style.visibility = "visible"; showimg.src = imgsrc; img_loaded = 1; } window.document.getElementById("sc").src = showimg.src; showimg_vsize = showimg.width; showimg_hsize = showimg.height; window.document.getElementById("sc").width = showimg.width; window.document.getElementById("sc").height = showimg.height; if(showimg_vsize > (screen.width - 100)) { pre_vsize = showimg_vsize; pre_hsize = showimg_hsize; window.document.getElementById("sc").width = parseInt(screen.width)-100; showimg_vsize = window.document.getElementById("sc").width; window.document.getElementById("sc").height = (showimg_vsize/pre_vsize)*pre_hsize; showimg_hsize = window.document.getElementById("sc").height; } if(showimg_hsize > (screen.height - 250)) { pre_vsize = showimg_vsize; pre_hsize = showimg_hsize; window.document.getElementById("sc").height = parseInt(screen.height)-250; showimg_hsize = window.document.getElementById("sc").height; window.document.getElementById("sc").width = (showimg_hsize/pre_hsize)*pre_vsize; showimg_vsize = window.document.getElementById("sc").width; } z = parseInt(showimg_hsize)+16; /*Höhe der Box*/ z1 = parseInt(showimg_vsize)+14; /*Breite der Box*/ start_pos = screen.width/2; div_top = ((screen.height-showimg_hsize-200)/2+20); window.document.getElementById("img_div").style.left = start_pos + "px"; window.document.getElementById("img_div").style.width = 1 + "px"; window.document.getElementById("img_div").style.height = 1 + "px"; window.document.getElementById("img_div").style.top = div_top + "px"; window.document.getElementById("bg_dark").style.visibility = "visible"; //window.document.getElementById("img_div").style.visibility = "visible"; b = 0; img_open_h(); } function img_open_h() { window.document.getElementById("img_div").style.height = b + "px"; b = b + (z/s); if(b