// JavaScript Document FadeTime=2850;FadeTime2=2000;var MB=new Array(); if(typeof(window.browserVersion) != "function") { browserVersion = function() { var version = 999; // we assume a sane browser if (navigator.appVersion.indexOf("MSIE") != -1) // bah, IE again, lets downgrade version number version = parseFloat(navigator.appVersion.split("MSIE")[1]); return version; } } if(typeof(window.browserName) != "function") { function browserName(name) { var agent = navigator.userAgent.toLowerCase(); if (agent.indexOf(name.toLowerCase())>-1) { return true; } return false; } } function stopBox(id){ window.clearInterval(MB[id]); document.getElementById(id+'Play').style.display='block'; document.getElementById(id+'Pause').style.display='none'; } function startBox(id){ MB[id]=setInterval('moveBoxRight(\''+id+'\')',8000); document.getElementById(id+'Play').style.display='none'; document.getElementById(id+'Pause').style.display='block '; } function createBox (){ Bid=''; i=0; boxID=0; while(document.getElementsByTagName('div')[i]){ if(document.getElementsByTagName('div')[i].className.match('awContentBox')){ var klasse='aw_BoxContentNavActive'; LINKS=''; c=0; box=document.getElementsByTagName('div')[i]; var arrows = box.innerHTML.search(//); var navigation = box.innerHTML.search(//); var play = box.innerHTML.search(//); var slow = box.parentNode.innerHTML.search(//); Bid='ContentBox'+i; box.id=Bid; if (arrows == -1){ box.innerHTML+='
'; } w=box.offsetWidth; h=box.style.height; h=h.replace('px',''); h=parseInt(h); for(b=0;box.getElementsByTagName('div')[b];b++){ if(box.getElementsByTagName('div')[b].className=='awBoxContent'){ box.getElementsByTagName('div')[b].id=Bid+'elm'+c; box.getElementsByTagName('div')[b].style.position='absolute'; box.getElementsByTagName('div')[b].style.left=(c*w)+'px'; box.getElementsByTagName('div')[b].style.width=w+'px'; box.getElementsByTagName('div')[b].style.top='0px'; LINKS+='
'; klasse='aw_BoxContentNavLink'; c++; } } if (navigation == -1){ box.innerHTML+='
'+LINKS+'
'; }else{ box.innerHTML+=''; } if(play == -1) { }else{ if (slow == -1){ MB[i]=setInterval('moveBoxRight(\''+Bid+'\')',FadeTime); }else{ MB[i]=setInterval('moveBoxRight(\''+Bid+'\')',(FadeTime*4)); } box.innerHTML+=''; box.innerHTML+='
'; } boxID++; //alert(c*w); } i++; } } R=null; function resizeBox (){ clearTimeout(R); R=setTimeout('resizeBox2()',20); } function resizeBox2 (){ sortElements=new Array(); i=0; while(document.getElementsByTagName('div')[i]){ if(document.getElementsByTagName('div')[i].className.match('awContentBox')){ c=0; box=document.getElementsByTagName('div')[i]; w=box.offsetWidth; h=box.style.height; h=h.replace('px',''); h=parseInt(h); sortElements[box.id]=new Array; for(b=0;box.getElementsByTagName('div')[b];b++){ if(box.getElementsByTagName('div')[b].className=='awBoxContent'){ sortElements[box.id][box.getElementsByTagName('div')[b].style.left]=box.getElementsByTagName('div')[b].id; //alert(box.getElementsByTagName('div')[b].style.left); c++; } } //alert(c*w); } i++; } c2=c; i=0; while(document.getElementsByTagName('div')[i]){ if(document.getElementsByTagName('div')[i].className.match('awContentBox')){ c=0; box=document.getElementsByTagName('div')[i]; w=box.offsetWidth; h=box.style.height; h=h.replace('px',''); h=parseInt(h); ELM=0; resortElements=new Array; EC=0; while(ELM<(w*c2)){ if(sortElements[box.id][ELM+'px']){ resortElements[EC]=sortElements[box.id][ELM+'px']; EC++; } ELM++; } for(b=0;b1){ BoxElm[id+'speed']=1; } var c=0; box=document.getElementById(id); for(b=0;box.getElementsByTagName('div')[b];b++){ if(box.getElementsByTagName('div')[b].className=='aw_BoxContentNavActive'){ box.getElementsByTagName('div')[b].className='aw_BoxContentNavLink'; } if(box.getElementsByTagName('div')[b].className=='awBoxContent'){ //alert(box.getElementsByTagName('div')[b].id); c++; } } var elmL=c; c=0; box=document.getElementById(id); w=box.offsetWidth; h=box.style.height; h=h.replace('px',''); h=parseInt(h); for(b=0;box.getElementsByTagName('div')[b];b++){ if(box.getElementsByTagName('div')[b].className=='awBoxContent'){ elm=box.getElementsByTagName('div')[b]; elm_w=elm.style.width; elm_w=elm_w.replace('px',''); elm_w=parseInt(elm_w); elm_l=elm.style.left; elm_l=elm_l.replace('px',''); elm_l=parseInt(elm_l); //alert(elm_l); if(elm_l==(0-w)){ elm.style.left=((elmL-1)*w)+'px'; if(document.getElementById(id+'elm'+(c+1)+'Nav')){ navID=c+1; }else{ navID=0; } document.getElementById(id+'elm'+navID+'Nav').className='aw_BoxContentNavActive'; clearInterval(BoxElm[id]); i=0; while(document.getElementsByClassName('contentBoxComment')[i]){ document.getElementsByClassName('contentBoxComment')[i].style.display='block'; i++; } RunElm[id]=false; exit; }else{ elm.style.left=(BoxElm[id+'val'][b]-(w*BoxElm[id+'speed']))+'px'; opL=(BoxElm[id+'val'][b]-(w*BoxElm[id+'speed'])); opL= opL < 0 ? (opL * -1) : opL; elm.style.opacity=1-(opL/elm_w); } elm.style.top='0px'; c++; } } BoxElm[id+'speed']=BoxElm[id+'speed']+BoxElm[id+'speed2']; if(BoxElm[id+'speed']<0.55){ BoxElm[id+'speed2']+=0.002; }else{ BoxElm[id+'speed2']-=0.002; } } function moveBoxLeft(id){ if(RunElm[id]==true){ }else{ i=0; while(document.getElementsByClassName('contentBoxComment')[i]){ document.getElementsByClassName('contentBoxComment')[i].style.display='none'; i++; } elmLeft=new Array; BoxElm[id+'speed']=0.01; BoxElm[id+'speed2']=0.001; elmL=0; c=0; box=document.getElementById(id); for(b=0;box.getElementsByTagName('div')[b];b++){ if(box.getElementsByTagName('div')[b].className=='awBoxContent'){ elm=box.getElementsByTagName('div')[b]; elm_l=elm.style.left; elm_l=elm_l.replace('px',''); elmLeft[b]=parseInt(elm_l); c++; } } elmL=c; BoxElm[id+'val']=elmLeft; runBox=false; RunElm[id]=true; BoxElm[id]=setInterval('moveBoxLeft2(\''+id+'\')',20); } } function moveBoxLeft2(id){ elmL=0; if(BoxElm[id+'speed']>1){ BoxElm[id+'speed']=1; } c=0; box=document.getElementById(id); for(b=0;box.getElementsByTagName('div')[b];b++){ if(box.getElementsByTagName('div')[b].className=='aw_BoxContentNavActive'){ box.getElementsByTagName('div')[b].className='aw_BoxContentNavLink'; } if(box.getElementsByTagName('div')[b].className=='awBoxContent'){ c++; } } elmL=c; c=0; box=document.getElementById(id); w=box.offsetWidth; h=box.style.height; h=h.replace('px',''); h=parseInt(h); for(b=0;box.getElementsByTagName('div')[b];b++){ if(box.getElementsByTagName('div')[b].className=='awBoxContent'){ elm=box.getElementsByTagName('div')[b]; elm_w=elm.style.width; elm_w=elm_w.replace('px',''); elm_w=parseInt(elm_w); elm_l=elm.style.left; elm_l=elm_l.replace('px',''); elm_l=parseInt(elm_l); //alert(elm_l); if(elm_l==0){ if(runBox==true){ clearInterval(BoxElm[id]); document.getElementById(elm.id+'Nav').className='aw_BoxContentNavActive'; i=0; while(document.getElementsByClassName('contentBoxComment')[i]){ document.getElementsByClassName('contentBoxComment')[i].style.display='block'; i++; } RunElm[id]=false; exit; }else{ runBox=true; } } if(BoxElm[id+'val'][b]==((elmL-1)*w)){ BoxElm[id+'val'][b]=-w; elm.style.left=BoxElm[id+'val'][b]+'px'; //clearInterval(paul); }else{ elm.style.left=(BoxElm[id+'val'][b]+(w*BoxElm[id+'speed']))+'px'; opL=(BoxElm[id+'val'][b]+(w*BoxElm[id+'speed'])); opL= opL < 0 ? (opL * -1) : opL; elm.style.opacity=1-(opL/elm_w); } box.getElementsByTagName('div')[b].style.top='0px'; c++; } } BoxElm[id+'speed']=BoxElm[id+'speed']+BoxElm[id+'speed2']; if(BoxElm[id+'speed']<0.55){ BoxElm[id+'speed2']+=0.002; }else{ BoxElm[id+'speed2']-=0.002; } } //----------------------------------------------------------------- function moveBoxTo(id,id2){ document.getElementById(id2).style.opacity=0; sortElements=new Array(); i=0; while(document.getElementsByTagName('div')[i]){ if(document.getElementsByTagName('div')[i].className.match('awContentBox')){ c=0; box=document.getElementsByTagName('div')[i]; w=box.style.width; h=box.style.height; h=h.replace('px',''); h=parseInt(h); sortElements[box.id]=new Array; for(b=0;box.getElementsByTagName('div')[b];b++){ if(box.getElementsByTagName('div')[b].className=='awBoxContent'){ //alert(box.getElementsByTagName('div')[b].style.left+'-'+box.getElementsByTagName('div')[b].id); sortElements[box.id][box.getElementsByTagName('div')[b].style.left]=box.getElementsByTagName('div')[b].id; c++; } } //alert(c*w); } i++; } c2=c; i=0; c=1; d=0; box=document.getElementById(id); w=box.offsetWidth; h=box.style.height; h=h.replace('px',''); h=parseInt(h); ELM=0; resortElements=new Array; EC=0; while(ELM<(w*c2)){ if(sortElements[box.id][ELM+'px']){ resortElements[EC]=sortElements[box.id][ELM+'px']; EC++; } ELM++; } var pre=true; var preElm=new Array(); for(b=0;box.getElementsByTagName('div')[b];b++){ if(box.getElementsByTagName('div')[b].className=='awBoxContent'){ document.getElementById(box.getElementsByTagName('div')[b].id+'Nav').className='aw_BoxContentNavLink'; if(box.getElementsByTagName('div')[b].id==id2){ document.getElementById(id2+'Nav').className='aw_BoxContentNavActive'; box.getElementsByTagName('div')[b].style.left='0px'; box.getElementsByTagName('div')[b].style.width=w+'px'; pre=false; }else{ if(pre==true){ preElm[d]=box.getElementsByTagName('div')[b].id; //alert(preElm[d]); d++; }else{ box.getElementsByTagName('div')[b].style.left=(c*w)+'px'; box.getElementsByTagName('div')[b].style.opacity='0'; box.getElementsByTagName('div')[b].style.width=w+'px'; c++; } } } } a=0; while(ainit){ document.getElementById(id).style.opacity=(curr-speed); }else{ window.clearInterval(awContentBoxFadeelm[id]); } } function awContentBoxfadeOut2IE(id,speed,init){ var curr=document.getElementById(id).style.filter; curr=curr.replace('alpha(opacity=',''); curr=curr.replace(')',''); curr=curr.replace(')',''); curr=curr.replace('(',''); curr=parseInt(curr); speed=parseInt(speed); if(curr>(init*100)){ document.getElementById(id).style.filter="alpha(opacity="+(curr-speed)+")"; }else{ window.clearInterval(awContentBoxFadeelm[id]); } } function addawContentBox(){ if(document.body){ if(browserName('MSIE')&&browserVersion()<8){ document.body.onLoad=createBox(); }else{ if(document.body.getAttributeNode("onload")){ document.body.getAttributeNode("onload").value+=";createBox()"; }else{ var OL=document.createAttribute("onload"); OL.nodeValue="createBox()"; document.body.setAttributeNode(OL); } if(document.body.getAttributeNode("onresize")){ document.body.getAttributeNode("onresize").value+=";resizeBox()"; }else{ var OL=document.createAttribute("onresize"); OL.nodeValue="resizeBox()"; document.body.setAttributeNode(OL); } } clearInterval(addawContentBoxVar); window.addawContentBox=''; } } addawContentBoxVar=setInterval('addawContentBox()',1);