//** Featured Content Slider script- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
//** Last updated: Feb 28th- 07- Added ability to customize pagination links' text
////Ajax related settings
var csbustcachevar=0 //bust potential caching of external pages after initial Ajax request? (1=yes, 0=no)
var csloadstatustext="
Requesting content..." //HTML to indicate Ajax page is being fetched
var csexternalfiles=[] //External .css or .js files to load to style the external content(s), if any. Separate multiple files with comma ie: ["cat.css", dog.js"]
////NO NEED TO EDIT BELOW////////////////////////
var enablepersist=true
var slidernodes=new Object() //Object array to store references to each content slider's DIV containers (
)
var csloadedobjects="" //Variable to store file names of .js/.css files already loaded (if Ajax is used)
function ContentSlider(sliderid, autorun, customPaginateText, customNextText){
var slider=document.getElementById(sliderid)
if (typeof customPaginateText!="undefined" && customPaginateText!="") //Custom array of pagination links text defined?
slider.paginateText=customPaginateText
if (typeof customNextText!="undefined" && customNextText!="") //Custom HTML for "Next" link defined?
slider.nextText=customNextText
slidernodes[sliderid]=[] //Array to store references to this content slider's DIV containers (
)
ContentSlider.loadobjects(csexternalfiles) //Load external .js and .css files, if any
var alldivs=slider.getElementsByTagName("div")
for (var i=0; i
0) //if autorun parameter (int_miliseconds) is defined, fire auto run sequence
window[sliderid+"timer"]=setTimeout(function(){ContentSlider.autoturnpage(sliderid, autorun)}, autorun)
}
ContentSlider.buildpagination=function(sliderid){
var slider=document.getElementById(sliderid)
var paginatediv=document.getElementById("paginate-"+sliderid) //reference corresponding pagination DIV for slider
var pcontent=""
for (var i=0; i'+(slider.paginateText? slider.paginateText[i] : i+1)+' '
pcontent+=''+(slider.nextText || "Siguiente")+''
paginatediv.innerHTML=pcontent
paginatediv.onclick=function(){ //cancel auto run sequence (if defined) when user clicks on pagination DIV
if (typeof window[sliderid+"timer"]!="undefined")
clearTimeout(window[sliderid+"timer"])
}
}
ContentSlider.turnpage=function(sliderid, thepage){
var paginatelinks=document.getElementById("paginate-"+sliderid).getElementsByTagName("a") //gather pagination links
for (var i=0; i