// JavaScript Document



var banners = new Array(
  'banners/businessInset.gif',
  'banners/dataBackup.gif',
  'banners/whiteListing.gif',
  'banners/antiVirus.gif',
  'banners/childProtection.gif',
  'banners/disasterRecovery.gif',
  'banners/firewalls.gif',
  'banners/securitySuites.gif',
 'banners/smartPhones.gif',
 'banners/bannerBackground.jpg');

var linx = new Array(
 'http:www.softwaresecuritysolutions.com/web-security.html',
  'http://www.softwaresecuritysolutions.com/S3-DataSafe-Online-Backup.html',
  'http://www.softwaresecuritysolutions.com/Bit9.html',
  'http://www.softwaresecuritysolutions.com/anti-virus.html',
  'http://www.softwaresecuritysolutions.com/CyberPatrol-Parental-Controls-info.html',
  'http://www.softwaresecuritysolutions.com/disaster-recovery.html',
  'http://www.softwaresecuritysolutions.com/firewalls.html',
  'http://www.softwaresecuritysolutions.com/Security-Suite.html',
  'http://www.softwaresecuritysolutions.com/Mobile-Phone-Security-PDA-Security.html',
  'http://www.softwaresecuritysolutions.com');

var altTag = new Array(
  'Reduce costs from Employee\'s surfing.',
  'S3 DataSafe Automatic Online Backup.',
 'Bit9 The best in Application Whitelisting.',
  'Anti Malware security software.',
  'Please protect your Children while Online!',
 'Protect your Business from Disaster.',
  'Firewalls, Internet Security Starter.',
 'Security Suite Software.',
  'Mobile Security, Smart Phone Security.',
  'If your data isn\'t secure, it isn\'t your data.');

var old = 0;
var current = 0;

/*var j = 0
var p = banners.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = banners[i]
}*/

var p = banners.length;
var whichImage = Math.round(Math.random()*(p-1));

function freshRotate()
{
	if (!document.images) return
	while (current == old)
	{
		current = Math.floor(Math.random()*banners.length);
	}
	old = current;
	document.images['banner'].src = banners[current];
	document.images['banner'].alt = altTag[current];
	//setTimeout('freshRotate()',30000);
}



function fresh(firstImage, secondImage)
{
	var bannerEle = document.getElementById('banner');
	first = firstImage;
	second = secondImage;
	if (!document.images) return
	if (first == 100)
	{
		while (current == old)
	{
		current = Math.floor(Math.random()*banners.length);
	}
	old = current;
	document.images['banner'].src = banners[current];
	document.images['banner'].alt = altTag[current];
	//setTimeout('freshRotate()',30000);
	} else {
		current = first;
	
	document.images['banner'].src = banners[current];
	document.images['banner'].alt = altTag[current];
	setTimeout('freshEnd(second)',15000);
	}
}

function freshEnd(lastImage)
{
	current = lastImage;
	document.images['banner'].src = banners[current];
	document.images['banner'].alt = altTag[current];
}
	

function sendPage()
{
	location.href = linx[current];
}

function altText()
{
	document.write(altTag[current]);
}

