/***************************************************/
//Getting the year for copyright.  Its a custom script and not a part of the jquery script

/***************************************************/

function getdt()
{
	
	//document.write("2008-2009");
	document.write("Copyright &copy; 2008-2010, Global Delight Technologies Pvt. Ltd. All rights reserved.<br/><span style='font-size:8px; line-height:25px;'>Apple, the Apple logo, Mac, the Mac logo, iPod, iPod touch, iPhoto and iTunes are trademarks of Apple Inc., registered in the U.S. and other countries. iPhone is a trademark of Apple Inc. App Store is a service mark of Apple Inc.</span><br/><br/><br/>");
	document.write('<link rel="SHORTCUT ICON" HREF="images/favicon.ico">');
	
}

function iPhoneCopyright()
{
	document.write("Copyright &copy; 2008-2009, Global Delight Technologies Pvt. Ltd. All rights reserved.<br/><span style='font-size:9px;'> Apple, the Apple logo, iPod, iPod touch, and iTunes are trademarks of Apple Inc., registered in the U.S. and other countries. iPhone is a trademark of Apple Inc.  App Store is a service mark of Apple Inc.</span><br/><br/><br/>");
}
/***************************************************/



//-------- Jquery script begins from here -----

/***************************************************/

function setupFadeLinks() {
 
arrFadeLinks[0] = "http://globaldelight.com/voila/voila_reviews.html";
arrFadeTitles[0] = "There may be other tools for capturing screenshots but Voila puts a very useful toolset into a lean package that will run in the background without bogging your system down. - <strong>Macworld Australia</strong>";
arrFadeLinks[1] = "http://globaldelight.com/voila/voila_reviews.html";
arrFadeTitles[1] = "If you do a lot of screen captures, edit those captures using PhotoShop or other editing applications, then Voila is definitely something to consider to help streamline and optimize your workflow process. - <strong>Mac101</strong>";
arrFadeLinks[2] = "http://globaldelight.com/voila/voila_reviews.html";
arrFadeTitles[2] = "Voila is perfect at its job, and has definitely caused more than one moment of surprise during the time I used it. -<strong> MacRecon.com</strong>";

}

/***************************************************/
// You can also play with these variables to control fade speed, fade color, and how fast the colors jump.

var m_FadeOut = 185;//default 250
var m_FadeIn=85;//default 0
var m_Fade = 185;// default 0
var m_FadeStep = 1;//default 3
var m_FadeWait = 3500;
var m_bFadeOut = true;
var strValue;

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