// BEGIN banner engine embed (Requires swfobjects 2)

var flashvars = {}; 
flashvars.fvConfigXML = "xml/config.xml"; flashvars.fvContentXML = "/WorkArea/DownloadAsset.aspx?id=710&LangType=1033";
var params = {};
params.menu = "false";
params.quality = "high";
params.wmode = "transparent";
params.AllowScriptAccess = "always";
var attributes = {};
swfobject.embedSWF("flash/lookingfor.swf","lookingfor","462","181","9.0.0","flash/expressInstall.swf",flashvars,params,attributes);
http://as-corpwebdev.callidussoftware.com/WorkArea/DownloadAsset.aspx?id=710&LangType=1033



// END  banner engine embed


// BEGIN compensation box

$(document).ready(function(){

	$("#compensationSmallWrapper, #compensationSmallWrapper img#compOn, #compensationSmallWrapper .compDashHeadline, #compensationSmallWrapper .compDashBarWrapper, #compensationSmallWrapper .compDashBody").click(function () {
      $("#compensationLargeWrapper").fadeIn(350); 
    }),
    
    $("img#compOff").click(function () {
      $("#compensationLargeWrapper").fadeOut(350);  
    });

});

// END compensation box





// BEGIN Compensation Calculator

// Start date used for compensation payment calculations
var calculationStartDate = new Date(2006, 1, 1);
// Save the jQuery object once we get it to run faster
var $compensationSpan = null;

// Take a date and determine how many dollars of compensation
// have been payed out since then.
var dollarsToDate = function(aDate)
{
  if (!aDate)
    aDate = new Date();
  
  var msDiff = aDate.getTime() - calculationStartDate.getTime();
  return Math.round(0.2610225183 * msDiff + 18681129742);
};


// Add commas to a long number to make it more readable.
var addCommas = function(aNumber)
{
  // Convert our number to an array and reverse it so that
  // we can easily work from most significant digits down
  // to least significant
  var bitsR = (aNumber.toString().split('')).reverse();
  for (var i = bitsR.length - 1; i>2; i--)
    if (i % 3 == 0)
      bitsR.splice(i, 0, ',');
  // Return our array with commas added back to the proper order
  // for display on the screen.
  return bitsR.reverse().join('');
};

// Update the compensation value displayed on the screen.
// This is wrapped in its own function to make it easier
// to call on an interval
var updateCompensation = function()
{
  // Creating an array and joining is faster than string concatenation
  $compensationSpan.html(['US $', addCommas(dollarsToDate())].join(''));
};

// Only run if jQuery is available
if (window.jQuery)
{
  $(function() {
    // Save the jQuery object for faster access later
    $compensationSpan = $('#CompensationCounterSmall span, #CompensationCounterLarge span');
    // Initial display of information
    updateCompensation();
    // Periodic update to refresh the number in milliseconds
    setInterval(updateCompensation, 50);
  });  
}

// END Compensation Calculator
