function LoadLayers(){
	runSlideShow();
}

//Code to control co-branding content frame----------------------------------
// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 12000;
//-------------------------------------------

// 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/avinewh120_logo.gif';
Picture1[2] = 'imagefolder/frontline_logo.gif';
Picture1[3] = 'imagefolder/akipor_logo.gif';
//-------------------------------------------


//right side animal imagefolder here-----------------
Picture2[1] = 'imagefolder/branding_chicken01.jpg';
Picture2[2] = 'imagefolder/branding_dog01.jpg';
Picture2[3] = 'imagefolder/branding_pig01.jpg';
//-------------------------------------------


//taglines here------------------------------
Caption[1] = '<span class="highlight">威支灵 Avinew+H120</span> 是梅里亚首次推出的新城疫、传支二联液氮疫苗，具有高效价持久稳定的特性。威支灵的VG/GA 株能在消化道、呼吸道进行繁殖，并对其产生更全面的保护。其具有高免疫原性的自然毒株，能够预防超强毒新城疫感染，同时也对呼吸道进行安静的保护。威支灵的H120株能够有效预防主要传支疾病，无呼吸道副反应，对鸡群呼吸道、生殖道高度安全。';
Caption[2] = '<span class="highlight">福来恩&reg;喷剂 FRONTLINE&reg; Spray</span> 能有效控制猫和狗身上的跳蚤和扁虱。其独特的喷剂配方、fipronil以及内在活性成分，使其在使用后能够迅速在猫和狗身体里产生作用并杀死跳蚤和扁虱，并能够达到快速的控制跳蚤和扁虱的功效。';
Caption[3] = '<span class="highlight">猪克伪  猪伪狂犬基因缺失活苗 AKIPOR&reg;</span> 30年的使用经验证实其安全可靠的有效性能。抗原含量能有效阻断病毒传播。拥有清除伪狂犬所需求得专业配方。能够满足您 轻松控制、快速净化的需求。';
//-------------------------------------------

//links here---------------------------------
link[1] = "/Avian_Producers/Chicken/products_live_vaccine.asp";
link[2] = "/pet_owners/dogs/products_frontline_spray.asp";
link[3] = "/livestock_producers/pigs/products.asp";
//--------------------------------------------

var tss;
var iss;
var Lo = 1
var Hi = 3
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(); 
} 