if (typeof(currentTopic) == "string" && currentTopic != ""){
  //SET ALL VARIABLES NEEDED FOR SCRIPT
  currentTopic = currentTopic.toLowerCase();

  //REMOVE FORBIDDEN CHARACTERS FROM CURRENTTOPIC STRING
  currentTopic = currentTopic.replace(/[\.?:,\']/g,"");

  var roulateTimeMs = 10000; //Time to show roulating sponsors in milliseconds
  var activePartners = new Array();
  var sponsorsTopics = new Array();
  var nPackages = 0;
  var countPackages = 1;  

  //ALL EXISTING EVENTS WITH SPONSORS, ARTICLETITLE, LOWERCASE, NO SPACES, FORBIDDEN CHARACTERS: '?:,
  var allEvents = new Array("soa_seminar",
                            "business_intelligence_seminar",
                            "storage_seminar",
                            "security_seminar",
                            "beheer_seminar",
                            "mobility_seminar",
                            "outsourcing_seminar",
                            "ecm_seminar",
                            "webcast_datacenters",
                            "webcast_soa",
                            "webcast_security",
                            "webcast_beheer",
                            "webcast_mobility");
  
  //ALL EXISTING PACKAGES
  var allPackages = new Array("platinum","gold","silver","selective");

  //Copy allEvents array to allTopics array for internal usage
  var allTopics = allEvents;
  
  //INITIATE ARRAYS FOR EACH PACKAGE PER TOPIC
  for (i = 0; i < allTopics.length; i++){
    sponsorsTopics[allTopics[i]] = new Array();
    for (j = 0; j < allPackages.length; j++){
      sponsorsTopics[allTopics[i]][allPackages[j]] = new Array();
    } 
  }

/* = = = = = = = CONTENTAREA = = = = = = = =  */ 
//ARRAYS WITH ALL SPONSORS PER TOPIC PER SPONSOR 
  
  /*DEFAULT PARTNER
  sponsorsTopics['event']['package'][0] = new Array();
  sponsorsTopics['event']['package'][0]['textHTML']  = "";
  sponsorsTopics['event']['package'][0]['imageSrc']  = "sponsors/";
  sponsorsTopics['event']['package'][0]['imageLink'] = "http://"; 
  */

//START business_intelligence_seminar SPONSORS
  sponsorsTopics['business_intelligence_seminar']['silver'][0] = new Array();
  sponsorsTopics['business_intelligence_seminar']['silver'][0]['textHTML']  = "<b>Sybase</b>";
  sponsorsTopics['business_intelligence_seminar']['silver'][0]['imageSrc']  = "sponsors/sybase.jpg";
  sponsorsTopics['business_intelligence_seminar']['silver'][0]['imageLink'] = "http://www.sybase.nl/";
  
  sponsorsTopics['business_intelligence_seminar']['silver'][1] = new Array();
  sponsorsTopics['business_intelligence_seminar']['silver'][1]['textHTML']  = "<b>SAS</b>";
  sponsorsTopics['business_intelligence_seminar']['silver'][1]['imageSrc']  = "sponsors/sas.jpg";
  sponsorsTopics['business_intelligence_seminar']['silver'][1]['imageLink'] = "http://www.sas.com/nl/"; 
  
  sponsorsTopics['business_intelligence_seminar']['silver'][2] = new Array();
  sponsorsTopics['business_intelligence_seminar']['silver'][2]['textHTML']  = "<b>Ordina</b>";
  sponsorsTopics['business_intelligence_seminar']['silver'][2]['imageSrc']  = "sponsors/ordina.jpg";
  sponsorsTopics['business_intelligence_seminar']['silver'][2]['imageLink'] = "http://www.ordina.nl/"; 

  sponsorsTopics['business_intelligence_seminar']['silver'][3] = new Array();
  sponsorsTopics['business_intelligence_seminar']['silver'][3]['textHTML']  = "<b>Business Objects</b>";
  sponsorsTopics['business_intelligence_seminar']['silver'][3]['imageSrc']  = "sponsors/bo.jpg";
  sponsorsTopics['business_intelligence_seminar']['silver'][3]['imageLink'] = "http://www.nl.businessobjects.com/"; 

  sponsorsTopics['business_intelligence_seminar']['silver'][4] = new Array();
  sponsorsTopics['business_intelligence_seminar']['silver'][4]['textHTML']  = "<b>SAP</b>";
  sponsorsTopics['business_intelligence_seminar']['silver'][4]['imageSrc']  = "sponsors/sap.jpg";
  sponsorsTopics['business_intelligence_seminar']['silver'][4]['imageLink'] = "http://www.sap.com/netherlands/"; 
  
  sponsorsTopics['business_intelligence_seminar']['silver'][5] = new Array();
  sponsorsTopics['business_intelligence_seminar']['silver'][5]['textHTML']  = "<b>i3</b>";
  sponsorsTopics['business_intelligence_seminar']['silver'][5]['imageSrc']  = "sponsors/i3.jpg";
  sponsorsTopics['business_intelligence_seminar']['silver'][5]['imageLink'] = "http://www.i3.nl/"; 
  
  sponsorsTopics['business_intelligence_seminar']['silver'][6] = new Array();
  sponsorsTopics['business_intelligence_seminar']['silver'][6]['textHTML']  = "<b>Accenture</b>";
  sponsorsTopics['business_intelligence_seminar']['silver'][6]['imageSrc']  = "sponsors/accenture.jpg";
  sponsorsTopics['business_intelligence_seminar']['silver'][6]['imageLink'] = "http://www.accenture.com/Countries/Netherlands/default.htm"; 

  sponsorsTopics['business_intelligence_seminar']['selective'][0] = new Array();
  sponsorsTopics['business_intelligence_seminar']['selective'][0]['textHTML']  = "<b>Top BI</b>";
  sponsorsTopics['business_intelligence_seminar']['selective'][0]['imageSrc']  = "sponsors/topbi.jpg";
  sponsorsTopics['business_intelligence_seminar']['selective'][0]['imageLink'] = "http://www.topbi.nl/";   
  
  sponsorsTopics['business_intelligence_seminar']['selective'][1] = new Array();
  sponsorsTopics['business_intelligence_seminar']['selective'][1]['textHTML']  = "<b>Sogeti</b>";
  sponsorsTopics['business_intelligence_seminar']['selective'][1]['imageSrc']  = "sponsors/sogeti.jpg";
  sponsorsTopics['business_intelligence_seminar']['selective'][1]['imageLink'] = "http://www.sogeti.nl/";   
  
  sponsorsTopics['business_intelligence_seminar']['selective'][2] = new Array();
  sponsorsTopics['business_intelligence_seminar']['selective'][2]['textHTML']  = "<b>Linkit</b>";
  sponsorsTopics['business_intelligence_seminar']['selective'][2]['imageSrc']  = "sponsors/linkit.jpg";
  sponsorsTopics['business_intelligence_seminar']['selective'][2]['imageLink'] = "http://www.linkit.nl/";   
  
  sponsorsTopics['business_intelligence_seminar']['selective'][3] = new Array();
  sponsorsTopics['business_intelligence_seminar']['selective'][3]['textHTML']  = "<b>Illuminate</b>";
  sponsorsTopics['business_intelligence_seminar']['selective'][3]['imageSrc']  = "sponsors/illuminate.jpg";
  sponsorsTopics['business_intelligence_seminar']['selective'][3]['imageLink'] = "http://www.i-lluminate.com/";                      
//END business_intelligence_seminar SPONSORS


//START security_seminar SPONSORS
  sponsorsTopics['security_seminar']['gold'][0] = new Array();
  sponsorsTopics['security_seminar']['gold'][0]['textHTML']  = "<b>Pinewood</b><br>Specialist in netwerk- en databeveiliging";
  sponsorsTopics['security_seminar']['gold'][0]['imageSrc']  = "sponsors/pinewood.jpg";
  sponsorsTopics['security_seminar']['gold'][0]['imageLink'] = "http://www.pinewood.nl/"; 

  sponsorsTopics['security_seminar']['selective'][0] = new Array();
  sponsorsTopics['security_seminar']['selective'][0]['textHTML']  = "<b>Infraccent</b>";
  sponsorsTopics['security_seminar']['selective'][0]['imageSrc']  = "sponsors/infraccent.jpg";
  sponsorsTopics['security_seminar']['selective'][0]['imageLink'] = "http://www.infraccent.nl/"; 

  sponsorsTopics['security_seminar']['selective'][2] = new Array();
  sponsorsTopics['security_seminar']['selective'][2]['textHTML']  = "<b>TSTC</b><br />Tshukudu Technology College";
  sponsorsTopics['security_seminar']['selective'][2]['imageSrc']  = "sponsors/tstc.jpg";
  sponsorsTopics['security_seminar']['selective'][2]['imageLink'] = "http://www.tstc.nl/"; 

  sponsorsTopics['security_seminar']['selective'][3] = new Array();
  sponsorsTopics['security_seminar']['selective'][3]['textHTML']  = "<b>Juniper</b><br />";
  sponsorsTopics['security_seminar']['selective'][3]['imageSrc']  = "sponsors/juniper.jpg";
  sponsorsTopics['security_seminar']['selective'][3]['imageLink'] = "http://www.juniper.net/"; 

  sponsorsTopics['security_seminar']['selective'][4] = new Array();
  sponsorsTopics['security_seminar']['selective'][4]['textHTML']  = "<b>Motiv</b><br />";
  sponsorsTopics['security_seminar']['selective'][4]['imageSrc']  = "sponsors/motiv.jpg";
  sponsorsTopics['security_seminar']['selective'][4]['imageLink'] = "http://www.motiv.nl/"; 

  sponsorsTopics['security_seminar']['selective'][5] = new Array();
  sponsorsTopics['security_seminar']['selective'][5]['textHTML']  = "<b>UBM Global</b><br />";
  sponsorsTopics['security_seminar']['selective'][5]['imageSrc']  = "sponsors/ubm.jpg";
  sponsorsTopics['security_seminar']['selective'][5]['imageLink'] = "http://www.ubm-global.com/"; 
  
//END security_seminar SPONSORS

//START beheer_seminar SPONSORS
  
  sponsorsTopics['beheer_seminar']['platinum'][0] = new Array();
  sponsorsTopics['beheer_seminar']['platinum'][0]['textHTML']  = "<b>Peak-IT</b>";
  sponsorsTopics['beheer_seminar']['platinum'][0]['imageSrc']  = "sponsors/peakit.jpg";
  sponsorsTopics['beheer_seminar']['platinum'][0]['imageLink'] = "http://www.peak-it.nl/"; 

  sponsorsTopics['beheer_seminar']['gold'][0] = new Array();
  sponsorsTopics['beheer_seminar']['gold'][0]['textHTML']  = "<b>Atos Origin</b>";
  sponsorsTopics['beheer_seminar']['gold'][0]['imageSrc']  = "sponsors/atos_origin.jpg";
  sponsorsTopics['beheer_seminar']['gold'][0]['imageLink'] = "http://www.nl.atosorigin.com/nl-nl/";
  
  sponsorsTopics['beheer_seminar']['gold'][1] = new Array();
  sponsorsTopics['beheer_seminar']['gold'][1]['textHTML']  = "<b>Kaseya</b>";
  sponsorsTopics['beheer_seminar']['gold'][1]['imageSrc']  = "sponsors/kaseya.jpg";
  sponsorsTopics['beheer_seminar']['gold'][1]['imageLink'] = "http://www.kaseya.nl/"; 
  
   sponsorsTopics['beheer_seminar']['selective'][0] = new Array();
   sponsorsTopics['beheer_seminar']['selective'][0]['textHTML']  = "<b>Brainforce</b>";
   sponsorsTopics['beheer_seminar']['selective'][0]['imageSrc']  = "sponsors/brainforce.jpg";
   sponsorsTopics['beheer_seminar']['selective'][0]['imageLink'] = "http://www.brainforce.nl/"; 
  
//END beheer_seminar SPONSORS


//START mobility_seminar SPONSORS
  sponsorsTopics['mobility_seminar']['gold'][0] = new Array();
  sponsorsTopics['mobility_seminar']['gold'][0]['textHTML']  = "<b>Atos Origin</b>";
  sponsorsTopics['mobility_seminar']['gold'][0]['imageSrc']  = "sponsors/atos_origin.jpg";
  sponsorsTopics['mobility_seminar']['gold'][0]['imageLink'] = "http://www.nl.atosorigin.com/nl-nl/"; 
//END mobility_seminar SPONSORS


//START webcast_datacenters SPONSORS
  sponsorsTopics['webcast_datacenters']['selective'][0] = new Array();
  sponsorsTopics['webcast_datacenters']['selective'][0]['textHTML']  = "<b>Juniper</b>";
  sponsorsTopics['webcast_datacenters']['selective'][0]['imageSrc']  = "sponsors/juniper.jpg";
  sponsorsTopics['webcast_datacenters']['selective'][0]['imageLink'] = "http://www.juniperdatacenter.net/"; 
//END webcast_datacenters SPONSORS 

//START webcast_soa SPONSORS
  sponsorsTopics['webcast_soa']['selective'][0] = new Array();
  sponsorsTopics['webcast_soa']['selective'][0]['textHTML']  = "<b>Ordina</b>";
  sponsorsTopics['webcast_soa']['selective'][0]['imageSrc']  = "sponsors/ordina_orange.jpg";
  sponsorsTopics['webcast_soa']['selective'][0]['imageLink'] = "http://www.ordina.nl/soa"; 
//END webcast_soa SPONSORS 

//START webcast_security SPONSORS
  sponsorsTopics['webcast_security']['gold'][0] = new Array();
  sponsorsTopics['webcast_security']['gold'][0]['textHTML']  = "<b>Pinewood</b><br>Specialist in netwerk- en databeveiliging";
  sponsorsTopics['webcast_security']['gold'][0]['imageSrc']  = "sponsors/pinewood.jpg";
  sponsorsTopics['webcast_security']['gold'][0]['imageLink'] = "http://www.pinewood.nl/"; 
//END webcast_security SPONSORS    
 
//START webcast_beheer SPONSORS
  sponsorsTopics['webcast_beheer']['platinum'][0] = new Array();
  sponsorsTopics['webcast_beheer']['platinum'][0]['textHTML']  = "<b>Peak-IT</b>";
  sponsorsTopics['webcast_beheer']['platinum'][0]['imageSrc']  = "sponsors/peakit.jpg";
  sponsorsTopics['webcast_beheer']['platinum'][0]['imageLink'] = "http://www.peak-it.nl/"; 

  sponsorsTopics['webcast_beheer']['gold'][0] = new Array();
  sponsorsTopics['webcast_beheer']['gold'][0]['textHTML']  = "<b>Atos Origin</b>";
  sponsorsTopics['webcast_beheer']['gold'][0]['imageSrc']  = "sponsors/atos_origin.jpg";
  sponsorsTopics['webcast_beheer']['gold'][0]['imageLink'] = "http://www.nl.atosorigin.com/nl-nl/";
  
  sponsorsTopics['webcast_beheer']['gold'][1] = new Array();
  sponsorsTopics['webcast_beheer']['gold'][1]['textHTML']  = "<b>Kaseya</b>";
  sponsorsTopics['webcast_beheer']['gold'][1]['imageSrc']  = "sponsors/kaseya.jpg";
  sponsorsTopics['webcast_beheer']['gold'][1]['imageLink'] = "http://www.kaseya.nl/"; 
//END webcast_beheer SPONSORS   
 
//START webcast_mobility SPONSORS
  sponsorsTopics['webcast_mobility']['gold'][0] = new Array();
  sponsorsTopics['webcast_mobility']['gold'][0]['textHTML']  = "<b>Atos Origin</b>";
  sponsorsTopics['webcast_mobility']['gold'][0]['imageSrc']  = "sponsors/atos_origin.jpg";
  sponsorsTopics['webcast_mobility']['gold'][0]['imageLink'] = "http://www.nl.atosorigin.com/nl-nl/";
//END webcast_mobility SPONSORS 
  
/* = = = = = = = = END CONTENT AREA = = = = = = = = = = =  */ 
 
  
  //FUNCTION TO ROULATE SPONSORS PER SPONSORTYPE, EXCEPT PLATINUM SPONSORS
  function roulateSponsors(currentTopic, initial){
    for (var i in sponsorsTopics[currentTopic]){
      maxlength = sponsorsTopics[currentTopic][i].length;
      if (i != "platinum" && (maxlength > 1 || (maxlength > 0 && initial))){
        if (typeof(activePartners[i]) == "undefined"){
          activePartners[i] = new Array();
          activePartners[i][0] = maxlength;
          activePartners[i][1] = Math.floor(Math.random()*maxlength);
        }
        if (activePartners[i][1] < (maxlength - 1)){
          activePartners[i][1]++;
        } else {
          activePartners[i][1] = 0;
        } 
    
        j = activePartners[i][1];
        content = "<a href='" + sponsorsTopics[currentTopic][i][j]['imageLink'] + "' target='_blank'><img border='0' class='floatright' src='" + baseUrl + sponsorsTopics[currentTopic][i][j]['imageSrc'] + "'></a>";
        content += "<span style='font-size:9px; color:#999;'>" + i + " partner</span><br>";
		content += "<a style='color:#000000; text-decoration: none;' href='" + sponsorsTopics[currentTopic][i][j]['imageLink'] + "' target='_blank'>"+ sponsorsTopics[currentTopic][i][j]['textHTML']+"</a>";
		if (initial){
          document.getElementById(currentTopic + "_" + i).innerHTML = content;
        } else {
          blendcontent(currentTopic + "_" + i, content, 3000);          
        }
      }
    }
  }
  
  //FUNCTION TO GENERATE FADING EFFECT
  function opacity(id, opacStart, opacEnd, millisec) { 
    //speed for each frame 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 

    //determine the direction for the blending, if start and end are the same nothing happens 
    if(opacStart > opacEnd) { 
      for(i = opacStart; i >= opacEnd; i--) { 
          setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
          timer++; 
      } 
    } else if(opacStart < opacEnd) { 
      for(i = opacStart; i <= opacEnd; i++) 
          { 
          setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
          timer++; 
      } 
    } 
  } 
  
  //FUNCTION FADE OBJECT
  function blendcontent(divid, content, millisec) { 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 
  
    //make div transparent 
    changeOpac(0, divid); 

    //Change content
    document.getElementById(divid).innerHTML = content;

    //fade in div 
    for(i = 0; i <= 100; i++) { 
        setTimeout("changeOpac(" + i + ",'" + divid + "')",(timer * speed)); 
        timer++; 
    }
  } 
  
  //change the opacity for different browsers 
  function changeOpac(opacity, id) { 
    var object = document.getElementById(id).style; 
    object.opacity = (opacity / 100); 
    object.MozOpacity = (opacity / 100); 
    object.KhtmlOpacity = (opacity / 100); 
    object.filter = "alpha(opacity=" + opacity + ")"; 
  } 
  
  //COUNT ALL EXISTING TOPICSPONSORS
  for (var i in sponsorsTopics[currentTopic]){
    if (typeof(sponsorsTopics[currentTopic][i][0]) != "undefined"){
      nPackages++;
    }
  }

  //ONLY SHOW CONTENT IF TOPIC IS SPONSORED
  if (nPackages > 0){
    document.write('<div class="blokwrap"><div class="blok"><div class="blokheader">Partners</div>');
    
    //SHOW SPONSORS, SHOW ALL PLATINUM PARTNERS SEPARATELY, ROULATE OTHER SPONSORS IN ONE DIV PER SPONSORTYPE
    for (var i in sponsorsTopics[currentTopic]){
      //all platinum sponsors get own div
      if (i == "platinum"){ 
        for (j = 0;j < sponsorsTopics[currentTopic][i].length; j++){
          content = "";
          content += "<div style='height:60px;font-size:11px;' id='" + currentTopic + "_" + i +"_"+j+"'>";
          content += "<a href='" + sponsorsTopics[currentTopic][i][j]['imageLink'] + "' target='_blank'><img border='0' class='floatright' src='"+ baseUrl + sponsorsTopics[currentTopic][i][j]['imageSrc'] + "'></a>";
          content += "<span style='font-size:9px; color:#999;'>" + i + " partner</span><br>";
			content += "<a style='color: #000000; text-decoration: none;' href='" + sponsorsTopics[currentTopic][i][j]['imageLink'] + "' target='_blank'>"+ sponsorsTopics[currentTopic][i][j]['textHTML']+"</a>";
          content += "</div>";
          if (countPackages != nPackages || (countPackages == nPackages && (j + 1) < sponsorsTopics[currentTopic][i].length)){
            content += "<hr>";
          }       
          document.write(content);
          countPackages++;
        }
      } else {
        //all other sponsors roulate in one div grouped by sponsortype
        for (j = 0; j < sponsorsTopics[currentTopic][i].length && j < 1; j++){
          content = "";
          //backgroundcolor, height, width must be defined for correct working of opacitychange (fading-effect) in IE
          content += "<div style='background-color:#FFFFFF;font-family:Arial,Verdana;font-size:11px;height:60px;width:100%;overflow:hidden;' id='" + currentTopic + "_" + i +"'></div>";
          if (countPackages != nPackages){
            content += "<hr>";
          }
          document.write(content);
          countPackages++;
        }
      }
    }
  
    document.write('<div class="cleaner"></div></div></div><div class="spacer5"></div>');
    
    //SHOW SPONSORS AND ROULATE IF NEEDED
    roulateSponsors(currentTopic, true);
    setInterval('roulateSponsors(currentTopic,false)',roulateTimeMs);
  }
}
