/* 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://javascriptsource.com/snippets/popup-blocker-detection.html";
  arrFadeTitles[0] = "<font color='#006600'> <h2>Blog and Earn</h2></font><p>Basically, a blog is a lot like an online journal or diary. The author can talk about anything and everything. Many blogs are full of interesting links that the author has found. Blogs often contain stories or little snippets of information that are interesting to the author and wants to share with the rest of the world.</p><p><a href='http://onlinejobs2u.com/blog.php'><img src='design/r1.png' alt='' /></a></p> ";
  arrFadeLinks[1] = "http://javascriptsource.com/forms/code-box-editor.html";
  arrFadeTitles[1] = "<font color='#006600'> <h2>Data Entry Jobs</h2></font><p>Data entry is the process of placing information into a database in a convenient manner and data entry services means processing of data or text documents into programs with the help of job providers' instructions. These days, from all over the world, people are looking forward to do data entry jobs from home.</p><p><a href='http://onlinejobs2u.com/dataentry.php'><img src='design/r1.png' alt='' /></a></p> ";
  arrFadeLinks[2] = "http://javascriptsource.com/miscellaneous/mailto.html";
  arrFadeTitles[2] = "<font color='#006600'> <h2>Entry Level Jobs</h2></font><p>Just out of college? Then welcome to the working world where everyone utilizes every single minute of theirs to make their lives better. Life outside the college gates is entirely different and at times may be harsh too.In these times of frigid recruitment, to find a stable entry level job is a challenge.</p><p><a href='http://onlinejobs2u.com/Entryleveljob.php'><img src='design/r1.png' alt='' /></a></p>";
  arrFadeLinks[3] = "http://javascriptsource.com/cookies/delicious-cookies.html";
  arrFadeTitles[3] = "<font color='#006600'> <h2>Internet Jobs</h2></font><p>Internet jobs do not require any one to be physically present, and there is no time constraint as well. You are free to work from the comfort of your home if you have a computer with internet access.There are countless ways to earn money, the internet just made the process more easy and feasible, see how:</p><p><a href='http://onlinejobs2u.com/Internetjobs.php'><img src='design/r1.png' alt='' /</a></p>";
  arrFadeLinks[4] = "http://javascriptsource.com/snippets/insertafter.html";
  arrFadeTitles[4] = "<font color='#006600'> <h2>Home Based Jobs</h2></font><p>This page is exclusively for those people who believe that home is where the heart is. Nothing can match up to the comfort a person finds at his or her home. Or it may also be that due to some or the other difficulties you cannot leave your home. You may be running low on funds to support your family </p><p><a href='http://onlinejobs2u.com/homebasejob.php'><img src='design/r1.png' alt='' /></a></p>";
   arrFadeLinks[5] = "http://javascriptsource.com/snippets/insertafter.html";
  arrFadeTitles[5] = "<font color='#006600'> <h2>Part Time Jobs</h2></font><p>This page is for everyone who is facing a financial crunch. Use our directories to the fullest. We have strived ardently so as to enable our directories to quench all your needs so as to direct you towards the best suited option for you.So we give you the BEST…and you choose the BEST among the BEST.</p><p><a href='http://onlinejobs2u.com/parttimejob.php'><img src='design/r1.png' alt='' /></a></p>";
   arrFadeLinks[6] = "http://javascriptsource.com/snippets/insertafter.html";
  arrFadeTitles[6] = "<font color='#006600'> <h2>Online Surveys</h2></font><p>Online surveys can be a lot of fun. If you're looking to enjoy yourself and perhaps earn some merchandise, win prizes and even end up with pocket money in return, then this might be for you.There are many websites offering payment in exchange for taking online surveys. </p><p><a href='http://onlinejobs2u.com/onlinesurvey.php'><img src='design/r1.png' alt='' /></a></p>";
  
}

// 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 = 3600;
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];

}

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)
  {
  }
}

// JavaScript Document
