function stopOrStart() { if (onoff) { stop(); } else { play(); } } function toggleLoop() { if (loop) { loop = 0; } else { loop = 1; } } function changeElementText(id, newText) { element = document.getElementById(id); element.innerHTML = newText; } function stop() { changeElementText("stopOrStartText", "play"); onoff = 0; status = "The slide show is stopped, Click [play] to resume."; clearTimeout(timer); } function play() { //changeElementText("stopOrStartText", "stop"); onoff = 1; status = "Slide show is running..."; go_to_next_photo(); } function preload_complete() { } function reset_timer() { clearTimeout(timer); if (onoff) { timeout_value =5000; timer = setTimeout('go_to_next_photo()', timeout_value); } } function wait_for_current_photo() { /* Show the current photo */ if (!show_current_photo()) { /* * The current photo isn't loaded yet. Set a short timer just to wait * until the current photo is loaded. */ status = "Picture is loading...(" + current_location + " of " + photo_count + "). " + "Please Wait..." ; clearTimeout(timer); timer = setTimeout('wait_for_current_photo()', 500); return 0; } else { status=""; //status = "Slide show is running..." ; preload_next_photo(); reset_timer(); } } function go_to_next_photo() { /* Go to the next location */ current_location = next_location; /* Show the current photo */ if (!show_current_photo()) { wait_for_current_photo(); return 0; } preload_next_photo(); reset_timer(); } function preload_next_photo() { /* Calculate the new next location */ next_location = (parseInt(current_location) + parseInt(direction)); if (next_location > photo_count) { next_location = 1; if (!loop) { stop(); } } if (next_location == 0) { next_location = photo_count; if (!loop) { stop(); } } /* Preload the next photo */ preload_photo(next_location); } function show_current_photo() { /* * If the current photo is not completely loaded don't display it. */ if (!images[current_location] || !images[current_location].complete) { preload_photo(current_location); return 0; } img_link = document.getElementById("image_link"); img_link.href = "http://www.housefull.in/"+photo_link[current_location]; /* transistion effects */ if (browserCanBlend){ var do_transition; if (current_transition == (transition_count)) { do_transition = Math.floor(Math.random() * transition_count); } else { do_transition = current_transition; } document.images.slide.style.filter=transitions[do_transition]; document.images.slide.filters[0].Apply(); } document.slide.src = images[current_location].src; if (browserCanBlend) { document.images.slide.filters[0].Play(); } return 1; } function preload_photo(index) { /* Load the next picture */ if (pics_loaded < photo_count) { /* not all the pics are loaded. Is the next one loaded? */ if (!images[index]) { images[index] = new Image; images[index].onLoad = preload_complete(); images[index].src = photo_urls[index]; pics_loaded++; } } } function setCaption(text) { } var agt=navigator.userAgent.toLowerCase(); var is_major = parseInt(navigator.appVersion); var is_minor = parseFloat(navigator.appVersion); var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)); var is_ie3 = (is_ie && (is_major < 4)); var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) ); var is_ie4up = (is_ie && (is_major >= 4)); var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) ); var is_ie5_5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1)); var is_ie5up = (is_ie && !is_ie3 && !is_ie4); var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5); var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) ); var is_ie6up = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5); var timer; var current_location = 1;var next_location = 1; var pics_loaded = 0;var onoff = 0;var direction = 1;var timeout_value;var images = new Array;var photo_urls = new Array;var photo_link = new Array;var transitionNames = new Array;var transitions = new Array;var current_transition = 15;var loop = 1; photo_urls[1] = "http://www.housefull.in/wallpapers/Deepika-Padukone/sm_Deepika_Padukone-1.jpg"; photo_urls[2] = "http://www.housefull.in/wallpapers/Deepika-Padukone/sm_Deepika_Padukone-2.jpg"; photo_urls[3] = "http://www.housefull.in/wallpapers/Deepika-Padukone/sm_Deepika_Padukone-3.jpg"; photo_urls[4] = "http://www.housefull.in/wallpapers/Deepika-Padukone/sm_Deepika_Padukone-4.jpg"; photo_urls[5] = "http://www.housefull.in/wallpapers/Deepika-Padukone/sm_Deepika_Padukone-5.jpg"; photo_urls[6] = "http://www.housefull.in/wallpapers/Deepika-Padukone/sm_Deepika_Padukone-6.jpg"; photo_urls[7] = "http://www.housefull.in/wallpapers/Deepika-Padukone/sm_Deepika_Padukone-7.jpg"; photo_urls[8] = "http://www.housefull.in/wallpapers/Deepika-Padukone/sm_Deepika_Padukone-8.jpg"; photo_urls[9] = "http://www.housefull.in/wallpapers/Deepika-Padukone/sm_Deepika_Padukone-9.jpg"; photo_urls[10] = "http://www.housefull.in/wallpapers/Deepika-Padukone/sm_Deepika_Padukone-10.jpg"; photo_link[1] = "wallpapers/Deepika-Padukone/Deepika-Padukone-01.html"; photo_link[2] = "wallpapers/Deepika-Padukone/Deepika-Padukone-02.html"; photo_link[3] = "wallpapers/Deepika-Padukone/Deepika-Padukone-03.html"; photo_link[4] = "wallpapers/Deepika-Padukone/Deepika-Padukone-04.html"; photo_link[5] = "wallpapers/Deepika-Padukone/Deepika-Padukone-05.html"; photo_link[6] = "wallpapers/Deepika-Padukone/Deepika-Padukone-06.html"; photo_link[7] = "wallpapers/Deepika-Padukone/Deepika-Padukone-07.html"; photo_link[8] = "wallpapers/Deepika-Padukone/Deepika-Padukone-08.html"; photo_link[9] = "wallpapers/Deepika-Padukone/Deepika-Padukone-09.html"; photo_link[10] = "wallpapers/Deepika-Padukone/Deepika-Padukone-10.html"; transitions[0] = "progid:DXImageTransform.Microsoft.Fade(duration=1)"; transitions[1] = "progid:DXImageTransform.Microsoft.Blinds(Duration=1,bands=20)"; transitions[2] = "progid:DXImageTransform.Microsoft.Checkerboard(Duration=1,squaresX=20,squaresY=20)"; transitions[3] = "progid:DXImageTransform.Microsoft.Strips(Duration=1,motion=rightdown)"; transitions[4] = "progid:DXImageTransform.Microsoft.Barn(Duration=1,orientation=vertical)"; transitions[5] = "progid:DXImageTransform.Microsoft.GradientWipe(duration=1)"; transitions[6] = "progid:DXImageTransform.Microsoft.Iris(Duration=1,motion=out)"; transitions[7] = "progid:DXImageTransform.Microsoft.Wheel(Duration=1,spokes=12)"; transitions[8] = "progid:DXImageTransform.Microsoft.Pixelate(maxSquare=10,duration=1)"; transitions[9] = "progid:DXImageTransform.Microsoft.RadialWipe(Duration=1,wipeStyle=clock)"; transitions[10] = "progid:DXImageTransform.Microsoft.RandomBars(Duration=1,orientation=vertical)"; transitions[11] = "progid:DXImageTransform.Microsoft.Slide(Duration=1,slideStyle=push)"; transitions[12] = "progid:DXImageTransform.Microsoft.RandomDissolve(Duration=1,orientation=vertical)"; transitions[13] = "progid:DXImageTransform.Microsoft.Spiral(Duration=1,gridSizeX=40,gridSizeY=40)"; transitions[14] = "progid:DXImageTransform.Microsoft.Stretch(Duration=1,stretchStyle=push)"; transitions[15] = "special case"; var transition_count = 15; var photo_count = 10; firstPhotoURL = photo_urls[1]; document.write(""); var browserCanBlend = (is_ie5_5up); preload_photo(1); play();