// JavaScript Document
//Do not take or copy this code it is illegal, delete it. If you need very low priced rotators
//that rotate like this, go to http://www.mooonbaby.com/scripts/absoluterotators.html/
//Copyright Mooonbaby.com. All rights reserved.

var arr=[];
arr[0] = ["http://www.corpstory.com/testimonials/h-t1-dicaprio.php"];
arr[1] = ["http://www.corpstory.com/testimonials/h-t2-dedecker.php"];
arr[2] = ["http://www.corpstory.com/testimonials/h-t3-reynolds.php"];
arr[3] = ["http://www.corpstory.com/testimonials/h-t4-tolan.php"];
arr[4] = ["http://www.corpstory.com/testimonials/h-t5-kremian.php"];


function setCookie(name, value, days) 
{
	var expires = "", date = new Date(); 
	if (days) 
	{
		expires = ";expires=" + new Date(date.setDate(date.getDate() + days)).toGMTString();
	} 
	document.cookie = name + "=" + value + expires + "; path=/"; 
}
function readCookie(name) 
{
	var nameEQ = name + "=", ca = document.cookie.split(';'), i, c; 
	for (i = 0; i < ca.length; i += 1)
	{
		c = ca[i];
		while (c.charAt(0) === ' ') 
		{
			c = c.substring(1, c.length);
		}
		if (c.indexOf(nameEQ) === 0)
		{
			return c.substring(nameEQ.length, c.length);
		}
	}
	return null;
} 

function random(limit) 
{
	return Math.floor(Math.random() * limit);
}

function mastercookie() 
{
	record = parseInt(readCookie("mb"), 10); 
	if (isNaN(record)) 
	{
		record = random(arr.length);
	}
	record = (record + 1) % arr.length;    
	document.getElementById("getfiles").src = arr[record];
	setCookie("mb", record, 730);
}

var arr2=[];
arr2[0] = ["http://www.corpstory.com/success/snippet1.php"];
arr2[1] = ["http://www.corpstory.com/success/snippet2.php"];
arr2[2] = ["http://www.corpstory.com/success/snippet3.php"];
arr2[3] = ["http://www.corpstory.com/success/snippet4.php"];
arr2[4] = ["http://www.corpstory.com/success/snippet5.php"];


function mastercookie2() 
{
	record2 = parseInt(readCookie("mb2"), 10); 
	if (isNaN(record2)) 
	{
		record2 = random(arr2.length);
	}
	record2 = (record2 + 1) % arr2.length;    
	document.getElementById("snippets").src = arr2[record2];
	setCookie("mb2", record, 730);
}
