function InitScripts(){
 zxcCSBanner('dimo',ImgPath,ContentAry,200,30);
 zxcBannerStart('dimo',0);
 //ReSize();
}

function zxcWWHS(){
 var winww,zxcwh,zxcws,zxcwc;
 if (document.all){
  zxcCur='hand';
  zxcwh=document.documentElement.clientHeight;
  zxcww=document.documentElement.clientWidth;
  zxcws=document.documentElement.scrollTop;
  if (zxcwh==0){
   zxcws=document.body.scrollTop;
   zxcwh=document.body.clientHeight;
   zxcww=document.body.clientWidth;
  }
 }
 else if (document.getElementById){
  zxcCur='pointer';
  zxcwh=window.innerHeight-20;
  zxcww=window.innerWidth-20;
  zxcws=window.pageYOffset;
 }
 zxcwc=Math.round(zxcww/2);
 return [zxcww,zxcwh];
}

function ReSize(){
 document.getElementById('dimo').style.width=(zxcWWHS()[0]-20)+'px';
}
function FunctionName(z){
 alert('The parameter '+z+'\nhas been passed to\nfunction name\nFunctName');
}


var zxcBGColor='#FFFFFF';
var zxcTxtColor='black';  
var zxcTxtAlign='center'; 
var zxcFontSize='10pt';  

var ImgPath='';


// **** Functional Code - NO NEED to Change

var zxcObj;
var zxcOOPCnt=0;
var zxcCursor=document.all?'hand':'pointer';

// Common Functions
function zxcCSBanner(zxcid,zxcpth,zxcary,zxcw,zxcspd){
 var zxcp=document.getElementById(zxcid)
 if (zxcp.offsetWidth>=zxcp.offsetHeight){
  zxcCSBanH(zxcp,zxcpth,zxcary,zxcw,zxcspd);
 }
 else {
  zxcCSBanV(zxcp,zxcpth,zxcary,zxcw,zxcspd);
 }
}

function zxcCngDirection(zxcid,zxcdir){
 var zxcobj=document.getElementById(zxcid);
 clearTimeout(zxcobj.oopbr.to);
 zxcdir=zxcdir||-zxcobj.oopbr.dir;
 if (zxcdir>0){ zxcobj.oopbr.dir=1; }
 else { zxcobj.oopbr.dir=-1; }
 zxcobj.oopbr.rotate();
}

function zxcBannerStop(zxcid){
 clearTimeout(document.getElementById(zxcid).oopbr.to);
}

function zxcBannerStart(zxcid,zxcdir){
 var zxcobj=document.getElementById(zxcid);
 clearTimeout(zxcobj.oopbr.to);
 zxcobj.oopbr.dir=zxcdir||zxcobj.oopbr.dir;
 zxcobj.oopbr.rotate();
}

function zxcLink(zxcobj){
 if (zxcobj.url.match('^|^')){ zxcExternal(zxcobj.url); return; }
 window.top.location=zxcobj.url;
}

function zxcStyle(zxcele,zxcstyle){
 for (key in zxcstyle){ zxcele.style[key]=zxcstyle[key]; }
}

// Horizontal Banner Functions
function zxcCSBanH(zxcp,zxcpth,zxcary,zxcw,zxcspd){
 for (var zxc0=0;zxc0<zxcary.length;zxc0++){
  for (var zxc1=0;zxc1<zxcary[zxc0].length;zxc1++){
   if (zxcary[zxc0][zxc1]==''){ zxcary[zxc0][zxc1]=null; }
  }
 }
 var zxch=zxcp.offsetHeight;
 zxcp.set=true;
 var zxcd=document.createElement('DIV');
 zxcStyle(zxcd,{position:'absolute',left:'0px',top:'0px',height:zxch+'px'});
 zxcp.appendChild(zxcd);
 zxcp.ary=[zxcd,zxcd.cloneNode(true),zxcd.cloneNode(true),zxcd.cloneNode(true)];
 for (var zxc2=1;zxc2<zxcp.ary.length;zxc2++){
  zxcp.appendChild(zxcp.ary[zxc2]);
 }
 var zxcobj;
 for (var zxc3=0;zxc3<zxcp.ary.length;zxc3++){
  zxcp.cnt=0;
  var zxclft=0;
  for (var zxc4=0;zxc4<Math.max(zxcary.length,Math.ceil(zxcp.offsetWidth/zxcw)+1);zxc4++){
   if (zxcary[zxcp.cnt][0].toUpperCase().match('I')){ zxcobj=document.createElement('IMG'); zxcobj.src=zxcpth+zxcary[zxcp.cnt][1]; }
   if (zxcary[zxcp.cnt][0].toUpperCase().match('T')){ zxcobj=document.createElement('DIV'); zxcobj.innerHTML=zxcary[zxcp.cnt][1]; }
   // START DIMO Makelaar
   if (zxcary[zxcp.cnt][0].toUpperCase().match('M')){ zxcobj=document.createElement('DIV'); zxcobj.innerHTML=zxcary[zxcp.cnt][1]; }
   // EINDE DIMO Makelaar   
   if (zxcary[zxcp.cnt][2]){ zxcobj.url=zxcary[zxcp.cnt][2]; zxcStyle(zxcobj,{ cursor:zxcCursor}); zxcobj.onclick=function(){ zxcLink(this); } }
   zxcStyle(zxcobj,{position:'absolute',left:(zxclft)+'px',top:'0px',width:(zxcary[zxcp.cnt][3]||zxcw)+'px',height:(zxcary[zxcp.cnt][4]||zxch)+'px',backgroundColor:(zxcary[zxcp.cnt][5]||zxcBGColor),color:(zxcary[zxcp.cnt][6]||zxcTxtColor),textAlign:(zxcary[zxcp.cnt][7]||zxcTxtAlign),fontSize:(zxcary[zxcp.cnt][8]||zxcFontSize)});
   zxcp.ary[zxc3].appendChild(zxcobj);
   zxcStyle(zxcp.ary[zxc3],{width:(parseInt(zxcobj.style.left)+parseInt(zxcobj.style.width))+'px'});
   zxclft+=parseInt(zxcobj.style.width);
   zxcp.cnt=++zxcp.cnt%zxcary.length;
  }
 }
 var zxcw=parseInt(zxcp.ary[0].style.width);
 for (var zxc4=0;zxc4<zxcp.ary.length;zxc4++){
  zxcStyle(zxcp.ary[zxc4],{left:(zxcw*zxc4-zxcw)+'px'});
 }
 if (!zxcp.oopbr){ zxcp.oopbr=new zxcOOPBannerRotate(zxcp.ary,zxcspd,zxcw); }
}

function zxcOOPBannerRotate(zxcary,zxcspd,zxcw){
 this.ref='zxcoobr'+zxcOOPCnt++;
 window[this.ref]=this;
 this.ary=zxcary;
 this.spd=zxcspd||100;//30;//
 this.to=null;
 this.dir=1;
 this.w=zxcw;
}

zxcOOPBannerRotate.prototype.rotate=function(){
 this.ary[1].style.left=(parseInt(this.ary[1].style.left)+this.dir)+'px';
 this.ary[0].style.left=(parseInt(this.ary[1].style.left)-this.w)+'px';
 this.ary[2].style.left=(parseInt(this.ary[2].style.left)+this.dir)+'px';
 this.ary[3].style.left=(parseInt(this.ary[2].style.left)+this.w*2)+'px';
 if (this.dir<0&&parseInt(this.ary[1].style.left)+this.w<0){
  this.ary[1].style.left=(parseInt(this.ary[2].style.left)+this.w)+'px';
  this.ary.reverse();
 }
 if (this.dir>0&&parseInt(this.ary[1].style.left)>this.w){
  this.ary[1].style.left=(parseInt(this.ary[2].style.left)-this.w)+'px';
  this.ary.reverse();
 }
 this.setTimeOut('rotate();',this.spd);
}

zxcOOPBannerRotate.prototype.setTimeOut=function(zxcf,zxcd){
 this.to=setTimeout('window.'+this.ref+'.'+zxcf,zxcd);
}

// Vertical Banner Functions
function zxcCSBanV(zxcp,zxcpth,zxcary,zxcw,zxcspd){
 for (var zxc0=0;zxc0<zxcary.length;zxc0++){
  for (var zxc1=0;zxc1<zxcary[zxc0].length;zxc1++){
   if (zxcary[zxc0][zxc1]==''){ zxcary[zxc0][zxc1]=null; }
  }
 }
 var zxcw=zxcp.offsetWidth;
 zxcp.set=true;
 var zxcd=document.createElement('DIV');
 zxcStyle(zxcd,{position:'absolute',left:'0px',top:'0px',width:zxcw+'px'});
 zxcp.appendChild(zxcd);
 zxcp.ary=[zxcd,zxcd.cloneNode(true),zxcd.cloneNode(true),zxcd.cloneNode(true)];
 for (var zxc2=1;zxc2<zxcp.ary.length;zxc2++){
  zxcp.appendChild(zxcp.ary[zxc2]);
 }
 var zxcobj;
 for (var zxc3=0;zxc3<zxcp.ary.length;zxc3++){
  zxcp.cnt=0;
  var zxctp=0;
  for (var zxc4=0;zxc4<Math.max(zxcary.length,Math.ceil(zxcp.offsetHeight/zxcw)+1);zxc4++){
   if (zxcary[zxcp.cnt][0].toUpperCase().match('I')){ zxcobj=document.createElement('IMG'); zxcobj.src=zxcpth+zxcary[zxcp.cnt][1]; }
   if (zxcary[zxcp.cnt][0].toUpperCase().match('T')){ zxcobj=document.createElement('DIV'); zxcobj.innerHTML=zxcary[zxcp.cnt][1]; }
   // START DIMO Makelaar
   if (zxcary[zxcp.cnt][0].toUpperCase().match('M')){ zxcobj=document.createElement('DIV'); zxcobj.innerHTML=zxcary[zxcp.cnt][1]; }
   // EINDE DIMO Makelaar
   if (zxcary[zxcp.cnt][2]){ zxcobj.url=zxcary[zxcp.cnt][2]; zxcStyle(zxcobj,{ cursor:zxcCursor}); zxcobj.onclick=function(){ zxcLink(this); } }
   zxcStyle(zxcobj,{position:'absolute',left:'0px',top:(zxctp)+'px',width:(zxcary[zxcp.cnt][3]||zxcw)+'px',height:(zxcary[zxcp.cnt][4]||zxcw),backgroundColor:(zxcary[zxcp.cnt][5]||zxcBGColor),color:(zxcary[zxcp.cnt][6]||zxcTxtColor),textAlign:(zxcary[zxcp.cnt][7]||zxcTxtAlign),fontSize:(zxcary[zxcp.cnt][8]||zxcFontSize)});
   zxcp.ary[zxc3].appendChild(zxcobj);
   zxcStyle(zxcp.ary[zxc3],{height:(parseInt(zxcobj.style.top)+parseInt(zxcobj.style.height))+'px',backgroundColor:'red'});
   zxctp+=parseInt(zxcobj.style.height);
   zxcp.cnt=++zxcp.cnt%zxcary.length;
  }
 }
 var zxch=parseInt(zxcp.ary[0].style.height);
 for (var zxc4=0;zxc4<zxcp.ary.length;zxc4++){
  zxcStyle(zxcp.ary[zxc4],{top:(zxch*zxc4-zxch)+'px'});
 }
 if (!zxcp.oopbr){ zxcp.oopbr=new zxcOOPBannerRotateV(zxcp.ary,zxcspd,zxch); }
}

function zxcOOPBannerRotateV(zxcary,zxcspd,zxch){
 this.ref='zxcoobr'+zxcOOPCnt++;
 window[this.ref]=this;
 this.ary=zxcary;
 this.spd=zxcspd||100;
 this.to=null;
 this.dir=1;
 this.h=zxch;
}

zxcOOPBannerRotateV.prototype.rotate=function(){
 this.ary[1].style.top=(parseInt(this.ary[1].style.top)+this.dir)+'px';
 this.ary[0].style.top=(parseInt(this.ary[1].style.top)-this.h)+'px';
 this.ary[2].style.top=(parseInt(this.ary[2].style.top)+this.dir)+'px';
 this.ary[3].style.top=(parseInt(this.ary[2].style.top)+this.h*2)+'px';
 if (this.dir<0&&parseInt(this.ary[1].style.top)+this.h<0){
  this.ary[1].style.top=(parseInt(this.ary[2].style.top)+this.h)+'px';
  this.ary.reverse();
 }
 if (this.dir>0&&parseInt(this.ary[1].style.top)>this.h){
  this.ary[1].style.top=(parseInt(this.ary[2].style.top)-this.h)+'px';
  this.ary.reverse();
 }
 this.setTimeOut('rotate();',this.spd);
}

zxcOOPBannerRotateV.prototype.setTimeOut=function(zxcf,zxcd){
 this.to=setTimeout('window.'+this.ref+'.'+zxcf,zxcd);
}
