function addCss(cssCode) { var styleElement = document.createElement("style"); styleElement.type = "text/css"; if (styleElement.styleSheet) { styleElement.styleSheet.cssText = cssCode; } else { styleElement.appendChild(document.createTextNode(cssCode)); } document.getElementsByTagName("head")[0].appendChild(styleElement); } function addCssDocument(ref) { var styleElement = document.createElement("link"); styleElement.rel = "stylesheet"; styleElement.href=ref; styleElement.type='text/css'; document.getElementsByTagName("head")[0].appendChild(styleElement); } function SlideImage(s,l,a,t,tl,inf) { this.src = s; this.url = l; this.alt = a; this.text = t; this.title = tl; this.info = inf; } function Slider(ti,images,w,h,root,urlprev,urltoogle,urlnext,urltoogle2,css) { this.t = ti; this.n = images.length; this.myInterval = null; this.images = images; this.counter = -1; this.height = h; this.width = w; this.run = false; this.urlprev = urlprev; this.urltoogle = urltoogle; this.urlnext = urlnext; this.urltoogle2 = urltoogle2; this.css = css; this.toogleStatus = false; this.ImgIn = function ImgIn() { Slider.toogleStatus = true; } this.ImgOut = function ImgOut() { Slider.toogleStatus = false; window.status=''; } this.setImage = function setImage(i) { var container = document.getElementById('sliderimage'); var data = this.images[i]; var aslider = document.getElementById('aslider'); if (aslider != null) { container.removeChild(aslider); } var link = document.createElement('a'); link.href = data.url; link.id = 'aslider'; var img = document.createElement('img'); img.src=data.src; img.alt=data.alt; img.width = this.width; img.height = this.height; img.setAttribute("class", "simg"); var ie = ((navigator.appVersion.indexOf("MSIE")!=-1)||(navigator.appVersion.indexOf("KHTML")!=-1)); if (ie) { img.onmouseover = this.ImgIn; img.onmouseout = this.ImgOut; } link.appendChild(img); container.appendChild(link); this.markButton(i); this.setText(i); if (ie) { if (Slider.toogleStatus) { window.status=data.url; } } } this.setText = function setText(i) { var data = this.images[i]; var p = document.getElementById('sliderimagetitle'); p.innerHTML = data.title; p = document.getElementById('sliderimageinfo'); p.innerHTML = data.info; } this.mySlide = function mySlide() { this.inc(); this.setImage(this.counter); } this.markButton = function markButton(n) { for (i=0;i