var text_for_content = new Array(); text_for_content.push(''); text_for_content.push(''); text_for_content.push(''); text_for_content.push(''); var ifs_width = 800; var ifs_timer; var ifs_step = 15; var ifs_timeout = 2; var ifs_direction = "l"; var ifs_slide = document.getElementById("slider"); var ifs_main_text; var ifs_curr_slide = 0; if(ifs_slide && text_for_content.length > 0){ ifs_slide.style.height = ifs_slide.parentNode.offsetHeight + "px"; var ifs_slide_button = ifs_slide.getElementsByTagName("A"); if(ifs_slide_button.length === 1){ ifs_slide_button[0].style.height = ifs_slide.parentNode.offsetHeight + "px"; ifs_slide_button[0].onclick = function(){ ifsSliderScroll(); return false; } ifs_slide_button = ifs_slide_button[0]; } var ifs_content_divs = ifs_slide.getElementsByTagName("DIV"); if(ifs_content_divs.length > 0){ for(j=0; j 0){ for(i=0; i 0){ for(k=0; k 0){ for(l=0; l 0 && !isNaN(parseInt(ifs_curr_slide)) && parseInt(ifs_curr_slide) <= text_for_content.length - 1 ){ ifs_main_text.innerHTML = text_for_content[parseInt(ifs_curr_slide)]; checkButtons(); } } function checkButtons(){ if(text_for_content.length > 0 && get_buttons.length > 0){ for(k=0; k < get_buttons.length; k++){ if(get_buttons[k].className == "back" && ifs_curr_slide === 0){ get_buttons[k].style.visibility = "hidden"; /* var butt_shadow = get_buttons[k].getElementsByTagName("DIV"); if(butt_shadow.length > 0){ for(l=0; l < butt_shadow.length; l++){ if(butt_shadow[l].className == "button_shadow" && ifs_curr_slide === 0){ butt_shadow[l].style.display = "none"; get_buttons[k].style.cursor = "default"; }else{ if(ifs_curr_slide > 0){ get_buttons[k].style.cursor = "pointer"; butt_shadow[l].style.display = "block"; } } } }*/ }else if(get_buttons[k].className == "back" && ifs_curr_slide > 0){ get_buttons[k].style.visibility = "visible"; } if(get_buttons[k].className == "next" && ifs_curr_slide === text_for_content.length - 1){ get_buttons[k].style.visibility = "hidden"; /* var butt_shadow = get_buttons[k].getElementsByTagName("DIV"); if(butt_shadow.length > 0){ for(l=0; l < butt_shadow.length; l++){ if(butt_shadow[l].className == "button_shadow" && ifs_curr_slide === text_for_content.length - 1){ get_buttons[k].style.cursor = "default"; butt_shadow[l].style.display = "none"; }else{ if(ifs_curr_slide < text_for_content.length - 1){ get_buttons[k].style.cursor = "pointer"; butt_shadow[l].style.display = "block"; } } } } */ }else if(get_buttons[k].className == "next" && ifs_curr_slide < text_for_content.length - 1){ get_buttons[k].style.visibility = "visible"; } } } } function changeSlide(obj){ if(obj && text_for_content.length > 0){ var action = 0; if(obj.className && obj.className.toLowerCase() == "next" && parseInt(ifs_curr_slide) < (text_for_content.length - 1)){ ifs_curr_slide += 1; action += 1; } if(obj.className && obj.className.toLowerCase() == "back" && parseInt(ifs_curr_slide) > 0){ ifs_curr_slide -= 1; action += 1; } if(action > 0){ var new_content = document.createElement("DIV"); if(new_content){ new_content.className = "content_inside"; new_content.style.width = ifs_width + "px"; new_content.style.height = ifs_slide.offsetHeight + "px"; new_content.innerHTML = text_for_content[parseInt(ifs_curr_slide)]; ifs_main_text.parentNode.replaceChild(new_content, ifs_main_text); ifs_main_text = new_content; } } } } function navigationButtons(obj, act){ if(obj && act){ var get_shadow = obj.getElementsByTagName("DIV"); if(get_shadow.length > 0){ for(i=0; i