// JavaScript Document

//window.moveTo(0,0);
//window.resizeTo(screen.availWidth, screen.availHeight);

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 closeWindow() {
	var windowCookieName = readCookie('SmlbOpenWin');
	if (windowCookieName) {
		window.close();
	} else {
		window.location = "http://www.smallbone.co.uk";
	}
}

function home_picSequence_bedroomsStart() {
	fadeInDiv('home_imgSeq_bedroom');
	fadeOutDiv('home_imgSeq_kitchen');
	fadeInDiv('home_imgSeq_pointers_bedroomsOn');
	fadeOutDiv('home_imgSeq_pointers_kitchensOn');
	var t=setTimeout("visibilityOn('home_imgSeq_bedroom')",700);
	var t=setTimeout("visibilityOn('home_imgSeq_pointers_bedroomsOn')",700);
	var t=setTimeout("visibilityOff('home_imgSeq_kitchen')",700);
	var t=setTimeout("visibilityOff('home_imgSeq_pointers_kitchensOn')",700);
	var t=setTimeout("home_picSequence_bathroomsStart()",4700);
}

function home_picSequence_bathroomsStart() {
	fadeInDiv('home_imgSeq_bathroom');
	fadeOutDiv('home_imgSeq_bedroom');
	fadeInDiv('home_imgSeq_pointers_bathroomsOn');
	fadeOutDiv('home_imgSeq_pointers_bedroomsOn');
	var t=setTimeout("visibilityOn('home_imgSeq_bathroom')",700);
	var t=setTimeout("visibilityOn('home_imgSeq_pointers_bathroomsOn')",700);
	var t=setTimeout("visibilityOff('home_imgSeq_bedroom')",700);
	var t=setTimeout("visibilityOff('home_imgSeq_pointers_bedroomsOn')",700);
	var t=setTimeout("home_picSequence_kitchensStart()",4700);
}

function home_picSequence_kitchensStart() {
	fadeInDiv('home_imgSeq_kitchen');
	fadeOutDiv('home_imgSeq_bathroom');
	fadeInDiv('home_imgSeq_pointers_kitchensOn');
	fadeOutDiv('home_imgSeq_pointers_bathroomsOn');
	var t=setTimeout("visibilityOn('home_imgSeq_kitchen')",700);
	var t=setTimeout("visibilityOn('home_imgSeq_pointers_kitchensOn')",700);
	var t=setTimeout("visibilityOff('home_imgSeq_bathroom')",700);
	var t=setTimeout("visibilityOff('home_imgSeq_pointers_bathroomsOn')",700);
	var t=setTimeout("home_picSequence_bedroomsStart()",4700);
}

function home_hideCopy() {
	visibilityOn('home_copy1');
	visibilityOff('home_copy2');
	visibilityOff('home_copy3');
	visibilityOff('home_copy4');
	document.getElementById('copy1Title').style.color = "#FFF";
}
function home_copyToggle(divName) {
	if (divName == "copy1") {
		scrollTopDiv();
		visibilityOn('home_copy1');
		visibilityOff('home_copy2');
		visibilityOff('home_copy3');
		visibilityOff('home_copy4');
		visibilityOn('home_copy1_pointerON');
		visibilityOff('home_copy1_pointerOFF');
		visibilityOn('home_copy2_pointerOFF');
		visibilityOff('home_copy2_pointerON');
		visibilityOn('home_copy3_pointerOFF');
		visibilityOff('home_copy3_pointerON');
		visibilityOn('home_copy4_pointerOFF');
		visibilityOff('home_copy4_pointerON');
		document.getElementById('copy1Title').style.color = "#FFF";
		document.getElementById('copy2Title').style.color = "#C0C0C0";
		document.getElementById('copy3Title').style.color = "#C0C0C0";
		document.getElementById('copy4Title').style.color = "#C0C0C0";
		//document.getElementById('home_copy1Text').scrollTop = 0;
		var t=setTimeout(function(){fleXenv.fleXcrollMain('home_copy1Text')},100);
		
	} else if (divName == "copy2") {
		scrollTopDiv();
		visibilityOn('home_copy2');
		visibilityOff('home_copy1');
		visibilityOff('home_copy3');
		visibilityOff('home_copy4');
		visibilityOn('home_copy1_pointerOFF');
		visibilityOff('home_copy1_pointerON');
		visibilityOn('home_copy2_pointerON');
		visibilityOff('home_copy2_pointerOFF');
		visibilityOn('home_copy3_pointerOFF');
		visibilityOff('home_copy3_pointerON');
		visibilityOn('home_copy4_pointerOFF');
		visibilityOff('home_copy4_pointerON');
		document.getElementById('copy1Title').style.color = "#C0C0C0";
		document.getElementById('copy2Title').style.color = "#FFF";
		document.getElementById('copy3Title').style.color = "#C0C0C0";
		document.getElementById('copy4Title').style.color = "#C0C0C0";
		var t=setTimeout(function(){fleXenv.fleXcrollMain('home_copy2Text')},100);
		
	} else if (divName == "copy3") {
		scrollTopDiv();
		visibilityOn('home_copy3');
		visibilityOff('home_copy1');
		visibilityOff('home_copy2');
		visibilityOff('home_copy4');
		visibilityOn('home_copy1_pointerOFF');
		visibilityOff('home_copy1_pointerON');
		visibilityOn('home_copy2_pointerOFF');
		visibilityOff('home_copy2_pointerON');
		visibilityOn('home_copy3_pointerON');
		visibilityOff('home_copy3_pointerOFF');
		visibilityOn('home_copy4_pointerOFF');
		visibilityOff('home_copy4_pointerON');
		document.getElementById('copy1Title').style.color = "#C0C0C0";
		document.getElementById('copy2Title').style.color = "#C0C0C0";
		document.getElementById('copy3Title').style.color = "#FFF";
		document.getElementById('copy4Title').style.color = "#C0C0C0";
		var t=setTimeout(function(){fleXenv.fleXcrollMain('home_copy3Text')},100);
		
	} else if (divName == "copy4") {
		scrollTopDiv();
		visibilityOn('home_copy4');
		visibilityOff('home_copy1');
		visibilityOff('home_copy3');
		visibilityOff('home_copy2');
		visibilityOn('home_copy1_pointerOFF');
		visibilityOff('home_copy1_pointerON');
		visibilityOn('home_copy2_pointerOFF');
		visibilityOff('home_copy2_pointerON');
		visibilityOn('home_copy3_pointerOFF');
		visibilityOff('home_copy3_pointerON');
		visibilityOn('home_copy4_pointerON');
		visibilityOff('home_copy4_pointerOFF');
		document.getElementById('copy1Title').style.color = "#C0C0C0";
		document.getElementById('copy2Title').style.color = "#C0C0C0";
		document.getElementById('copy3Title').style.color = "#C0C0C0";
		document.getElementById('copy4Title').style.color = "#FFF";
		var t=setTimeout(function(){fleXenv.fleXcrollMain('home_copy4Text')},100);
	} 
}

function scrollTopDiv() {
	//document.getElementById('home_copy1Text').scrollTop = 500;
	//document.getElementById('home_copy2Text').scrollTop = 0;
	//document.getElementById('home_copy3Text').scrollTop = 0;
	//document.getElementById('home_copy4Text').scrollTop = 0;
	//window.location.hash="top1";	 
	//document.getElementById(divToScroll).scrollTop = 0;	
	//alert (divToScroll);
}
function showCustomScrollbar() {
	fleXenv.initByClass("flexcroll");
}

function news_picSequence_pic2Start() {
	fadeInDiv('news_imgSeq_pic2');
	fadeInDiv('news_imgSeq_picTxt2');
	fadeInDiv('news_imgSeq_pointers_2on');
	fadeOutDiv('news_imgSeq_pic1');
	fadeOutDiv('news_imgSeq_picTxt1');
	fadeOutDiv('news_imgSeq_pointers_1on');
	var t=setTimeout("visibilityOn('news_imgSeq_pic2')",700);
	var t=setTimeout("visibilityOn('news_imgSeq_picTxt2')",700);
	var t=setTimeout("visibilityOn('news_imgSeq_pointers_2on')",700);
	var t=setTimeout("visibilityOff('news_imgSeq_pic1')",700);
	var t=setTimeout("visibilityOff('news_imgSeq_picTxt1')",700);
	var t=setTimeout("visibilityOff('news_imgSeq_pointers_1on')",700);
	var t=setTimeout("news_picSequence_pic3Start()",4700);
}

function news_picSequence_pic3Start() {
	fadeInDiv('news_imgSeq_pic3');
	fadeInDiv('news_imgSeq_picTxt3');
	fadeInDiv('news_imgSeq_pointers_3on');
	fadeOutDiv('news_imgSeq_pic2');
	fadeOutDiv('news_imgSeq_picTxt2');
	fadeOutDiv('news_imgSeq_pointers_2on');
	var t=setTimeout("visibilityOn('news_imgSeq_pic3')",700);
	var t=setTimeout("visibilityOn('news_imgSeq_picTxt3')",700);
	var t=setTimeout("visibilityOn('news_imgSeq_pointers_3on')",700);
	var t=setTimeout("visibilityOff('news_imgSeq_pic2')",700);
	var t=setTimeout("visibilityOff('news_imgSeq_picTxt2')",700);
	var t=setTimeout("visibilityOff('news_imgSeq_pointers_2on')",700);
	var t=setTimeout("news_picSequence_pic4Start()",4700);
}

function news_picSequence_pic4Start() {
	fadeInDiv('news_imgSeq_pic4');
	fadeInDiv('news_imgSeq_picTxt4');
	fadeInDiv('news_imgSeq_pointers_4on');
	fadeOutDiv('news_imgSeq_pic3');
	fadeOutDiv('news_imgSeq_picTxt3');
	fadeOutDiv('news_imgSeq_pointers_3on');
	var t=setTimeout("visibilityOn('news_imgSeq_pic4')",700);
	var t=setTimeout("visibilityOn('news_imgSeq_picTxt4')",700);
	var t=setTimeout("visibilityOn('news_imgSeq_pointers_4on')",700);
	var t=setTimeout("visibilityOff('news_imgSeq_pic3')",700);
	var t=setTimeout("visibilityOff('news_imgSeq_picTxt3')",700);
	var t=setTimeout("visibilityOff('news_imgSeq_pointers_3on')",700);
	var t=setTimeout("news_picSequence_pic1Start()",4700);
}
function news_picSequence_pic1Start() {
	fadeInDiv('news_imgSeq_pic1');
	fadeInDiv('news_imgSeq_picTxt1');
	fadeInDiv('news_imgSeq_pointers_1on');
	fadeOutDiv('news_imgSeq_pic4');
	fadeOutDiv('news_imgSeq_picTxt4');
	fadeOutDiv('news_imgSeq_pointers_4on');
	var t=setTimeout("visibilityOn('news_imgSeq_pic1')",700);
	var t=setTimeout("visibilityOn('news_imgSeq_picTxt1')",700);
	var t=setTimeout("visibilityOn('news_imgSeq_pointers_1on')",700);
	var t=setTimeout("visibilityOff('news_imgSeq_pic4')",700);
	var t=setTimeout("visibilityOff('news_imgSeq_picTxt4')",700);
	var t=setTimeout("visibilityOff('news_imgSeq_pointers_4on')",700);
	var t=setTimeout("news_picSequence_pic2Start()",4700);
}


function openWinWinterSale() {
	var popupWidth=700;
    var popupHeight=680;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("special-features-and-showcases/winter-sale-2011.html","winterSale",windowFeatures);
    newWindow.focus();
}

function openWinSmallbonesPeople() {
	var popupWidth=850;
    var popupHeight=600;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("special-features-and-showcases/celebrating-smallbones-people.html","SmallbonesPeople",windowFeatures);
    newWindow.focus();
}

function openWinDesignCollaborations() {
	var popupWidth=950;
    var popupHeight=650;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("special-features-and-showcases/design-collaborations-campbell-yeoward.html","DesignCollaborations",windowFeatures);
    newWindow.focus();
}

function openWinLSpaEventOct10() {
	var popupWidth=900;
    var popupHeight=520;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("special-features-and-showcases/lspa-event_nina-campbell_oct10.html","lspaeventninacampbelloct10",windowFeatures);
    newWindow.focus();
}


function openWinChelseaFlowerShow2010() {
	var popupWidth=760;
    var popupHeight=500;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("special-features-and-showcases/chelsea-flower-show-award.html","ChelseaFlowerShow2010",windowFeatures);
    newWindow.focus();
}


function openWinDistributors() {
	var popupWidth=520;
    var popupHeight=520;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("special-features-and-showcases/distributor-network.html","DistributorNetwork",windowFeatures);
    newWindow.focus();
}
function openWinDistributors2() {
	var popupWidth=520;
    var popupHeight=520;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("../special-features-and-showcases/distributor-network.html","DistributorNetwork",windowFeatures);
    newWindow.focus();
}


function openWinAroundWorld() {
	var popupWidth=780;
    var popupHeight=565;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("special-features-and-showcases/smallbone-around-the-world.html","AroundWorld",windowFeatures);
    newWindow.focus();
}

function openWinBeaconsfieldShowroom() {
	var popupWidth=780;
    var popupHeight=565;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
	newWindow=window.open("special-features-and-showcases/beaconsfield-showroom-opening.html","Beaconsfield",windowFeatures);
    newWindow.focus();
}

function openWinNYmacassar09() {
	var popupWidth=800;
    var popupHeight=400;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("special-features-and-showcases/NY_Macassar_Launch_Sept09.html","macassaramericanlaunch",windowFeatures);
    newWindow.focus();
}

function openWinNewYorkShowroom() {
	var popupWidth=790;
    var popupHeight=465;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("special-features-and-showcases/new-york-showroom.html","newyorkshowroom",windowFeatures);
    newWindow.focus();
}

function openWinRaymondBlanc() {
	var popupWidth=780;
    var popupHeight=565;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("special-features-and-showcases/raymond-blanc/raymond-blanc_page1.html","raymondblanc",windowFeatures);
    newWindow.focus();
}

function openWinAwardShowcase() {
	var popupWidth=790;
    var popupHeight=465;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("../special-features-and-showcases/award-showcase.html","awardshowcase",windowFeatures);
    newWindow.focus();
}

function openWinPropertyRights() {
	var popupWidth=400;
    var popupHeight=485;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("intellectual-property-rights.html","intellectualpropertyrights",windowFeatures);
    newWindow.focus();
}

function openWinDisabilityPolicy() {
	var popupWidth=400;
    var popupHeight=350;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("disability-discrimination-policy.html","disabilitydiscriminationpolicy",windowFeatures);
    newWindow.focus();
}

function openWinAlchemyShowcase() {
	var popupWidth=790;
    var popupHeight=465;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("../special-features-and-showcases/alchemy-showcase.html","alchemyshowcase",windowFeatures);
    newWindow.focus();
}

function openWinShagreenShowcase() {
	var popupWidth=790;
    var popupHeight=465;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("../special-features-and-showcases/shagreen-showcase.html","shagreenshowcase",windowFeatures);
    newWindow.focus();
}

function openWinMacassarShowcase() {
	var popupWidth=790;
    var popupHeight=465;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("../special-features-and-showcases/macassar-kitchens-showcase.html","macassarshowcase",windowFeatures);
    newWindow.focus();
}

function openWinWalnutSilverShowcase() {
	var popupWidth=790;
    var popupHeight=465;
    var leftPos = parseInt((screen.availWidth/2) - (popupWidth/2));
    var topPos = parseInt((screen.availHeight/2) - (popupHeight/2));
    var windowFeatures = "width=" + popupWidth + ",height=" + popupHeight + ",status=no,resizable=no,title=yes,toolbar=no,location=no,menubar=no,scrollbars=no,left=" + leftPos + ",top=" + topPos + ",screenX=" + leftPos + ",screenY=" + topPos;
    newWindow=window.open("../special-features-and-showcases/walnut-and-silver-showcase.html","walnutsilvershowcase",windowFeatures);
    newWindow.focus();
}


function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures); }


//rollover images
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



function fadeInDiv(divToFadeIn) {
	Effect.Appear(divToFadeIn, { duration: 0.7 });
	var t=setTimeout(function(){visibilityOn(divToFadeIn)},700);
}

function fadeOutDiv(divToFadeOut) {
	Effect.Fade(divToFadeOut, { duration: 0.7 });
	var t=setTimeout(function(){visibilityOff(divToFadeOut)},700);
}

function fadeOutOtherDivs() {
	if (document.getElementById("mainPic1").style.display == "block") {
		Effect.Fade("mainPic1", { duration: 0.7 });
		Effect.Fade("mainCopy1", { duration: 0.7 });
		Effect.Fade("insideMenu_selectedBkgd1", { duration: 0.7 });
		var t=setTimeout("visibilityOff('mainPic1')",700);
		var t=setTimeout("visibilityOff('mainCopy1')",700);
		var t=setTimeout("visibilityOff('insideMenu_selectedBkgd1')",700);
	} else if (document.getElementById("mainPic2").style.display == "block") {
		Effect.Fade("mainPic2", { duration: 0.7 });
		Effect.Fade("mainCopy2", { duration: 0.7 });
		Effect.Fade("insideMenu_selectedBkgd2", { duration: 0.7 });
		var t=setTimeout("visibilityOff('mainPic2')",700);
		var t=setTimeout("visibilityOff('mainCopy2')",700);
		var t=setTimeout("visibilityOff('insideMenu_selectedBkgd2')",700);
	} else if (document.getElementById("mainPic3").style.display == "block") {
		Effect.Fade("mainPic3", { duration: 0.7 });
		Effect.Fade("mainCopy3", { duration: 0.7 });
		Effect.Fade("insideMenu_selectedBkgd3", { duration: 0.7 });
		var t=setTimeout("visibilityOff('mainPic3')",700);
		var t=setTimeout("visibilityOff('mainCopy3')",700);
		var t=setTimeout("visibilityOff('insideMenu_selectedBkgd3')",700);
	} else if (document.getElementById("mainPic4").style.display == "block") {
		Effect.Fade("mainPic4", { duration: 0.7 });
		Effect.Fade("mainCopy4", { duration: 0.7 });
		Effect.Fade("insideMenu_selectedBkgd4", { duration: 0.7 });
		var t=setTimeout("visibilityOff('mainPic4')",700);
		var t=setTimeout("visibilityOff('mainCopy4')",700);
		var t=setTimeout("visibilityOff('insideMenu_selectedBkgd4')",700);
	} else if (document.getElementById("mainPic5").style.display == "block") {
		Effect.Fade("mainPic5", { duration: 0.7 });
		Effect.Fade("mainCopy5", { duration: 0.7 });
		Effect.Fade("insideMenu_selectedBkgd5", { duration: 0.7 });
		var t=setTimeout("visibilityOff('mainPic5')",700);
		var t=setTimeout("visibilityOff('mainCopy5')",700);
		var t=setTimeout("visibilityOff('insideMenu_selectedBkgd5')",700);
	} else if (document.getElementById("mainPic1b").style.display == "block") {
		Effect.Fade("mainPic1b", { duration: 0.7 });
		Effect.Fade("mainCopy1b", { duration: 0.7 });
		Effect.Fade("outsideMenu_selectedBkgd1", { duration: 0.7 });
		var t=setTimeout("visibilityOff('mainPic1b')",700);
		var t=setTimeout("visibilityOff('mainCopy1b')",700);
		var t=setTimeout("visibilityOff('outsideMenu_selectedBkgd1')",700);
	}  else if (document.getElementById("mainPic2b").style.display == "block") {
		Effect.Fade("mainPic2b", { duration: 0.7 });
		Effect.Fade("mainCopy2b", { duration: 0.7 });
		Effect.Fade("outsideMenu_selectedBkgd2", { duration: 0.7 });
		var t=setTimeout("visibilityOff('mainPic2b')",700);
		var t=setTimeout("visibilityOff('mainCopy2b')",700);
		var t=setTimeout("visibilityOff('outsideMenu_selectedBkgd2')",700);
	}  else if (document.getElementById("mainPic3b").style.display == "block") {
		Effect.Fade("mainPic3b", { duration: 0.7 });
		Effect.Fade("mainCopy3b", { duration: 0.7 });
		Effect.Fade("outsideMenu_selectedBkgd3", { duration: 0.7 });
		var t=setTimeout("visibilityOff('mainPic3b')",700);
		var t=setTimeout("visibilityOff('mainCopy3b')",700);
		var t=setTimeout("visibilityOff('outsideMenu_selectedBkgd3')",700);
	} 
}

function toggleMenuItemsVisibility(menuItemId){
	if (menuItemId == 'menuItem1') {
		visibilityOff('menuItem1');
		visibilityOn('menuItem1selected');
		visibilityOff('menuItem2selected');
		visibilityOff('menuItem3selected');
		visibilityOff('menuItem4selected');
		visibilityOff('menuItem5selected');
		visibilityOn('menuItem2');
		visibilityOn('menuItem3');
		visibilityOn('menuItem4');
		visibilityOn('menuItem5');
	} else if (menuItemId == 'menuItem2') {
		visibilityOff('menuItem2');
		visibilityOn('menuItem2selected');
		visibilityOff('menuItem1selected');
		visibilityOff('menuItem3selected');
		visibilityOff('menuItem4selected');
		visibilityOff('menuItem5selected');
		visibilityOn('menuItem1');
		visibilityOn('menuItem3');
		visibilityOn('menuItem4');
		visibilityOn('menuItem5');
	} else if (menuItemId == 'menuItem3') {
		visibilityOff('menuItem3');
		visibilityOn('menuItem3selected');
		visibilityOff('menuItem2selected');
		visibilityOff('menuItem1selected');
		visibilityOff('menuItem4selected');
		visibilityOff('menuItem5selected');
		visibilityOn('menuItem2');
		visibilityOn('menuItem1');
		visibilityOn('menuItem4');
		visibilityOn('menuItem5');
	} else if (menuItemId == 'menuItem4') {
		visibilityOff('menuItem4');
		visibilityOn('menuItem4selected');
		visibilityOff('menuItem2selected');
		visibilityOff('menuItem3selected');
		visibilityOff('menuItem1selected');
		visibilityOff('menuItem5selected');
		visibilityOn('menuItem2');
		visibilityOn('menuItem3');
		visibilityOn('menuItem1');
		visibilityOn('menuItem5');
	} else if (menuItemId == 'menuItem5') {
		visibilityOff('menuItem5');
		visibilityOn('menuItem5selected');
		visibilityOff('menuItem2selected');
		visibilityOff('menuItem3selected');
		visibilityOff('menuItem4selected');
		visibilityOff('menuItem1selected');
		visibilityOn('menuItem2');
		visibilityOn('menuItem3');
		visibilityOn('menuItem4');
		visibilityOn('menuItem1');
	} else if (menuItemId == 'menuItem1b') {
		visibilityOff('menuItem1b');
		visibilityOn('menuItem1bselected');
		visibilityOff('menuItem2bselected');
		visibilityOff('menuItem3bselected');
		visibilityOn('menuItem2b');
		visibilityOn('menuItem3b');
	} else if (menuItemId == 'menuItem2b') {
		visibilityOff('menuItem2b');
		visibilityOn('menuItem2bselected');
		visibilityOff('menuItem1bselected');
		visibilityOff('menuItem3bselected');
		visibilityOn('menuItem1b');
		visibilityOn('menuItem3b');
	} else if (menuItemId == 'menuItem3b') {
		visibilityOff('menuItem3b');
		visibilityOn('menuItem3bselected');
		visibilityOff('menuItem2bselected');
		visibilityOff('menuItem1bselected');
		visibilityOn('menuItem2b');
		visibilityOn('menuItem1b');
	}
}

function applyScrollToDiv(divToScroll) {
	fleXenv.fleXcrollMain(divToScroll);
}

function visibilityOn(divId) {
	document.getElementById(divId).style.display = "block";
}
function visibilityOff(divId) {
	document.getElementById(divId).style.display = "none";
}

function genericNextPrevBtnAction(divToFadeOut,divToFadeIn,divToHide,divToShow,divToScroll) {
	fadeOutDiv(divToFadeOut);
	fadeInDiv(divToFadeIn);
	visibilityOff(divToHide);
	visibilityOn(divToShow);
	var t=setTimeout(function(){fleXenv.fleXcrollMain(divToScroll)},100);
	//fleXenv.fleXcrollMain(divToScroll);
}

function previousButtonAction() {
	if ((document.getElementById('changeableContent1').style.display == "block")) {
		fadeOutDiv('changeableContent1');
		fadeInDiv('changeableContent5');
		visibilityOff('popup1Buttons');
		visibilityOn('popup5Buttons');
	} else if ((document.getElementById('changeableContent2').style.display == "block")) {
		fadeOutDiv('changeableContent2');
		fadeInDiv('changeableContent1');
		visibilityOff('popup2Buttons');
		visibilityOn('popup1Buttons');
	} else if ((document.getElementById('changeableContent3').style.display == "block")) {
		fadeOutDiv('changeableContent3');
		fadeInDiv('changeableContent2');
		visibilityOff('popup3Buttons');
		visibilityOn('popup2Buttons');
	} else if ((document.getElementById('changeableContent4').style.display == "block")) {
		fadeOutDiv('changeableContent4');
		fadeInDiv('changeableContent3');
		visibilityOff('popup4Buttons');
		visibilityOn('popup3Buttons');
	} else if ((document.getElementById('changeableContent5').style.display == "block")) {
		fadeOutDiv('changeableContent5');
		fadeInDiv('changeableContent4');
		visibilityOff('popup5Buttons');
		visibilityOn('popup4Buttons');
	}
}

function nextButtonAction() {
	if ((document.getElementById('changeableContent1').style.display == "block")) {
		fadeOutDiv('changeableContent1');
		fadeInDiv('changeableContent2');
		visibilityOff('popup1Buttons');
		visibilityOn('popup2Buttons');
	} else if ((document.getElementById('changeableContent2').style.display == "block")) {
		fadeOutDiv('changeableContent2');
		fadeInDiv('changeableContent3');
		visibilityOff('popup2Buttons');
		visibilityOn('popup3Buttons');
	} else if ((document.getElementById('changeableContent3').style.display == "block")) {
		fadeOutDiv('changeableContent3');
		fadeInDiv('changeableContent4');
		visibilityOff('popup3Buttons');
		visibilityOn('popup4Buttons');
	} else if ((document.getElementById('changeableContent4').style.display == "block")) {
		fadeOutDiv('changeableContent4');
		fadeInDiv('changeableContent5');
		visibilityOff('popup4Buttons');
		visibilityOn('popup5Buttons');
	} else if ((document.getElementById('changeableContent5').style.display == "block")) {
		fadeOutDiv('changeableContent5');
		fadeInDiv('changeableContent1');
		visibilityOff('popup5Buttons');
		visibilityOn('popup1Buttons');
	}
}

function previousButtonAction_fourPics() {
	if ((document.getElementById('changeableContent1').style.display == "block")) {
		fadeOutDiv('changeableContent1');
		fadeInDiv('changeableContent4');
		visibilityOff('popup1Buttons');
		visibilityOn('popup4Buttons');
	} else if ((document.getElementById('changeableContent2').style.display == "block")) {
		fadeOutDiv('changeableContent2');
		fadeInDiv('changeableContent1');
		visibilityOff('popup2Buttons');
		visibilityOn('popup1Buttons');
	} else if ((document.getElementById('changeableContent3').style.display == "block")) {
		fadeOutDiv('changeableContent3');
		fadeInDiv('changeableContent2');
		visibilityOff('popup3Buttons');
		visibilityOn('popup2Buttons');
	} else if ((document.getElementById('changeableContent4').style.display == "block")) {
		fadeOutDiv('changeableContent4');
		fadeInDiv('changeableContent3');
		visibilityOff('popup4Buttons');
		visibilityOn('popup3Buttons');
	} else if ((document.getElementById('changeableContent1NC').style.display == "block")) {
		fadeOutDiv('changeableContent1NC');
		fadeInDiv('changeableContent4NC');
		visibilityOff('popup1ButtonsNC');
		visibilityOn('popup4ButtonsNC');
	} else if ((document.getElementById('changeableContent2NC').style.display == "block")) {
		fadeOutDiv('changeableContent2NC');
		fadeInDiv('changeableContent1NC');
		visibilityOff('popup2ButtonsNC');
		visibilityOn('popup1ButtonsNC');
	} else if ((document.getElementById('changeableContent3NC').style.display == "block")) {
		fadeOutDiv('changeableContent3NC');
		fadeInDiv('changeableContent2NC');
		visibilityOff('popup3ButtonsNC');
		visibilityOn('popup2ButtonsNC');
	} else if ((document.getElementById('changeableContent4NC').style.display == "block")) {
		fadeOutDiv('changeableContent4NC');
		fadeInDiv('changeableContent3NC');
		visibilityOff('popup4ButtonsNC');
		visibilityOn('popup3ButtonsNC');
	}
}

function nextButtonAction_fourPics() {
	if ((document.getElementById('changeableContent1').style.display == "block")) {
		fadeOutDiv('changeableContent1');
		fadeInDiv('changeableContent2');
		visibilityOff('popup1Buttons');
		visibilityOn('popup2Buttons');
	} else if ((document.getElementById('changeableContent2').style.display == "block")) {
		fadeOutDiv('changeableContent2');
		fadeInDiv('changeableContent3');
		visibilityOff('popup2Buttons');
		visibilityOn('popup3Buttons');
	} else if ((document.getElementById('changeableContent3').style.display == "block")) {
		fadeOutDiv('changeableContent3');
		fadeInDiv('changeableContent4');
		visibilityOff('popup3Buttons');
		visibilityOn('popup4Buttons');
	} else if ((document.getElementById('changeableContent4').style.display == "block")) {
		fadeOutDiv('changeableContent4');
		fadeInDiv('changeableContent1');
		visibilityOff('popup4Buttons');
		visibilityOn('popup1Buttons');
	} else if ((document.getElementById('changeableContent1NC').style.display == "block")) {
		fadeOutDiv('changeableContent1NC');
		fadeInDiv('changeableContent2NC');
		visibilityOff('popup1ButtonsNC');
		visibilityOn('popup2ButtonsNC');
	} else if ((document.getElementById('changeableContent2NC').style.display == "block")) {
		fadeOutDiv('changeableContent2NC');
		fadeInDiv('changeableContent3NC');
		visibilityOff('popup2ButtonsNC');
		visibilityOn('popup3ButtonsNC');
	} else if ((document.getElementById('changeableContent3NC').style.display == "block")) {
		fadeOutDiv('changeableContent3NC');
		fadeInDiv('changeableContent4NC');
		visibilityOff('popup3ButtonsNC');
		visibilityOn('popup4ButtonsNC');
	} else if ((document.getElementById('changeableContent4NC').style.display == "block")) {
		fadeOutDiv('changeableContent4NC');
		fadeInDiv('changeableContent1NC');
		visibilityOff('popup4ButtonsNC');
		visibilityOn('popup1ButtonsNC');
	}
}

function previousButtonAction_threePics() {
	if ((document.getElementById('changeableContent1').style.display == "block")) {
		fadeOutDiv('changeableContent1');
		fadeInDiv('changeableContent3');
		visibilityOff('popup1Buttons');
		visibilityOn('popup3Buttons');
	} else if ((document.getElementById('changeableContent2').style.display == "block")) {
		fadeOutDiv('changeableContent2');
		fadeInDiv('changeableContent1');
		visibilityOff('popup2Buttons');
		visibilityOn('popup1Buttons');
	} else if ((document.getElementById('changeableContent3').style.display == "block")) {
		fadeOutDiv('changeableContent3');
		fadeInDiv('changeableContent2');
		visibilityOff('popup3Buttons');
		visibilityOn('popup2Buttons');
	}
}

function nextButtonAction_threePics() {
	if ((document.getElementById('changeableContent1').style.display == "block")) {
		fadeOutDiv('changeableContent1');
		fadeInDiv('changeableContent2');
		visibilityOff('popup1Buttons');
		visibilityOn('popup2Buttons');
	} else if ((document.getElementById('changeableContent2').style.display == "block")) {
		fadeOutDiv('changeableContent2');
		fadeInDiv('changeableContent3');
		visibilityOff('popup2Buttons');
		visibilityOn('popup3Buttons');
	} else if ((document.getElementById('changeableContent3').style.display == "block")) {
		fadeOutDiv('changeableContent3');
		fadeInDiv('changeableContent1');
		visibilityOff('popup3Buttons');
		visibilityOn('popup1Buttons');
	}
}

function tnAction(divId) {
	document.getElementById(divId).style.display = "block";
	if ((document.getElementById('changeableContent1').style.display == "block")) {
		visibilityOn('popup1Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption1')},100);
		//fleXenv.fleXcrollMain(divToScroll);
	} else if ((document.getElementById('changeableContent2').style.display == "block")) {
		visibilityOn('popup2Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption2')},100);
	} else if ((document.getElementById('changeableContent3').style.display == "block")) {
		visibilityOn('popup3Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption3')},100);
	} else if ((document.getElementById('changeableContent4').style.display == "block")) {
		visibilityOn('popup4Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption4')},100);
	} else if ((document.getElementById('changeableContent5').style.display == "block")) {
		visibilityOn('popup5Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption5')},100);
	} else if ((document.getElementById('changeableContent6').style.display == "block")) {
		visibilityOn('popup6Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption6')},100);
	} else if ((document.getElementById('changeableContent7').style.display == "block")) {
		visibilityOn('popup7Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption7')},100);
	} else if ((document.getElementById('changeableContent8').style.display == "block")) {
		visibilityOn('popup8Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption8')},100);
	} else if ((document.getElementById('changeableContent9').style.display == "block")) {
		visibilityOn('popup9Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption9')},100);
	} else if ((document.getElementById('changeableContent10').style.display == "block")) {
		visibilityOn('popup10Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption10')},100);
	} else if ((document.getElementById('changeableContent11').style.display == "block")) {
		visibilityOn('popup11Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption11')},100);
	} else if ((document.getElementById('changeableContent12').style.display == "block")) {
		visibilityOn('popup12Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption12')},100);
	} else if ((document.getElementById('changeableContent13').style.display == "block")) {
		visibilityOn('popup13Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption13')},100);
	} else if ((document.getElementById('changeableContent14').style.display == "block")) {
		visibilityOn('popup14Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption14')},100);
	} else if ((document.getElementById('changeableContent15').style.display == "block")) {
		visibilityOn('popup15Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption15')},100);
	} else if ((document.getElementById('changeableContent16').style.display == "block")) {
		visibilityOn('popup16Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption16')},100);
	} else if ((document.getElementById('changeableContent17').style.display == "block")) {
		visibilityOn('popup17Buttons');
		var t=setTimeout(function(){fleXenv.fleXcrollMain('popupCaption17')},100);
	}
	fadeInDiv('popupContainer');
}

function brochurePreview_navClick(spreadNb) {
	brochurePreview_fadeOutOtherSpreads();
	if (spreadNb == '1') {
		fadeInDiv('changeableContent1');
		fadeInDiv('brochurePreview_nav_1on');
	} else if (spreadNb == '2') {
		fadeInDiv('changeableContent2');
		fadeInDiv('brochurePreview_nav_2on');
	} else if (spreadNb == '3') {
		fadeInDiv('changeableContent3');
		fadeInDiv('brochurePreview_nav_3on');
	} else if (spreadNb == '4') {
		fadeInDiv('changeableContent4');
		fadeInDiv('brochurePreview_nav_4on');
	} else if (spreadNb == '5') {
		fadeInDiv('changeableContent5');
		fadeInDiv('brochurePreview_nav_5on');
	} 
}
function brochurePreview_fadeOutOtherSpreads() {
	if ((document.getElementById('changeableContent0').style.display == "block")) {
		fadeOutDiv('changeableContent0');
		var t=setTimeout("resetBrochurePreviewContents('changeableContent0')",700);
		
	} else if ((document.getElementById('changeableContent1').style.display == "block")) {
		fadeOutDiv('changeableContent1');
		var t=setTimeout("resetBrochurePreviewContents('changeableContent1')",700);
		fadeOutDiv('brochurePreview_nav_1on');
		var t=setTimeout("resetBrochurePreviewContents('brochurePreview_nav_1on')",700);
		
	} else if ((document.getElementById('changeableContent2').style.display == "block")) {
		fadeOutDiv('changeableContent2');
		var t=setTimeout("resetBrochurePreviewContents('changeableContent2')",700);
		fadeOutDiv('brochurePreview_nav_2on');
		var t=setTimeout("resetBrochurePreviewContents('brochurePreview_nav_2on')",700);
		
	} else if ((document.getElementById('changeableContent3').style.display == "block")) {
		fadeOutDiv('changeableContent3');
		var t=setTimeout("resetBrochurePreviewContents('changeableContent3')",700);
		fadeOutDiv('brochurePreview_nav_3on');
		var t=setTimeout("resetBrochurePreviewContents('brochurePreview_nav_3on')",700);
		
	} else if ((document.getElementById('changeableContent4').style.display == "block")) {
		fadeOutDiv('changeableContent4');
		var t=setTimeout("resetBrochurePreviewContents('changeableContent4')",700);
		fadeOutDiv('brochurePreview_nav_4on');
		var t=setTimeout("resetBrochurePreviewContents('brochurePreview_nav_4on')",700);
		
	} else if ((document.getElementById('changeableContent5').style.display == "block")) {
		fadeOutDiv('changeableContent5');
		var t=setTimeout("resetBrochurePreviewContents('changeableContent5')",700);
		fadeOutDiv('brochurePreview_nav_5on');
		var t=setTimeout("resetBrochurePreviewContents('brochurePreview_nav_5on')",700);
	} 
}

function closePopup() {
	fadeOutDiv('popupContainer');
	var t=setTimeout("resetChangeableContents()",700);
}

function closePopup_threePics() {
	fadeOutDiv('popupContainer');
	var t=setTimeout("resetChangeableContents_threePics()",700);
}

function closePopup_fourPics() {
	fadeOutDiv('popupContainer');
	var t=setTimeout("resetChangeableContents_fourPics()",700);
}

function closeShowcase(divId) {
	fadeOutDiv(divId);
	var t=setTimeout("resetShowcaseContents()",700);
}
function closeBrochurePreview() {
	fadeOutDiv('brochurePreview_container');
	var t=setTimeout("resetBrochurePreviewContents('changeableContent1')",700);
	var t=setTimeout("resetBrochurePreviewContents('changeableContent2')",700);
	var t=setTimeout("resetBrochurePreviewContents('changeableContent3')",700);
	var t=setTimeout("resetBrochurePreviewContents('changeableContent4')",700);
	var t=setTimeout("resetBrochurePreviewContents('changeableContent5')",700);
	var t=setTimeout("resetBrochurePreviewContents('brochurePreview_nav_1on')",700);
	var t=setTimeout("resetBrochurePreviewContents('brochurePreview_nav_2on')",700);
	var t=setTimeout("resetBrochurePreviewContents('brochurePreview_nav_3on')",700);
	var t=setTimeout("resetBrochurePreviewContents('brochurePreview_nav_4on')",700);
	var t=setTimeout("resetBrochurePreviewContents('brochurePreview_nav_5on')",700);
}

function resetBrochurePreviewContents(spreadNb) {
	visibilityOff(spreadNb);
}
function resetShowcaseContents() {
	visibilityOff('mainPic1');
	visibilityOff('mainCopy1');
	visibilityOff('insideMenu_selectedBkgd1');
	visibilityOff('mainPic2');
	visibilityOff('mainCopy2');
	visibilityOff('insideMenu_selectedBkgd2');
	visibilityOff('mainPic3');
	visibilityOff('mainCopy3');
	visibilityOff('insideMenu_selectedBkgd3');
	visibilityOff('mainPic4');
	visibilityOff('mainCopy4');
	visibilityOff('insideMenu_selectedBkgd4');
	visibilityOff('mainPic5');
	visibilityOff('mainCopy5');
	visibilityOff('insideMenu_selectedBkgd5');
	visibilityOff('showcaseChelsea_insideMenu');
	visibilityOn('mainPic0');
}


function resetChangeableContents() {
	if ((document.getElementById('changeableContent1').style.display == "block")) {
		visibilityOff('popup1Buttons');
		visibilityOff('changeableContent1');
		//visibilityOff('popupCaption1');
	} else if ((document.getElementById('changeableContent2').style.display == "block")) {
		visibilityOff('popup2Buttons');
		visibilityOff('changeableContent2');
		//visibilityOff('popupCaption2');
	} else if ((document.getElementById('changeableContent3').style.display == "block")) {
		visibilityOff('popup3Buttons');
		visibilityOff('changeableContent3');
		//visibilityOff('popupCaption3');
	} else if ((document.getElementById('changeableContent4').style.display == "block")) {
		visibilityOff('popup4Buttons');
		visibilityOff('changeableContent4');
		//visibilityOff('popupCaption4');
	} else if ((document.getElementById('changeableContent5').style.display == "block")) {
		visibilityOff('popup5Buttons');
		visibilityOff('changeableContent5');
		//visibilityOff('popupCaption5');
	} else if ((document.getElementById('changeableContent6').style.display == "block")) {
		visibilityOff('popup6Buttons');
		visibilityOff('changeableContent6');
		//visibilityOff('popupCaption6');
	} else if ((document.getElementById('changeableContent7').style.display == "block")) {
		visibilityOff('popup7Buttons');
		visibilityOff('changeableContent7');
		//visibilityOff('popupCaption7');
	} else if ((document.getElementById('changeableContent8').style.display == "block")) {
		visibilityOff('popup8Buttons');
		visibilityOff('changeableContent8');
		//visibilityOff('popupCaption8');
	} else if ((document.getElementById('changeableContent9').style.display == "block")) {
		visibilityOff('popup9Buttons');
		visibilityOff('changeableContent9');
		//visibilityOff('popupCaption9');
	} else if ((document.getElementById('changeableContent10').style.display == "block")) {
		visibilityOff('popup10Buttons');
		visibilityOff('changeableContent10');
		//visibilityOff('popupCaption10');
	} else if ((document.getElementById('changeableContent11').style.display == "block")) {
		visibilityOff('popup11Buttons');
		visibilityOff('changeableContent11');
		//visibilityOff('popupCaption11');
	} else if ((document.getElementById('changeableContent12').style.display == "block")) {
		visibilityOff('popup12Buttons');
		visibilityOff('changeableContent12');
		//visibilityOff('popupCaption12');
	} else if ((document.getElementById('changeableContent13').style.display == "block")) {
		visibilityOff('popup13Buttons');
		visibilityOff('changeableContent13');
		//visibilityOff('popupCaption13');
	} else if ((document.getElementById('changeableContent14').style.display == "block")) {
		visibilityOff('popup14Buttons');
		visibilityOff('changeableContent14');
		//visibilityOff('popupCaption14');
	} else if ((document.getElementById('changeableContent15').style.display == "block")) {
		visibilityOff('popup15Buttons');
		visibilityOff('changeableContent15');
		//visibilityOff('popupCaption15');
	} 
}

function resetChangeableContents_threePics() {
	visibilityOff('popup1Buttons');
	visibilityOff('changeableContent1');
	visibilityOff('popupCaption1');
	visibilityOff('popup2Buttons');
	visibilityOff('changeableContent2');
	visibilityOff('popupCaption2');
	visibilityOff('popup3Buttons');
	visibilityOff('changeableContent3');
	visibilityOff('popupCaption3');
}

function resetChangeableContents_fourPics() {
	visibilityOff('popup1Buttons');
	visibilityOff('changeableContent1');
	visibilityOff('popupCaption1');
	visibilityOff('popup2Buttons');
	visibilityOff('changeableContent2');
	visibilityOff('popupCaption2');
	visibilityOff('popup3Buttons');
	visibilityOff('changeableContent3');
	visibilityOff('popupCaption3');
	visibilityOff('popup4Buttons');
	visibilityOff('changeableContent4');
	visibilityOff('popupCaption4');
}

function resetChangeableContents_collaborations() {
	visibilityOff('popup1Buttons');
	visibilityOff('changeableContent1');
	visibilityOff('popup2Buttons');
	visibilityOff('changeableContent2');
	visibilityOff('popup3Buttons');
	visibilityOff('changeableContent3');
	visibilityOff('popup4Buttons');
	visibilityOff('changeableContent4');
	visibilityOff('popup1ButtonsNC');
	visibilityOff('changeableContent1NC');
	visibilityOff('popup2ButtonsNC');
	visibilityOff('changeableContent2NC');
	visibilityOff('popup3ButtonsNC');
	visibilityOff('changeableContent3NC');
	visibilityOff('popup4ButtonsNC');
	visibilityOff('changeableContent4NC');
	document.getElementById('collaborations_Popup_WYevent').style.top = "650px";
}



//Flash detection on index page
function detectFlash2(flashURL,noflashURL) {
	var MM_contentVersion = 9;
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
	   && (navigator.appVersion.indexOf("Win") != -1)) {
		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
		document.write('on error resume next \n');
		document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
		document.write('</SCR' + 'IPT\> \n');
	}
	if ( MM_FlashCanPlay ) {
		window.location.replace(flashURL);
	} else{
		alert("noflash");
		window.location.replace(noflashURL);
	}

}

function slideshowBackBtn() {
	if ((document.getElementById('mainPic1').style.display == "block")) {
		return;
	} else if ((document.getElementById('mainPic2').style.display == "block")) {
		fadeOutDiv('mainPic2');
		fadeOutDiv('caption2');
		fadeOutDiv('pageNb2');
		fadeInDiv('mainPic1');
		fadeInDiv('caption1');
		fadeInDiv('pageNb1');
		visibilityOn('backBtn_disabled');
		visibilityOff('backBtn');
		visibilityOn('nextBtn');
		visibilityOff('nextBtn_disabled');
	} else if ((document.getElementById('mainPic3').style.display == "block")) {
		fadeOutDiv('mainPic3');
		fadeOutDiv('caption3');
		fadeOutDiv('pageNb3');
		fadeInDiv('mainPic2');
		fadeInDiv('caption2');
		fadeInDiv('pageNb2');
	} else if ((document.getElementById('mainPic4').style.display == "block")) {
		fadeOutDiv('mainPic4');
		fadeOutDiv('caption4');
		fadeOutDiv('pageNb4');
		fadeInDiv('mainPic3');
		fadeInDiv('caption3');
		fadeInDiv('pageNb3');
	} else if ((document.getElementById('mainPic5').style.display == "block")) {
		fadeOutDiv('mainPic5');
		fadeOutDiv('caption5');
		fadeOutDiv('pageNb5');
		fadeInDiv('mainPic4');
		fadeInDiv('caption4');
		fadeInDiv('pageNb4');
	} else if ((document.getElementById('mainPic6').style.display == "block")) {
		fadeOutDiv('mainPic6');
		fadeOutDiv('caption6');
		fadeOutDiv('pageNb6');
		fadeInDiv('mainPic5');
		fadeInDiv('caption5');
		fadeInDiv('pageNb5');
	} else if ((document.getElementById('mainPic7').style.display == "block")) {
		fadeOutDiv('mainPic7');
		fadeOutDiv('caption7');
		fadeOutDiv('pageNb7');
		fadeInDiv('mainPic6');
		fadeInDiv('caption6');
		fadeInDiv('pageNb6');
	} else if ((document.getElementById('mainPic8').style.display == "block")) {
		fadeOutDiv('mainPic8');
		fadeOutDiv('caption8');
		fadeOutDiv('pageNb8');
		fadeInDiv('mainPic7');
		fadeInDiv('caption7');
		fadeInDiv('pageNb7');
	} else if ((document.getElementById('mainPic9').style.display == "block")) {
		fadeOutDiv('mainPic9');
		fadeOutDiv('caption9');
		fadeOutDiv('pageNb9');
		fadeInDiv('mainPic8');
		fadeInDiv('caption8');
		fadeInDiv('pageNb8');
		visibilityOff('backBtn_disabled');
		visibilityOn('backBtn');
		visibilityOn('nextBtn');
		visibilityOff('nextBtn_disabled');
	}
}

function slideshowNextBtn() {
	if ((document.getElementById('mainPic1').style.display == "block")) {
		fadeOutDiv('mainPic1');
		fadeOutDiv('caption1');
		fadeOutDiv('pageNb1');
		fadeInDiv('mainPic2');
		fadeInDiv('caption2');
		fadeInDiv('pageNb2');
		visibilityOff('backBtn_disabled');
		visibilityOn('backBtn');
		visibilityOn('nextBtn');
		visibilityOff('nextBtn_disabled');
	} else if ((document.getElementById('mainPic2').style.display == "block")) {
		fadeOutDiv('mainPic2');
		fadeOutDiv('caption2');
		fadeOutDiv('pageNb2');
		fadeInDiv('mainPic3');
		fadeInDiv('caption3');
		fadeInDiv('pageNb3');
	} else if ((document.getElementById('mainPic3').style.display == "block")) {
		fadeOutDiv('mainPic3');
		fadeOutDiv('caption3');
		fadeOutDiv('pageNb3');
		fadeInDiv('mainPic4');
		fadeInDiv('caption4');
		fadeInDiv('pageNb4');
	} else if ((document.getElementById('mainPic4').style.display == "block")) {
		fadeOutDiv('mainPic4');
		fadeOutDiv('caption4');
		fadeOutDiv('pageNb4');
		fadeInDiv('mainPic5');
		fadeInDiv('caption5');
		fadeInDiv('pageNb5');
	} else if ((document.getElementById('mainPic5').style.display == "block")) {
		fadeOutDiv('mainPic5');
		fadeOutDiv('caption5');
		fadeOutDiv('pageNb5');
		fadeInDiv('mainPic6');
		fadeInDiv('caption6');
		fadeInDiv('pageNb6');
	} else if ((document.getElementById('mainPic6').style.display == "block")) {
		fadeOutDiv('mainPic6');
		fadeOutDiv('caption6');
		fadeOutDiv('pageNb6');
		fadeInDiv('mainPic7');
		fadeInDiv('caption7');
		fadeInDiv('pageNb7');
	} else if ((document.getElementById('mainPic7').style.display == "block")) {
		fadeOutDiv('mainPic7');
		fadeOutDiv('caption7');
		fadeOutDiv('pageNb7');
		fadeInDiv('mainPic8');
		fadeInDiv('caption8');
		fadeInDiv('pageNb8');
	} else if ((document.getElementById('mainPic8').style.display == "block")) {
		fadeOutDiv('mainPic8');
		fadeOutDiv('caption8');
		fadeOutDiv('pageNb8');
		fadeInDiv('mainPic9');
		fadeInDiv('caption9');
		fadeInDiv('pageNb9');
		visibilityOff('backBtn_disabled');
		visibilityOn('backBtn');
		visibilityOff('nextBtn');
		visibilityOn('nextBtn_disabled');
	} else if ((document.getElementById('mainPic9').style.display == "block")) {
		return;
	}
}


function closePopup_collaborations(popupId) {
	fadeOutDiv(popupId);
	var t=setTimeout("resetChangeableContents_collaborations()",700);
}

function tnAction_collaborations(popupId,divId) {
	document.getElementById(divId).style.display = "block";
	if ((document.getElementById('changeableContent1').style.display == "block")) {
		visibilityOn('popup1Buttons');
	} else if ((document.getElementById('changeableContent2').style.display == "block")) {
		visibilityOn('popup2Buttons');
	} else if ((document.getElementById('changeableContent3').style.display == "block")) {
		visibilityOn('popup3Buttons');
	} else if ((document.getElementById('changeableContent4').style.display == "block")) {
		visibilityOn('popup4Buttons');
	} else if ((document.getElementById('changeableContent1NC').style.display == "block")) {
		visibilityOn('popup1ButtonsNC');
	} else if ((document.getElementById('changeableContent2NC').style.display == "block")) {
		visibilityOn('popup2ButtonsNC');
	} else if ((document.getElementById('changeableContent3NC').style.display == "block")) {
		visibilityOn('popup3ButtonsNC');
	} else if ((document.getElementById('changeableContent4NC').style.display == "block")) {
		visibilityOn('popup4ButtonsNC');
	}
	Effect.Appear(popupId, { duration: 0.7 });
}

function collaborations_cloveInvite() {
	fadeOutDiv('collaborations_Popup_WYevent');
	visibilityOn('collaborations_Popup_wYeoward');
	visibilityOn('changeableContent4');
	visibilityOn('popup4Buttons');
}
