function LoadLayers(){
	runSlideShow();
}

//Code to control co-branding content frame----------------------------------
// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 13000;
//-------------------------------------------

// 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/heartgard_logo.gif';
Picture1[2] = 'imagefolder/frontline_logo.gif';
/*Picture1[2] = 'imagefolder/ivomec_logo.gif';
Picture1[3] = 'imagefolder/igenity_logo.gif';
Picture1[4] = 'imagefolder/gastrogard_logo.gif';
Picture1[5] = 'imagefolder/frontline_logo.gif';
Picture1[6] = 'imagefolder/ivomec_premix_logo.gif';
Picture1[7] = 'imagefolder/oravet_logo.gif';*/
//-------------------------------------------


//right side animal imagefolder here-----------------
Picture2[1] = 'imagefolder/dog_02.jpg';
Picture2[2] = 'imagefolder/cat_01.jpg';
/*
Picture2[2] = 'imagefolder/livestock_01.jpg';
Picture2[3] = 'imagefolder/livestock_02.jpg';
Picture2[4] = 'imagefolder/equine_01.jpg';
Picture2[5] = 'imagefolder/cat_01.jpg';
Picture2[6] = 'imagefolder/swine_02.jpg';
Picture2[7] = 'imagefolder/dogcat_01.jpg';*/
//-------------------------------------------


//taglines here------------------------------
Caption[1]  = "Heartworm Disease is 100% preventable with HEARTGARD Plus! All you have to do to protect your dog from the threat of heartworm disease is to give HEARTGARD Plus once a month and use as otherwise directed. Only HEARTGARD plus come in a real-beef chewable that dogs love, and you'll enjoy giving it too! HEARTGARD Plus also treats and controls roundworms and more species of hookworms than any other product of its kind. ";
/*Caption[2]  = "IVOMEC® Plus (ivermectin/clorsulon) Injection for Cattle kills more types of internal and external parasites than any other product, all in a single dose. With its reliable, long-lasting power, you can see performance benefits such as improved weight gain, feed efficiency and conception rates.<br>The efficacy of IVOMEC against internal and external parasite control has been demonstrated in cattle markets around the world. ";
Caption[3]  = "Introducing IGENITY™ Testing Service. IGENITY is a revolutionary new way to identify an animal’s genetic potential, helping producers to breed, raise, manage, milk and market cattle at an optimum level.";
Caption[4]  = "Gastrogard®, the first and only medication approved by the FDA for treating and preventing the recurrence of gastric ulcers in horses, even while horses continue to train. Please use this site to learn more about EGUS (Equine Gastric Ulcer Syndrome) and the benefits Gastrogard can provide in treating it.";*/
Caption[2]  = "FRONTLINE Spray provides an effective flea and tick control for cats, and kittens. Because of the spray formulation, fipronil, the active ingredient in FRONTLINE Spray, is immediately distributed over your cat's body and begins to kill fleas shortly after application. This makes FRONTLINE Spray fast acting to control an existing flea or tick problem. ";
//Caption[6]  = "Producers count on IVOMEC for Swine Brand Products to control and eradicate profit-robbing parasites of swine. Four different formulations of IVOMEC for Swine Brand Products provide convenience as well as effective treatment and control of harmful species of gastrointestinal roundworms, lungworms, kidneyworms, threadworms, lice and mange mites in swine.";
//Caption[7]  = "OraVet works in an effective new way. It significantly reduces plaque and tartar formation by creating an invisible barrier that prevents bacteria from attaching to your pet’s teeth.";
//-------------------------------------------

//links here---------------------------------
link[1] = "/pet_owners/dogs/product_heartgard_plus.asp";
link[2] = "/pet_owners/cats/product_frontline_spot_on.asp";
/*
link[2] = "http://ivomec.us.merial.com";
link[3] = "http://us.igenity.com";
link[4] = "http://gastrogard.us.merial.com";
link[5] = "http://frontline.us.merial.com";
link[6] = "http://ivomec.us.merial.com/swine";
link[7] = "http://www.oravet.com";*/
//--------------------------------------------

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(); 
 } 