// JavaScript Document
FadeTime=8000;FadeTime2=2000;var resize=false;
var boxIndex= new Array();
var boxPosition= new Array();
function showElement(elm){
document.getElementById(elm).style.opacity=0;
document.getElementById(elm).style.display='block';
fadeIn(elm,0.02,0,1);
exit;
}
var MouseX=0 ;
var MouseY=0;
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('moveBoxRight2015(\''+id+'\')',FadeTime);
document.getElementById(id+'Play').style.display='none';
document.getElementById(id+'Pause').style.display='block ';
}
function chckMouseMove(start,id){
end=chiliMouseX;
if(start != end){
//alert(start-end);
if((start-end)<0){
moveBoxLeft2015(id);
stopBox(id);
}else{
moveBoxRight2015(id);
stopBox(id);
}
clearInterval(abcdefg);
}
}
abcdefg='';
function testfunc(id){
start=chiliMouseX;
end=chiliMouseX;
abcdefg= setInterval("chckMouseMove("+start+",'"+id+"')",50);
}
function testfunc2(){
clearInterval(abcdefg);
}
var Tstart='';
var Tend='';
function testfunc3(event,id){
Tstart=event.touches[0].pageX;
}
touchE=true;
function testfunc4(event,id){
Tend=event.touches[0].pageX;
if(touchE==true){
if((Tend-Tstart)<-1){
moveBoxRight2015(id);
stopBox(id);
}
if((Tend-Tstart) > 1){
moveBoxLeft2015(id);
stopBox(id);
}
touchE=false;
setTimeout('clearTouchE()',500);
}
}
function clearTouchE(){
touchE=true;
}
function moveBoxLeft2015(Bid){
element=document.getElementById(Bid);
elements=element.getElementsByClassName('aw_BoxContentNavActive');
if(elements.length>0){
elements[0].className='aw_BoxContentNavLink';
}
curBox=element.getElementsByClassName('awBoxContent boxSelected')[0];
if(curBox.previousSibling.className=='awBoxContent previousBox'){
curBox.previousSibling.className='awBoxContent boxSelected';
document.getElementById(curBox.previousSibling.id+'Nav').className='aw_BoxContentNavActive';
}else{
elms=element.getElementsByClassName('awBoxContent nextBox');
elms[elms.length-1].className='awBoxContent boxSelected';
document.getElementById(elms[elms.length-1].id+'Nav').className='aw_BoxContentNavActive';
}
curBox.className='awBoxContent nextBox';
rrrrrop=new Array();
rrrrrop2=new Array();
past=false;
elements=element.getElementsByClassName('awBoxContent');
for(i=0;i< elements.length;i++){
if(past==false&&elements[i].className!='awBoxContent boxSelected'){
rrrrrop.push(elements[i]);
}
if(past==true&&elements[i].className!='awBoxContent boxSelected'){
//elements[i].className=='awBoxContent';
rrrrrop2.push(elements[i]);
}
if(elements[i].className=='awBoxContent boxSelected'){
past=true;
}
}
for(i=0;i< rrrrrop.length;i++){
rrrrrop[i].className='awBoxContent previousBox';
}
for(i=0;i< rrrrrop2.length;i++){
rrrrrop2[i].className='awBoxContent nextBox';
}
}
function moveBoxRight2015(Bid){
element=document.getElementById(Bid);
elements=element.getElementsByClassName('aw_BoxContentNavActive');
if(elements.length>0){
elements[0].className='aw_BoxContentNavLink';
}
curBox=element.getElementsByClassName('awBoxContent boxSelected')[0];
if(curBox.nextSibling.className=='awBoxContent nextBox'){
curBox.nextSibling.className='awBoxContent boxSelected';
document.getElementById(curBox.nextSibling.id+'Nav').className='aw_BoxContentNavActive';
}else{
element.getElementsByClassName('awBoxContent previousBox')[0].className='awBoxContent boxSelected';
document.getElementById(element.getElementsByClassName('awBoxContent boxSelected')[0].id+'Nav').className='aw_BoxContentNavActive';
}
curBox.className='awBoxContent previousBox';
rrrrrop=new Array();
rrrrrop2=new Array();
past=false;
elements=element.getElementsByClassName('awBoxContent');
for(i=0;i< elements.length;i++){
if(past==false&&elements[i].className!='awBoxContent boxSelected'){
rrrrrop.push(elements[i]);
}
if(past==true&&elements[i].className!='awBoxContent boxSelected'){
//elements[i].className=='awBoxContent';
rrrrrop2.push(elements[i]);
}
if(elements[i].className=='awBoxContent boxSelected'){
past=true;
}
}
for(i=0;i< rrrrrop.length;i++){
rrrrrop[i].className='awBoxContent previousBox';
}
for(i=0;i< rrrrrop2.length;i++){
rrrrrop2[i].className='awBoxContent nextBox';
}
}
function resetBox(Bid,Element,nav){
curBox=document.getElementById(Element);
curBox.className='awBoxContent previousBox noTransition';
element=document.getElementById(Bid);
past=false;
elements=element.getElementsByClassName('aw_BoxContentNavActive');
if(elements.length>0){
elements[0].className='aw_BoxContentNavLink';
}
elements=element.getElementsByClassName('awBoxContent');
for(i=0;i< elements.length;i++){
if(elements[i]==curBox){
neu=i;
}
if(past==false){
elements[i].className=='awBoxContent previousBox';
}
if(elements[i].className=='awBoxContent boxSelected'){
altElm=elements[i];
alt=i;
past=true;
}
}
if(alt < neu){
altElm.className='awBoxContent previousBox';
}else{
altElm.className='awBoxContent nextBox';
}
curBox.className='awBoxContent boxSelected';
rrrrrop=new Array();
rrrrrop2=new Array();
past=false;
elements=element.getElementsByClassName('awBoxContent');
for(i=0;i< elements.length;i++){
if(past==false&&elements[i].className!='awBoxContent boxSelected'){
rrrrrop.push(elements[i]);
}
if(past==true&&elements[i].className!='awBoxContent boxSelected'){
//elements[i].className=='awBoxContent nextBox';
rrrrrop2.push(elements[i]);
}
if(elements[i].className=='awBoxContent boxSelected'){
past=true;
}
}
for(i=0;i< rrrrrop.length;i++){
rrrrrop[i].className='awBoxContent previousBox';
}
for(i=0;i< rrrrrop2.length;i++){
rrrrrop2[i].className='awBoxContent nextBox';
}
nav.className='aw_BoxContentNavActive';
}
function createBox (){
Bid='';
i=0;
boxID=0;
while(document.getElementsByTagName('div')[i]){
if(document.getElementsByTagName('div')[i].className.match('awContentBox')){
var boxContents= new Array();
var klasse='aw_BoxContentNavActive';
varClassName='awBoxContent boxSelected';
LINKS='';
c=0;
box=document.getElementsByTagName('div')[i];
var arrows = box.innerHTML.search(//);
var navigation = box.innerHTML.search(//);
var play = box.innerHTML.search(//);
var fade = box.innerHTML.search(//);
var slow = box.parentNode.innerHTML.search(//);
Bid='ContentBox'+i;
box.id=Bid;
OL=document.createAttribute("onmousedown");
OL.nodeValue="testfunc('"+Bid+"')";
box.setAttributeNode(OL);
OL=document.createAttribute("onmouseup");
OL.nodeValue="testfunc2()";
box.setAttributeNode(OL);
OL=document.createAttribute("ontouchstart");
OL.nodeValue="testfunc3(event,'"+Bid+"')";
box.setAttributeNode(OL);
OL=document.createAttribute("ontouchmove");
OL.nodeValue="testfunc4(event,'"+Bid+"')";
box.setAttributeNode(OL);
OL='';
box.style.cursor="pointer";
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].className=varClassName;
boxContents.push(box.getElementsByTagName('div')[b].id);
box.getElementsByTagName('div')[b].style.position='absolute';
box.getElementsByTagName('div')[b].style.top='0px';
LINKS+=''+box.getElementsByTagName('div')[b].title+''+(c+1)+'';
klasse='aw_BoxContentNavLink';
varClassName='awBoxContent nextBox';
c++;
}
}
if (arrows == -1){
box.innerHTML+='
';
}
boxIndex[i]= boxContents;
if (navigation == -1){
box.innerHTML+=''+LINKS+'
';
}else{
box.innerHTML+=''+LINKS+'
';
}
if(play == -1) {
}else{
if (slow == -1){
if (fade == -1){
MB[Bid]=setInterval('moveBoxRight2015(\''+Bid+'\')',FadeTime);
}else{
boxPosition[i]=0;
MB[Bid]=setInterval('FadeBox(\''+Bid+'\','+i+')',FadeTime);
}
}else{
MB[Bid]=setInterval('moveBoxRight2015(\''+Bid+'\')',(FadeTime*4));
}
}
box.innerHTML+='';
box.innerHTML+='';
}
boxID++;
//alert(c*w);
i++;
}
}
function FadeBox(boxId,dex){
boxPosition[dex]=boxPosition[dex]+1;
if(boxPosition[dex]>(boxIndex[dex].length-1)){
boxPosition[dex]=0;
}
moveBoxTo(boxId,boxIndex[dex][boxPosition[dex]]);
}
R=null;
function resizeBox (){
resize=true;
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]){
elmm=document.getElementsByClassName('contentBoxComment')[i];
elmm.id='bc'+i;
window.setTimeout("showElement('bc"+i+"')",2000);
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){
resizeBox2 ();
resize=false;
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){
if(resize==true){
BoxElm[id+'speed']=1;
}
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]){
elmm=document.getElementsByClassName('contentBoxComment')[i];
elmm.id='bc'+i;
window.setTimeout("showElement('bc"+i+"')",2000);
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);