// original content taken from Nic's JavaScript Page with permission
// lack of these three lines will result in copyright infringment
// made by: Nic's JavaScript Page - http://www.javascript-page.com

var currentdate = 0;
var core = 0;

function initArray() {

this.length = initArray.arguments.length;
  for (var i = 0; i < this.length; i++) {
  this[i] = initArray.arguments[i];
  }
}

link = new initArray(  // MAKE SURE EVERY LINE ENDS WITH A COMMA, EXCEPT FOR THE FINAL LINE
"/category.php?category_id=22",
"/category.php?category_id=22",
"/category.php?category_id=26",
"/category.php?category_id=22",
"/category.php?category_id=22",
"/category.php?category_id=22"
);

//September 22, 2009 - catids
//22 sleep mask, 23 pin cusions, 24 toliet paper, 25 utin burrito, 26 necklace, 27 accessories, 28 potty fairy

image = new initArray(  // MAKE SURE EVERY LINE ENDS WITH A COMMA, EXCEPT FOR THE FINAL LINE
"Main_1_Cat22_Blue_owl_sleeping_mask_296x296.jpg",
"Main_1_Cat22_Black_cat_Sleep_mask_296.jpg",
"hp_1_necklace1.jpg",
"hp_1_mask1.jpg",
"296_LeNekoNoir_Owl_Sleep_Mask_Childrens.jpg",
"296_LeNekoNoir_Owl_Sleep_Mask.jpg"
);

text = new initArray(  // MAKE SURE EVERY LINE ENDS WITH A COMMA, EXCEPT FOR THE FINAL LINE
"Owl be back, Blue owl sleep mask",
"Black Cat sleep Mask. Purrfect",
"Message in a bottle necklace accessory",
"YI have a headache sleep mask",
"Cute Sleeping Masks inspired by forest owls"
);

var currentdate = new Date();
var core = currentdate.getSeconds() % image.length;
var ranlink  = link[core];
var ranimage = image[core];
var rantext  = text[core];

document.write('<div style=\"background:transparent url(../images/main/'+ranimage+') no-repeat center center\"><a href=\"' +ranlink+ '\" class=\"noborder\"><img src=\"images/main/bigborder.gif\" class="mainimg" width="296" height="296" alt=\"'+rantext+'\"></a></div>');
