
var imagenumber = 10 ;
var randomnumber = Math.random() ;
var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1 ;

zazzleimages = new Array
zazzleimages[1] = "http://www.gerbilgoods.com/gerbil-goods-images/zazzlebags.gif"
zazzleimages[2] = "http://www.gerbilgoods.com/gerbil-goods-images/zazzlekeychains2.gif"
zazzleimages[3] = "http://www.gerbilgoods.com/gerbil-goods-images/zazzlekeychains.gif"
zazzleimages[4] = "http://www.gerbilgoods.com/gerbil-goods-images/zazzleshoes2.gif"
zazzleimages[5] = "http://www.gerbilgoods.com/gerbil-goods-images/zazzleshoes.gif"
zazzleimages[6] = "http://www.gerbilgoods.com/gerbil-goods-images/zazzlestamps2.gif"
zazzleimages[7] = "http://www.gerbilgoods.com/gerbil-goods-images/zazzlestamps3.gif"
zazzleimages[8] = "http://www.gerbilgoods.com/gerbil-goods-images/zazzlestamps.gif"
zazzleimages[9] = "http://www.gerbilgoods.com/gerbil-goods-images/zazzleties.gif"
var zazzleimage = zazzleimages[rand1]


zazzlelinks = new Array
zazzlelinks[1] = "http://www.zazzle.com/GerbilGoods?gl=GerbilGoods&rf=238219990615675528"
zazzlelinks[2] = "http://www.zazzle.com/gerbilgoods/products/pt-146?gl=GerbilGoods&rf=238219990615675528"
zazzlelinks[3] = "http://www.zazzle.com/gerbilgoods/products/pt-146?gl=GerbilGoods&rf=238219990615675528"
zazzlelinks[4] = "http://www.zazzle.com/gerbilgoods/products/pt-167?gl=GerbilGoods&rf=238219990615675528"
zazzlelinks[5] = "http://www.zazzle.com/gerbilgoods/products/pt-167?gl=GerbilGoods&rf=238219990615675528"
zazzlelinks[6] = "http://www.zazzle.com/gerbilgoods/products/pt-172?gl=GerbilGoods&rf=238219990615675528"
zazzlelinks[7] = "http://www.zazzle.com/gerbilgoods/products/pt-172?gl=GerbilGoods&rf=238219990615675528"
zazzlelinks[8] = "http://www.zazzle.com/gerbilgoods/products/pt-172?gl=GerbilGoods&rf=238219990615675528"
zazzlelinks[9] = "http://www.zazzle.com/gerbilgoods/products/pt-151?gl=GerbilGoods&rf=238219990615675528"
var zazzlelink = zazzlelinks[rand1]

zazzlealts = new Array
zazzlealts[1] = "Gerbil Bags"
zazzlealts[2] = "Gerbil Keychains / Keyrings"
zazzlealts[3] = "Gerbil Keychains / Keyrings"
zazzlealts[4] = "Gerbil Shoes"
zazzlealts[5] = "Gerbil Shoes"
zazzlealts[6] = "Gerbil Stamps"
zazzlealts[7] = "Gerbil Stamps"
zazzlealts[8] = "Gerbil Stamps"
zazzlealts[9] = "Gerbil Ties"
var zazzlealt = zazzlealts[rand1]








images = new Array
images[1] = "gerbil-goods-images/image1.gif"
images[2] = "gerbil-goods-images/image2.gif"
images[3] = "gerbil-goods-images/image3.gif"
images[4] = "gerbil-goods-images/image4.gif"
images[5] = "gerbil-goods-images/image5.gif"
images[6] = "gerbil-goods-images/image6.gif"
images[7] = "gerbil-goods-images/image7.gif"
images[8] = "gerbil-goods-images/image8.gif"
images[9] = "gerbil-goods-images/image9.gif"
images[10] = "gerbil-goods-images/image10.gif"
var image = images[rand1]


links = new Array
links[1] = "http://www.gerbilgoods.com/cgi-bin/store/cpshop.cgi/3412343249.gerbilgoods-289060289+martial-arts-gerbil-dark-t-shirt.html"
links[2] = "http://www.gerbilgoods.com/cgi-bin/store/cpshop.cgi/3412343249.gerbilgoods-287180318+gerbil-tower-magnet.html"
links[3] = "http://www.gerbilgoods.com/cgi-bin/store/cpshop.cgi/3412343249.gerbilgoods-288939523+gerbils-in-love-jr.-spaghetti-tank.html"
links[4] = "http://www.gerbilgoods.com/cgi-bin/store/cpshop.cgi/3412343249.gerbilgoods-288993233+robo-gerbil-long-sleeve-t-shirt.html"
links[5] = "http://www.gerbilgoods.com/cgi-bin/store/cpshop.cgi/3412343249.gerbilgoods-286362967+gerbil-looks-up-mug.html"
links[6] = "http://www.gerbilgoods.com/cgi-bin/store/cpshop.cgi/3412343249.gerbilgoods-289523790+gerbils.-you-just-gotta-love-em-trucker-hat.html"
links[7] = "http://www.gerbilgoods.com/cgi-bin/store/cpshop.cgi/3412343249.gerbilgoods-286849230+gerbil-shapes-2.25-button.html"
links[8] = "http://www.gerbilgoods.com/cgi-bin/store/cpshop.cgi/3412343249.gerbilgoods-290858202+emo-vs-pop-gerbils-modern-wall-clock.html"
links[9] = "http://www.gerbilgoods.com/cgi-bin/store/cpshop.cgi/3412343249.gerbilgoods-286412204+eskimo-kiss-gerbils-sweatshirt.html"
links[10] = "http://www.gerbilgoods.com/cgi-bin/store/cpshop.cgi/3412343249.gerbilgoods-286833952+gerbil-face-messenger-bag.html"
var link = links[rand1]

names = new Array
names[1] = "Martial Arts Gerbil Dark T-shirt"
names[2] = "Gerbil Tower Magnet"
names[3] = "Gerbils In Love Jr. Spaghetti Tank"
names[4] = "Robo Gerbil Long Sleeve T-Shirt"
names[5] = "Gerbil Looks Up Mug"
names[6] = "You Just Gotta Love 'Em Trucker Hat"
names[7] = "Gerbil Shapes Button"
names[8] = "Emo vs Pop Gerbils Modern Clock"
names[9] = "Eskimo Kiss Gerbils Sweatshirt"
names[10] = "Gerbil Face Messenger Bag"
var name = names[rand1]



gerbilnames = new Array
gerbilnames[1] = "A brown gerbil rolls in some sand"
gerbilnames[2] = "A yellow gerbil sits down"
gerbilnames[3] = "A brown gerbil eating a sunflower seed"
gerbilnames[4] = "A brown gerbil sleeps lying down"
gerbilnames[5] = "A brown gerbil stands on its hind legs"
gerbilnames[6] = "A grey gerbil chews a cardboard tube"
gerbilnames[7] = "Two gerbils eskimo kiss (touch noses)"
gerbilnames[8] = "A dark grey gerbil digging"
gerbilnames[9] = "A light yellow gerbil looks up"
gerbilnames[10] = "A brown gerbil sleeps curled up"
var gerbilname = gerbilnames[rand1]


gerbilimages = new Array
gerbilimages[1] = "gerbil-goods-images/gerbil1.gif"
gerbilimages[2] = "gerbil-goods-images/gerbil2.gif"
gerbilimages[3] = "gerbil-goods-images/gerbil3.gif"
gerbilimages[4] = "gerbil-goods-images/gerbil4.gif"
gerbilimages[5] = "gerbil-goods-images/gerbil5.gif"
gerbilimages[6] = "gerbil-goods-images/gerbil6.gif"
gerbilimages[7] = "gerbil-goods-images/gerbil7.gif"
gerbilimages[8] = "gerbil-goods-images/gerbil8.gif"
gerbilimages[9] = "gerbil-goods-images/gerbil9.gif"
gerbilimages[10] = "gerbil-goods-images/gerbil10.gif"
var gerbilimage = gerbilimages[rand1]




/*
	Link Target Preferences v.1.1
	http://www.noscope.com/journal/2004/10/link-target-preferences
*/

// BEGIN Configuration
	// The following URLs are considered "on-site", and will be ignored
	var url_1 = "http://www.gerbilgoods.com";
	var url_2 = "http://gerbilgoods.com";

	// Default link-target preference.
	var open_blank_default = false;
	
	// Website title - to prevent cookie conflicts with other sites
	var site_title = "gerbilgoods";
// END Configuration

// Cookie Functions
function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var 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 eraseCookie(name) {
	createCookie(name,"",-1);
}
// Checkbox Loader
function loadLinkPrefs () {
	if (readCookie(site_title+"_linkprefs_cookie")) {
		initVal = readCookie(site_title+"_linkprefs_cookie");	// Load cookied preference
	} else {
		createCookie(site_title+"_linkprefs_cookie", true, 20000)
		initVal = open_blank_default;	// If no cookie is set
	}
	openBlank = initVal;
	setCheckbox(eval(initVal))
}
// Set Checkbox State
function setCheckbox(state) {
	openBlank = state;
	document.getElementById('linkprefs').checked = state;
	setTargets();
	createCookie(site_title+"_linkprefs_cookie", state, 20000)
}
// Configure Link Targets
function setTargets() {
	var link, l = 0;
	if (openBlank == true) {
		while (link = document.links[l++]) {
			// Open in _blank, except all links starting with...
			if (link.href.indexOf(url_1) == -1 && link.href.indexOf(url_2) == -1 && link.href.indexOf('javascript') == -1) link.target = 'gerbilgoodsExternal'; 
		}
	} else {
		while (link = document.links[l++]) {
			// Open in _top, except all links starting with...
			if (link.href.indexOf(url_1) == -1 && link.href.indexOf(url_2) == -1 && link.href.indexOf('javascript') == -1) link.target = '_top'; 
		}
	}
}
// Event Listener, by Scott Andrew
function addEvent(obj, evType, fn) {
	if (obj.addEventListener) {
		obj.addEventListener(evType, fn, true);
		return true;
	} else if (obj.attachEvent) {
		var r = obj.attachEvent('on'+evType, fn);
		return r;
	} else {
		return false;
	}
}
