function LoadLayers(){
	runSlideShow();
}

//Code to control co-branding content frame----------------------------------
// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 10000;
//-------------------------------------------

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = .025;
//-------------------------------------------
var Picture1 = new Array(); // don't change this
var Picture2 = new Array(); // don't change this
var Caption = new Array(); // don't change this
var link = new Array(); // don't change this


//logos here---------------------------------
Picture1[1] = 'imagefolder/frontline_logo.gif';
Picture1[2] = 'imagefolder/products/bionic_logo.gif';
Picture1[3] = 'imagefolder/products/eprinex_logo.gif';
Picture1[4] = 'imagefolder/products/eclipse_logo.gif';
Picture1[5] = 'imagefolder/products/matrix_logo.jpg';
//-------------------------------------------


//right side animal imagefolder here-----------------
Picture2[1] = 'imagefolder/branding_dog02.jpg';
Picture2[2] = 'imagefolder/branding_bionic.jpg';
Picture2[3] = 'imagefolder/branding_eprinex.jpg';
Picture2[4] = 'imagefolder/branding_eclipse.jpg';
Picture2[5] = 'imagefolder/branding_matrix.jpg';
//-------------------------------------------


//taglines here------------------------------
Caption[1]  = "Around the world, vets choose FRONTLINE PLUS® to protect more dogs and cats than any other product. It's the best and it's the only treatment that gives you fast acting, long-lasting protection from fleas and controls ticks.";
Caption[2]  = "BIONIC® Hi Mineral is a revolution in pre lamb ewe treatment technology. For the first time, two actives are able to be released simultaneously, providing combination control of all species for a comprehensive 100 day lock down against incoming parasites. Containing abamectin and albendazole, BIONIC™ Hi Mineral pays out both actives at a controlled rate over 100 days.";
Caption[3]  = "EPRINEX® is the most advanced endectocide ever developed. EPRINEX treats and controls gastrointestinal roundworms, lungworms, sucking and biting lice, and sarcoptic and chorioptic mites in all ages of beef and dairy cattle (including lactating cows). EPRINEX has been extensively trialled in New Zealand and around the world and consistently demonstrates increased milk production.";
Caption[4]  = "No other pour on is more effective against parasite resistance than ECLIPSE® Pour-on. ECLIPSE is the world's first dual combination cattle pour on treats and controls internal and external parasites including those strains resistant to single active pour ons such as Cooperia Sp. This makes ECLIPSE Pour-on the first choice treatment for all non-lactating cattle including calves.";
Caption[5]  = "MATRIX® is the ultimate three way drench with unsurpassed efficacy against mixed infections of gastrointestinal parasites, including those with single or dual resistance to any of the three major drench families. Triple combinations have also been shown to significantly slow the development of drench resistance.";
//-------------------------------------------

//links here---------------------------------
link[1] = "/products/frontline_plus_cats.asp";
link[2] = "/products/bionic_hi_mineral_combination_sheep_capsules.asp";
link[3] = "/products/ivomec_eprinex_pouron.asp";
link[4] = "/products/eclipse_pour_on_for_cattle.asp";
link[5] = "/products/matrix_hi_mineral.asp";
//--------------------------------------------

var tss;
var iss;
var Lo = 1
var Hi = 2
var ranNum = (getCookie('cobrand')*1)
if (ranNum != '' && ranNum != null)
{
ranNum = ranNum + 1
}
else
{
ranNum = 1
}
if (ranNum>Hi) ranNum=1;
setCookie('cobrand',ranNum);
var jss = ranNum;
var pss = Picture1.length-1;
var preLoad1 = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad1[iss] = new Image();
preLoad1[iss].src = Picture1[iss];}
var preLoad2 = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad2[iss] = new Image();
preLoad2[iss].src = Picture2[iss];}


function runSlideShow(){
if (document.all){
document.images.PictureBox1.style.filter="blendTrans(duration="+CrossFadeDuration+")";
document.images.PictureBox1.filters.blendTrans.Apply();
document.images.PictureBox2.style.filter="blendTrans(duration="+CrossFadeDuration+")";
document.images.PictureBox2.filters.blendTrans.Apply();
}
document.images.PictureBox1.src = preLoad1[jss].src;
document.images.PictureBox2.src = preLoad2[jss].src;
document.getElementById('logolink').href=link[jss];
document.getElementById('piclink').href=link[jss];
CrossFadeDuration = .35
if (document.all) document.images.PictureBox1.filters.blendTrans.Play();
if (document.all) document.images.PictureBox2.filters.blendTrans.Play();
if (document.getElementById) document.getElementById("TextLayer").innerHTML= Caption[jss];
jss = jss + 1;
if (jss > (pss)) jss=1;
tss = setTimeout('runSlideShow()', SlideShowSpeed);
}


	

 
function getCookie(name) { // use: getCookie("name");
  	var objCookie = document.cookie;
    var index = objCookie.indexOf(name + "=");
    if (index == -1) return null;
    index = objCookie.indexOf("=", index) + 1; // first character
    var endstr = objCookie.indexOf(";", index);
    if (endstr == -1) endstr = objCookie.length; // last character
    return unescape(objCookie.substring(index, endstr));
  }
  
 
 function setCookie(name, value) {
 var days = 365;
 if (!days) days = 1; // default to 1 day if empty 
 var expdate = new Date(); 
 expdate.setTime(expdate.getTime() + days*24*60*60*1000); 
 document.cookie = name + "=" + escape(value) + "; expires=" + expdate.toGMTString(); 
 } 
