<!-- Paste this code into an external JavaScript file named: marquee.js  -->

/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Mike Hudson :: http://www.afrozeus.com */

function setupFadeLinks() {
 


   arrFadeLinks[0] = "http://ecos2011.com/ECOS2011_Post-Conference_Report.pdf";
  arrFadeTitles[0] = "1. ECOS<sup>2011</sup> Post-Conference Report...   <span style='font-size:xx-small'><i>read more</i></span>";
  
   arrFadeLinks[1] = "http://ecos2011.com/BestPapers.pdf";
  arrFadeTitles[1] = "2. Best Paper and Poster Awards...   <span style='font-size:xx-small'><i>read more</i></span>";
  
     
  /*

  arrFadeLinks[6] = "http://www.ecos2011.com/Special_Session_Nikola_Tesla_PLAKAT.pdf"
  arrFadeTitles[6] = "7. Special symposium on Nikola Tesla at ECOS 2011 Conference...  <span style='font-size:xx-small'><i>read more</i></span>";
  
       arrFadeLinks[7] = "http://www.ecos2011.com/taxi.php"
  arrFadeTitles[7] = "8. Welcome reception at the Terrace of Petrovaradin Fort, 3 July, 2011, 19h00-21h00...  <span style='font-size:xx-small'><i>read more</i></span>";
  
       arrFadeLinks[8] = "http://www.ecos2011.com/exitkarte.php"
  arrFadeTitles[8] = "9. Discount of EXIT tickets for the ECOS 2011 attendees...  <span style='font-size:xx-small'><i>read more</i></span>";
  
       arrFadeLinks[9] = "http://www.kiki021.com/index.php/rezervacija-reservation";
  arrFadeTitles[9] = "10. Transport from Nikola Tesla airport to your hotel- reservation form...   <span style='font-size:xx-small'><i>read more</i></span>";
  
  
  
  arrFadeLinks[0] = "http://www.ecos2011.com/report.php";
  arrFadeTitles[0] = "1. Progress report: More than 400 full papers were received so far... <span style='font-size:xx-small'><i>read more</i></span>";
  arrFadeLinks[1] = "http://www.ecos2011.com/dvor.php"
  arrFadeTitles[1] = "2. Banquet in honour of ECOS Conference at the White Palace, hosts HRH Crown Prince Alexander II and Crown Princess Katherine...  <span style='font-size:xx-small'><i>read more</i></span>";
  
     arrFadeLinks[2] = "http://www.ecos2011.com/UNESCO2011-first-announcement.pdf";
  arrFadeTitles[2] = "3. UNESCO Regional Summer School - RENEWABLE ENERGY AND ENERGY EFFICIENCY GOVERNANCE...   <span style='font-size:xx-small'><i>read more</i></span>";
  
   arrFadeLinks[3] = "http://ecos2011.com/special.php";
  arrFadeTitles[3] = "4. World Energy Panel: One of the key scientific events of the ECOS<sup>2011</sup> Conference will...   <span style='font-size:xx-small'><i>read more</i></span>";
  
  arrFadeLinks[4] = "http://ecos2011.com/payment.php";
  arrFadeTitles[4] = "5. Deadline for Early Fee is extended...   <span style='font-size:xx-small'><i>read more</i></span>";
  




  arrFadeLinks[0] = "http://www.ecos2011.com/papers.php";
  arrFadeTitles[0] = "Paper submission deadline is extended to April 10, 2011...  <span style='font-size:xx-small'><i>read more</i></span>";
  arrFadeLinks[3] = "http://javascriptsource.com/cookies/delicious-cookies.html";
  arrFadeTitles[3] = "4. Delicious Cookies";
  arrFadeLinks[4] = "http://javascriptsource.com/snippets/insertafter.html";
  arrFadeTitles[4] = "5. insertAfter()"; 
  
     arrFadeLinks[0] = "http://ecos2011.com/topprog.php";
  arrFadeTitles[0] = "1.Preliminary program of the ECOS 2011 Conference is now available...<span style='font-size:xx-small'><i>read more</i></span>";
  
    arrFadeLinks[3] = "http://www.ecos2011.com/unesco.php";
  arrFadeTitles[3] = "4.UNESCO travel grant recipient selection under way...   <span style='font-size:xx-small'><i>read more</i></span>";
  
  */
}

// You can also play with these variables to control fade speed, fade color, and how fast the colors jump.

var m_FadeOut = 255;
var m_FadeIn=0;
var m_Fade = 0;
var m_FadeStep = 3;
var m_FadeWait = 5600;
var m_bFadeOut = true;

var m_iFadeInterval;

window.onload = Fadewl;

var arrFadeLinks;
var arrFadeTitles;
var arrFadeCursor = 0;
var arrFadeMax;

function Fadewl() {
  m_iFadeInterval = setInterval(fade_ontimer, 10);
  arrFadeLinks = new Array();
  arrFadeTitles = new Array();
  setupFadeLinks();
  arrFadeMax = arrFadeLinks.length-1;
  setFadeLink();
}

function setFadeLink() {
  var ilink = document.getElementById("fade_link");
  ilink.innerHTML = arrFadeTitles[arrFadeCursor];
  ilink.href = arrFadeLinks[arrFadeCursor];
}

function fade_ontimer() {
  if (m_bFadeOut) {
    m_Fade+=m_FadeStep;
    if (m_Fade>m_FadeOut) {
      arrFadeCursor++;
      if (arrFadeCursor>arrFadeMax)
        arrFadeCursor=0;
      setFadeLink();
      m_bFadeOut = false;
    }
  } else {
    m_Fade-=m_FadeStep;
    if (m_Fade<m_FadeIn) {
      clearInterval(m_iFadeInterval);
      setTimeout(Faderesume, m_FadeWait);
      m_bFadeOut=true;
    }
  }
  var ilink = document.getElementById("fade_link");
  if ((m_Fade<m_FadeOut)&&(m_Fade>m_FadeIn))
    ilink.style.color = "#" + ToHex(m_Fade);
}

function Faderesume() {
  m_iFadeInterval = setInterval(fade_ontimer, 10);
}

function ToHex(strValue) {
  try {
    var result= (parseInt(strValue).toString(16));

    while (result.length !=2)
            result= ("0" +result);
    result = result + result + result;
    return result.toUpperCase();
  }
  catch(e)
  {
  }
}


