var img_url_array = new Array(); // js-Array zur Aufnahme der Dateinamen der Bilder welche per Preload behandelt werden sollen img_url_array.push("../leistung/logo");img_url_array.push("../leistung/stift3-o.jpg");img_url_array.push("../leistung/1start.jpg");img_url_array.push("../leistung/stift3-u.jpg");img_url_array.push("../leistung/W06-m.jpg");img_url_array.push("../leistung/stuhl-m.jpg");img_url_array.push("../leistung/W06-o.jpg");img_url_array.push("../leistung/stuhl-o.jpg");img_url_array.push("../leistung/akte3-m.jpg");img_url_array.push("../leistung/stuhl-u.jpg");img_url_array.push("../leistung/akte3-o.jpg");img_url_array.push("../leistung/stuhl2-m.jpg");img_url_array.push("../leistung/akte3-u.jpg");img_url_array.push("../leistung/stuhl2-o.jpg");img_url_array.push("../leistung/anfahrt-f.gif");img_url_array.push("../leistung/stuhl2-u.jpg");img_url_array.push("../leistung/anfahrt1.gif");img_url_array.push("../leistung/tel1-m.jpg");img_url_array.push("../leistung/anfahrt2.gif");img_url_array.push("../leistung/tel1-o.jpg");img_url_array.push("../leistung/bueg2-m.jpg");img_url_array.push("../leistung/tel1-u.jpg");img_url_array.push("../leistung/bueg2-o.jpg");img_url_array.push("../leistung/topf-m.jpg");img_url_array.push("../leistung/bueg2-u.jpg");img_url_array.push("../leistung/topf-o.jpg");img_url_array.push("../leistung/cont1-m.jpg");img_url_array.push("../leistung/topf-u.jpg");img_url_array.push("../leistung/cont1-o.jpg");img_url_array.push("../leistung/waage_m.jpg");img_url_array.push("../leistung/cont1-u.jpg");img_url_array.push("../leistung/get_adobe_reader.gif");img_url_array.push("../leistung/waage_m.jpg.LCK");img_url_array.push("../leistung/keks-m.jpg");img_url_array.push("../leistung/schild1-o.jpg");img_url_array.push("../leistung/keks-m.jpg.LCK");img_url_array.push("../leistung/waage_o.jpg");img_url_array.push("../leistung/keks-o.jpg");img_url_array.push("../leistung/schild1-u.jpg");img_url_array.push("../leistung/keks-o.jpg.LCK");img_url_array.push("../leistung/waage_o.jpg.LCK");img_url_array.push("../leistung/keks-u.jpg");img_url_array.push("../leistung/spacer.gif");img_url_array.push("../leistung/keks-u.jpg.LCK");img_url_array.push("../leistung/waage_u.jpg");img_url_array.push("../leistung/logo-g.gif");img_url_array.push("../leistung/waage_u.jpg.LCK");img_url_array.push("../leistung/mac2-m.jpg");img_url_array.push("../leistung/mac2-o.jpg");img_url_array.push("../leistung/mac2-u.jpg");img_url_array.push("../leistung/mac4-m.jpg");img_url_array.push("../leistung/mac4-o.jpg");img_url_array.push("../leistung/mac4-u.jpg");img_url_array.push("../leistung/mac5-m.jpg");img_url_array.push("../leistung/mac5-o.jpg");img_url_array.push("../leistung/mac5-u.jpg");img_url_array.push("../leistung/map1-m.jpg");img_url_array.push("../leistung/map1-o.jpg");img_url_array.push("../leistung/map1-u.jpg");img_url_array.push("../leistung/maus1-m.jpg");img_url_array.push("../leistung/maus1-o.jpg");img_url_array.push("../leistung/maus1-u.jpg");img_url_array.push("../leistung/netz3-m.jpg");img_url_array.push("../leistung/netz3-o.jpg");img_url_array.push("../leistung/netz3-u.jpg");img_url_array.push("../leistung/orang1-m.jpg");img_url_array.push("../leistung/orang1-o.jpg");img_url_array.push("../leistung/orang1-u.jpg");img_url_array.push("../leistung/orang2-m.jpg");img_url_array.push("../leistung/orang2-o.jpg");img_url_array.push("../leistung/orang2-u.jpg");img_url_array.push("../leistung/orang3-m.jpg");img_url_array.push("../leistung/orang3-o.jpg");img_url_array.push("../leistung/orang3-u.jpg");img_url_array.push("../leistung/ordner1-m.jpg");img_url_array.push("../leistung/ordner1-o.jpg");img_url_array.push("../leistung/ordner1-u.jpg");img_url_array.push("../leistung/pdficon.gif");img_url_array.push("../leistung/pinsel1-m.jpg");img_url_array.push("../leistung/pinsel1-o.jpg");img_url_array.push("../leistung/pinsel1-u.jpg");img_url_array.push("../leistung/schal1-m.jpg");img_url_array.push("../leistung/schal1-o.jpg");img_url_array.push("../leistung/schal1-u.jpg");img_url_array.push("../leistung/schild1-m.jpg");img_url_array.push("../leistung/stem1-m.jpg");img_url_array.push("../leistung/stem1-o.jpg");img_url_array.push("../leistung/stem1-u.jpg");img_url_array.push("../leistung/stem3-m.jpg");img_url_array.push("../leistung/stem3-o.jpg");img_url_array.push("../leistung/stem3-u.jpg");img_url_array.push("../leistung/stift2-m.jpg");img_url_array.push("../leistung/stift2-o.jpg");img_url_array.push("../leistung/stift2-u.jpg");img_url_array.push("../leistung/stift3-m.jpg");// --- needs dhtml.js for: NS, OP, DHTML, DOM var img_chg_amount = img_url_array.length; // Anzahl der Image-Dateien var imgarray; //receive the image-objects var img_status_array; //receive the state of each image-object var img_error_state_array; //receive the error-state of each image-object var handler_array; //receive the onload-handler var error_handler_array; //receive the error-handler var load_status_signal; //if "loading.." is shown 1 else 0 var called_image; //receive the called image var globaleTimerVariable = null; //reset the timeout var remember_text = -1; //receive the shown text var remember_fash = -1; //receive whether the flash was switched or not //-- START: init - wird am ende der Datei aufgerufen und initialisiert die js-Variablen function init_img_change(){ imgarray = new Array(img_chg_amount); //img_chg_amount wird oben initialisiert img_status_array = new Array(img_chg_amount); //receive the load-state of each image-object img_error_state_array = new Array(img_chg_amount); //receive the error-state of each image-object handler_array = new Array(img_chg_amount); //receive the onload-handler error_handler_array = new Array(img_chg_amount); //receive the error-handler load_status_signal = 0; // flag, indicates wether "loading..." is visible called_image = -1; //receive the called image //default content for the img_status_array and img_error_state_array for (var counter = 0; counter < img_chg_amount; counter++){ img_status_array[counter] = false; img_error_state_array[counter] = false; } //onload-handler for (var counter = 0; counter < img_chg_amount; counter++){ eval("handler_array[" + counter + "] = function(){img_status_array[" + counter + "] = true;}"); } //onerror-handler for (var counter = 0; counter < img_chg_amount; counter++){ eval("error_handler_array[" + counter + "] = function(){img_status_array[" + counter + "] = true;img_error_state_array[" + counter + "] = true;}"); } //make image-objects for (var counter = 0; counter < img_chg_amount; counter++){ imgarray[counter] = new Image(); eval("imgarray[" + counter + "].onload = handler_array[" + counter +"];"); //onloadhandler eval("imgarray[" + counter + "].onerror = error_handler_array[" + counter +"];"); //error-handler } } //-- END: init //-- begin functions //is called, if the called image is not already loaded, tests each x-milliseconds the state function change_on_state(num){ var state = test_state(num); if(num == called_image){ //only if the user is still on the same item if(state == true){ img_change(num); } else window.setTimeout('change_on_state('+num+')',50); } } // determine if the image with the number num is already loaded function test_state(num){ var state = false; if(OP && DOM && DHTML) state = imgarray[num].complete; // just for Opera else state = img_status_array[num]; // all other browsers return state; } // function to check wheater the image has an onloaderror function check_error_state(pic){ if(OP && DOM && DHTML){ return false; } else { return img_error_state_array[pic]; } } // change the images // called on mouseover function img_change(pic){ if (loadStatus==null || !loadStatus.isObject()) loadStatus = new eMBLayer("loadstatus"); if(remember_fash == -1){ switchFlash(false); // hide default flash animation remember_fash = 1; } (new eMBLayer("previewimg")).show(); (new eMBLayer("ienoflashjpg")).hide();//noflash-handling (new eMBLayer("pluginmessage")).hide(); called_image = pic; var state = test_state(pic); if (check_error_state(pic) == true){ // shows error-message if onload-error is occured loadStatus.hide(); (new eMBLayer("errorstatus")).show(); } else { (new eMBLayer("errorstatus")).hide(); if (state == true){ //change the image source if(NS) { var layerObject = getLayerById("previewimg"); if (!layerObject) return true; layerObject.document.images['chg_img'].src = imgarray[pic].src; } else document.chg_img.src = imgarray[pic].src; // hide "loading..." if visible if(load_status_signal == 1){ loadStatus.hide(); load_status_signal = 0; } } else {// image not already loaded loadStatus.show(); //show load_status_signal load_status_signal = 1; img_change_direct(pic); // now load directly next image //change_on_state(pic); // change image source } } } // function to change the image direct // has no direct impact on timer controlled loading var loadStatus=null; function img_change_direct(pic){ if (loadStatus==null || !loadStatus.isObject()) loadStatus = new eMBLayer("loadstatus"); eval("directHandler = function(){img_status_array[" + pic + "] = true;imgarray[" + pic + "].src = img_url_array[" + pic + "];if(load_status_signal == 1){loadStatus.hide();load_status_signal = 0;}}"); var imageHolder = new Image(); imageHolder.onload = directHandler; imageHolder.src = img_url_array[pic]; if(OP && DOM && DHTML) imageHolder.complete = loadStatus.hide(); //change the image source if(NS) { var layerObject = getLayerById("previewimg"); if (!layerObject) return true; layerObject.document.images['chg_img'].src = img_url_array[pic]; } else document.chg_img.src = img_url_array[pic]; } // function to change the text // called on mouseover var allShowroomTextsLayers = null; function text_change(nr){ if ( allShowroomTextsLayers == null || !allShowroomTextsLayers[img_chg_amount-1].isObject()){ allShowroomTextsLayers = new Array(img_chg_amount); for(var i=0; i