//loadAllRotationImgBoxes

var curHeader = null;
function switchYearTab(yearHeader) {
	var oldHeader = curHeader;
	closeBox();
	if (oldHeader)
		if (yearHeader == oldHeader) return false;
		
	var yearBox = yearHeader.parentNode;
	var yearBoxContent = yearHeader.nextSibling;

	if(yearBox.className.indexOf("activeYear") < 0) {
		var maxHeight = yearBoxContent.offsetHeight + yearBox.offsetHeight;
		var duration = (maxHeight < 300)? 300:maxHeight;
		
		if(yearHeader.style.backgroundImage.indexOf('_blue') < 0) {
			yearHeader.style.backgroundImage = yearHeader.style.backgroundImage.replace('.gif', '_blue.gif');
		}
		//addClass(yearBox, "activeYear");
		curHeader = yearHeader;
		
		var yearBoxAnim = getAnimationManager().add(yearBox);
		yearBoxAnim.setAction({method: "resizeTo", height: maxHeight, duration: duration, ease: 0.4});
		yearBoxAnim.play();

		var yearBoxContentAnim = getAnimationManager().add(yearBoxContent);
		yearBoxContentAnim.setAction({method: "fade", alpha: 100, duration: duration, ease: 0.4});
		yearBoxContentAnim.play();

		if(isIE) {
			var imageRotationBox = getChildByClassName(yearBox, "sp-ExhibitionImageRotation");
			if(imageRotationBox){
				imageRotationBox.style.display = "block";
			}
		}
	}
	return false;
}

function closeBox() {
	if (curHeader){
		var yearBox = curHeader.parentNode;
		var yearBoxContent = curHeader.nextSibling;
		var maxHeight = yearBoxContent.offsetHeight + yearBox.offsetHeight;
		var duration = (maxHeight < 300)? 300:maxHeight;
		
		if(curHeader.style.backgroundImage.indexOf('_blue') > -1) {
			curHeader.style.backgroundImage = curHeader.style.backgroundImage.replace('_blue.gif', '.gif');
		}

		//removeClass(yearBox, "activeYear");
		curHeader = null;
		
		var yearBoxAnim = getAnimationManager().add(yearBox, resizeOnly=true);
		yearBoxAnim.setAction({method: "revertSize", duration: duration, ease: 4});
		yearBoxAnim.play();
		
		var yearBoxContentAnim = getAnimationManager().add(yearBoxContent, resizeOnly=true);
		yearBoxContentAnim.setAction({method: "fade", alpha: 0, duration: duration, ease: 4});
		yearBoxContentAnim.play();
		
		if(isIE) {
			var imageRotationBox = getChildByClassName(yearBox, "sp-ExhibitionImageRotation");
			if(imageRotationBox){
				imageRotationBox.style.display = "none";
			}
		}
	}
}

var lastLinkObj = null;
var firstAlreadyClosed = false;
var boxSeeMoreBtn = null;
function expandNav(linkObject, side) {
	if(side == "left") var menuToExpand = linkObject.nextSibling.nextSibling;
	else var menuToExpand = linkObject.nextSibling;
	
	if(linkObject.id == "activeMenuSection") linkObject.id = null;
	else 
		if(lastLinkObj != linkObject) {
		firstAlreadyClosed = true;
		collapseLastNav();
		lastLinkObj = linkObject;
	} else {
		lastLinkObj = null;
	}
	
	var maxHeight = menuToExpand.childNodes[0].offsetHeight;
	var duration = (maxHeight < 300)? 300 : maxHeight;
	
	if(linkObject.className.indexOf("expanded") > -1) {
		removeClass(linkObject, "expanded");
		
		menuToExpand.style.overflow = "hidden";
		var menuAnim = getAnimationManager().add(menuToExpand);
		boxSeeMoreBtn = menuToExpand.childNodes[0].lastChild;
		menuAnim.setAction({method: "resizeTo", height: 0, duration: duration, ease: 0.4});
		menuAnim.setCallBack(function() { hideSeeMore(); });
		menuAnim.play();
		
	} else {
		addClass(linkObject, "expanded");
		
		var menuAnim = getAnimationManager().add(menuToExpand);
		menuAnim.setAction({method: "resizeTo", height: maxHeight, duration: duration, ease: 0.4});
		menuAnim.play();
	}

	return false;
}

function collapseLastNav(callBackFunc) {
	
	if(lastLinkObj == null && !$("activeMenuSection")) {
		if(callBackFunc) callBackFunc();
		return;
	}
	
	var linkToClose = ($("activeMenuSection")) ? $("activeMenuSection") : lastLinkObj;

	if($("activeMenuSection")) {
		linkToClose.id = null;
	} else {
		lastLinkObj = null;
	}
	
	var menuToExpand = linkToClose.nextSibling;
	var maxHeight = menuToExpand.childNodes[0].offsetHeight;
	var duration = (maxHeight < 300)? 300 : maxHeight;

	removeClass(linkToClose, "expanded");	
	menuToExpand.style.overflow = "hidden";
	
	var menuAnim = getAnimationManager().add(menuToExpand);
	boxSeeMoreBtn = linkToClose.nextSibling.childNodes[0].lastChild;
	menuAnim.setAction({method: "resizeTo", height: 0, duration: duration, ease: 0.4});
	if(callBackFunc) menuAnim.setCallBack(function(){ callBackFunc(); hideSeeMore();});
	else menuAnim.setCallBack(function(){ hideSeeMore();});
	menuAnim.play();
}

function hideSeeMore() {
	if (boxSeeMoreBtn && (boxSeeMoreBtn.className.indexOf("item_see_more") > -1)) {
		removeClass(boxSeeMoreBtn,"hidden");
		addClass(boxSeeMoreBtn.previousSibling,"hidden");
		boxSeeMoreBtn = null;
	}
}

addEvent(window, "onload", collapseActiveNav);
function collapseActiveNav() {
	if(!firstAlreadyClosed || !$("activeMenuSection")) return;
	collapseLastNav();
}

var linkToChange = null;
function gotoBlog(link_elem) {
	var slideBox = $("bannerBox");
	if (!slideBox/* || (slideBox.className.indexOf("hp-collapsedBanner") > -1)*/) {
		linkToChange = link_elem.href;
		collapseLastNav(callBackChangePage);
	}
	else showSlideShow($("menuBlog").className.indexOf("menuHome") > -1);

	return false;
}

function callBackChangePage() {
	location.href = linkToChange;
}

function expandWBBNote(linkObj, noteId) {
	if($(noteId).className.indexOf("hidden") < 0) {
		addClass(noteId, "hidden");
		linkObj.innerHTML = '[+]';
	} else {
		removeClass(noteId, "hidden");
		linkObj.innerHTML = '[-]';
	}

	return false;
}

var currentArrow = 1;

function swapWorkImage(linkObj, videoLink) {
	removeProductPlayer();
	
	var imageView = $("wbbImageView");
	var objList = linkObj.parentNode.childNodes;
	var classArray = new Array("activeImg1", "activeImg2", "activeImg3");
	for(var i=0; i < objList.length; i++) {
		if(objList[i].tagName == "A")
		if(objList[i].className.indexOf("activeImg") > -1){
			objList[i].className = "";
			break;
		}
	}
	
	var currentClass = currentArrow % classArray.length;
	currentArrow++;
	
	linkObj.className = classArray[currentClass];
	var thumbImage = (linkObj.getElementsByTagName("img"))[0];
	var sourceName = (thumbImage.src.indexOf("thumbs/") > -1) ? thumbImage.src.replace("thumbs/", "fullsize/") : thumbImage.src.replace("_thumb", "");
	
	var ratio = thumbImage.clientWidth/thumbImage.clientHeight
	
	imageView.style.display = "none";
	
	imageView.src = sourceName;
	if(ratio <= 1.39) imageView.className = "wbbMaxHeight"; //1.39 Ratio is 648x465px
	else imageView.className = "wbbMaxWidth";
	imageView.onload = function() { imageView.style.display = ""; }
	
	if(videoLink != '') {
		addProductPlayerHandler(videoLink);
	}
	
	return false;
}

function showProductPlayer(url) {
	if(url.indexOf("www.ooyala.com")>-1) url = url.substr(url.lastIndexOf('embedCode=') + String('embedCode=').length, url.length);
	url = url.replace("[amp]", "&");
	if(url.indexOf("autoplay")<0) url = url + "&autoplay=1";
	
	var swfObjectBox = document.createElement("div");
	swfObjectBox.id = "swfBox";
	document.getElementById("videoBox").appendChild(swfObjectBox);
	
	addSWFObjectProductPage(url, "swfBox", true);
	document.getElementById("videoBox").style.display = "block";
}

function addProductPlayerHandler(url) {
	
	var imageShadow = document.getElementById("imageShadow");
	imageShadow.onclick = function(){ showProductPlayer(url) };
	imageShadow.style.cursor = "pointer";
}

function removeProductPlayer(){
	if(document.getElementById("swfBox")) {
		var swfBox = document.getElementById("swfBox");
		document.getElementById("videoBox").removeChild(document.getElementById("swfBox"));
		document.getElementById("videoBox").style.display = "none";
	}
	
	var imageShadow = document.getElementById("imageShadow");
	imageShadow.onclick = function(){};
	imageShadow.style.cursor = "default";
}



function showNexPic(button) {
	var imgArray = button.parentNode.getElementsByTagName("img");
	for( var i=0; i < imgArray.length; i++) {
		if(imgArray[i].className.indexOf("hidden") < 0){
			addClass(imgArray[i], "hidden");
			if(i == imgArray.length-1) {
				removeClass(imgArray[0], "hidden");
			} else {
				removeClass(imgArray[i+1], "hidden");
			}
			
			break;
		}
	}

	return false;
}


function openYvesBeharMovie() {
	var modalDialog = getModalDialogManager();
	modalDialog.open("sp-YvesBeharPlayer");
}

function changeHidden(hidObject,showObject) {
	addClass(hidObject, "hidden");
	removeClass(showObject, "hidden");
	return false;
}

var shopByProductIdCounter = 0;
function showAnchor(elem) {
	
	if(!elem.id) elem.id = "shopByProduct" + shopByProductIdCounter++;
	
	if(!elem.getAttribute("timeout")) {
		var linkArray = elem.getElementsByTagName("a");
		
		var anchorAnim1 = getAnimationManager().add(linkArray[0]);
		anchorAnim1.setAction({method: "fade", alpha: 70, duration: 300});
	
		var anchorAnim2 = getAnimationManager().add(linkArray[1]);
		anchorAnim2.setAction({method: "fade", alpha: 70, duration: 300});
		
		anchorAnim1.play();
		anchorAnim2.play();
		
		for(var i=0; i<linkArray.length; i++) {
			linkArray[i].onmouseover = function() {
				var anchorAnim = getAnimationManager().add(this);
				anchorAnim.setAction({method: "fade", alpha: 100, duration: 300});
				anchorAnim.play();
			}
			
			linkArray[i].onmouseout = function() {
				var anchorAnim = getAnimationManager().add(this);
				anchorAnim.setAction({method: "fade", alpha: 70, duration: 300});
				anchorAnim.play();
			}
		}
	
		elem.onmouseout = function() {
			elem.setAttribute("timeout", window.setTimeout("hideAnchor('" + elem.id + "')", 50));
		}
	} else {
		window.clearTimeout(elem.getAttribute("timeout"));
	}
}

function hideAnchor(id) {
	var elem = $(id);
	var linkArray = elem.getElementsByTagName("a");
	elem.setAttribute("timeout", null);
					  
	var anchorAnim1 = getAnimationManager().add(linkArray[0]);
	anchorAnim1.setAction({method: "fade", alpha: 0, duration: 300});

	var anchorAnim2 = getAnimationManager().add(linkArray[1]);
	anchorAnim2.setAction({method: "fade", alpha: 0, duration: 300});

	anchorAnim1.play();
	anchorAnim2.play();
}

function objGoogleMap (src,href) {
	this.src = src;
	this.href = href;
}

function showGoogleMap(link_numb) {
	var links = new Array(2);
	links[0] = new objGoogleMap ("http://maps.google.com/maps?f=q&hl=en&geocode=&q=528+Folsom+Street,+san+francisco,+ca&sll=37.0625,-95.677068&sspn=45.467317,76.025391&ie=UTF8&g=528+Folsom+Street,+san+francisco,+ca&s=AARTsJqFXELd0J_ESg6ZwhWue0JRhaJSHw&ll=37.797238,-122.391386&spn=0.025772,0.052786&z=14&iwloc=addr&output=embed","http://maps.google.com/maps?f=q&hl=en&geocode=&q=528+Folsom+Street,+san+francisco,+ca&sll=37.0625,-95.677068&sspn=45.467317,76.025391&ie=UTF8&g=528+Folsom+Street,+san+francisco,+ca&ll=37.797238,-122.391386&spn=0.025772,0.052786&z=14&iwloc=addr&source=embed");
	links[1] = new objGoogleMap ("http://maps.google.com/maps?f=q&hl=en&geocode=&q=415+Broadway,+new+york,+new+york&sll=40.643936,-73.890017&sspn=0.010697,0.018561&g=415+Broadway,+new+york,+new+york&ie=UTF8&s=AARTsJr8vmxIqXJalVek8lemZRBxkM8Pow&ll=40.728982,-73.997984&spn=0.024716,0.052786&z=14&iwloc=addr&output=embed","http://maps.google.com/maps?f=q&hl=en&geocode=&q=415+Broadway,+new+york,+new+york&sll=40.643936,-73.890017&sspn=0.010697,0.018561&g=415+Broadway,+new+york,+new+york&ie=UTF8&ll=40.728982,-73.997984&spn=0.024716,0.052786&z=14&iwloc=addr&source=embed");
	document.getElementById("map_frame").src = links[link_numb].src;
	document.getElementById("map_link").href = links[link_numb].href;
	removeClass("map_frame", "hidden");
	removeClass("map_link", "hidden");
}

function pushFuncToQuerry(func) {
	if(typeof(functionsArray) == "undefined") func.call();
	else functionsArray.push(func);	
}

function addOoyalaPlayer(url,id,img,alt) {
	if(url.indexOf("www.ooyala.com")>-1) url = url.substr(url.lastIndexOf('embedCode=') + String('embedCode=').length, url.length);
	url = url.replace("[amp]", "&");
	if(url.indexOf("autoplay")<0) url = url + "&autoplay=1";

	if (img) {
		if (!alt) alt = "";
		var func = function(){
			var videoBox = document.getElementById(id);
			var new_img = document.createElement("IMG");
			new_img.src = img;
			new_img.alt = alt;
			new_img.onclick = function () {addSWFObject1(url, id);}
			var isIE = (navigator.appName.toLowerCase().indexOf('internet explorer')+1?1:0);
			if(isIE) new_img.style.filter = "alpha(opacity=0)";
			else{
				new_img.style.opacity = 0;
				new_img.style.MozOpacity = 0;
			} 
			videoBox.appendChild(new_img);
			var imgAnim = getAnimationManager().add(new_img);
			imgAnim.setAction({method: "fade", alpha: 100, duration: 2000});
			imgAnim.play();
		};
	}
	else{
		var func = function(){addSWFObject1(url, id);}
	}
	if(typeof(functionsArray) == "undefined") func.call();
	else functionsArray.push(func);
}


function addSWFObjectProductPage(url, id, trasparency) {
	var flashvars = {};
        flashvars.embedCode = url;
	var params = {};
	params.movie = "http://www.ooyala.com/player.swf";
	params.quality = "high";
	params.bgcolor = "#000000";
	params.allowFullScreen = "true";
	params.allowScriptAccess = "none";
	if(!trasparency) params.wmode = "transparent";
	params.autoplay = "1";
	var attributes = {};
	swfobject.embedSWF("http://www.ooyala.com/player.swf?version=2&embedCode="+url, id, "648", "465", "9.0.0", "scripts/expressInstall.swf", flashvars, params, attributes);
}

function addSWFObject1(url, id, trasparency) {
	var flashvars = {};
        flashvars.embedCode = url;
	var params = {};
	params.movie = "http://www.ooyala.com/player.swf";
	params.quality = "high";
	params.bgcolor = "#000000";
	params.allowFullScreen = "true";
	params.allowScriptAccess = "none";
	if(!trasparency) params.wmode = "transparent";
	params.autoplay = "1";
	var attributes = {};
	swfobject.embedSWF("http://www.ooyala.com/player.swf?version=2&embedCode="+url, id, "598", "450", "9.0.0", "scripts/expressInstall.swf", flashvars, params, attributes);
}

function addYouTubePlayer(url, id) {
	var func = function(){addSWFObject(url, id)};
	if(typeof(functionsArray) == "undefined") func.call();
	else functionsArray.push(func);
}

function addSWFObject(url, id) {
	var flashvars = {};
	var params = {};
	params.allowFullScreen = "true";
	params.allowScriptAccess = "always";
	var attributes = {};
	swfobject.embedSWF(url, id, "425", "344", "9.0.0", "scripts/expressInstall.swf", flashvars, params, attributes);
}

function openExternalLink(linkObj) {
	window.open(linkObj.href);
	return false;
}

function hpShowFullStory(linkObj) {
	var currentBlock = linkObj.parentNode;
	var storyBox = linkObj.parentNode.parentNode;
	
	while(currentBlock.className.indexOf("hp-ShortStory") < 0 && currentBlock.className.indexOf("hp-FullStory") < 0) {
		currentBlock = currentBlock.parentNode;
	}
	
	while(storyBox.className.indexOf("hp-News") < 0) {
		storyBox = storyBox.parentNode;
	}
	
	if(currentBlock.className.indexOf("hp-ShortStory") < 0) {
		currentBlock.style.display = "none";
		var shortStory = getChildByClassName(storyBox, "hp-ShortStory");
		var linkArray = shortStory.getElementsByTagName("a");
		linkArray[linkArray.length-1].style.display = "inline";
		//getChildByClassName(storyBox, "hp-ShortStory").style.display = "block";
	} else {
		linkObj.style.display = "none"
		getChildByClassName(storyBox, "hp-FullStory").style.display = "block";
	}

	return false;
}

function pushSlideshow() {
	window.setInterval(changeHomePageSlide, 4000)
}

function changeHomePageSlide() {
	var slideShowBox = $("hpSlideShow");
	var imgArray = slideShowBox.getElementsByTagName("img");
	var imgAlt = "";
	
	for( var i=0; i < imgArray.length; i++) {
		if(imgArray[i].className.indexOf("hidden") < 0){
			//addClass(imgArray[i], "hidden");
			
			var currImg = imgArray[i];
			var nextImg = (i == imgArray.length-1) ? imgArray[0] : imgArray[i+1];
			
			currImg.style.zIndex = 2;
			nextImg.style.zIndex = 1;
			removeClass(nextImg, "hidden");
			changeOpac(100, nextImg);
			
			var currImgAnim = getAnimationManager().add(currImg);
			currImgAnim.setAction({method: "fadeOut", alpha: 0, duration: 1000});
			currImgAnim.setCallBack(callBackSlideshow);
			currImgAnim.play();
			break;
		}
	}

}

function callBackSlideshow(img) {
	addClass(img, "hidden");
}

function showPracticeImg(btn)	{
	var btnNext = document.getElementById("practicesNextImg");
	var btnPrev = document.getElementById("practicesPrevImg");
	var imgBox = document.getElementById("practicesImgBox");
	var imgArray = imgBox.getElementsByTagName("img");
	if (btn == btnNext) {
		if (btnNext.className.indexOf("ImgNextBlue") < 0){ return false;}
		for( var i=0; i < imgArray.length; i++) {
			if (imgArray[i].className.indexOf("hidden") < 0){
				addClass(imgArray[i], "hidden");
				removeClass(btnPrev,"ImgPrev");
				addClass(btnPrev,"ImgPrevBlue");
				if (i < imgArray.length-1) {removeClass(imgArray[i+1], "hidden");}
				if (i == imgArray.length-2) {
					removeClass(btnNext,"ImgNextBlue");
					addClass(btnNext,"ImgNext");
				}
				return false;
			}
		}
	}	
	if (btn == btnPrev) {
		if (btnPrev.className.indexOf("ImgPrevBlue") < 0){ return false;}
		for( var i=0; i < imgArray.length; i++) {
			if (imgArray[i].className.indexOf("hidden") < 0){
				addClass(imgArray[i], "hidden");
				removeClass(btnNext,"ImgNext");
				addClass(btnNext,"ImgNextBlue");
				if (i > 0) {removeClass(imgArray[i-1], "hidden");}
				if (i == 1) {
					removeClass(btnPrev,"ImgPrevBlue");
					addClass(btnPrev,"ImgPrev");
				}
				return false;
			}
		}
	}
}

var download_pdf = false;
function ShowDownloadPdf(CoverBox){
	if (download_pdf) return;
	var pdfBox = CoverBox.getElementsByTagName("DIV");
	if (pdfBox[0]) {
		var currImgAnim = getAnimationManager().add(pdfBox[0]);
		currImgAnim.setAction({method: "fade", alpha: 90, duration: 1000});
		currImgAnim.play();
		download_pdf = true;
		if (!CoverBox.onmouseout) {
			CoverBox.onmouseout = function() {
				var pdfBox = this.getElementsByTagName("DIV");
				if (pdfBox[0]) {
					var currImgAnim = getAnimationManager().add(pdfBox[0]);
					currImgAnim.setAction({method: "fade", alpha: 0, duration: 1000});
					currImgAnim.play();
					download_pdf = false;
				}
			}
		}
	}
}

function switchSiteVersion(preview) {
	var href = window.location.href;
	var param = "showAll=true";
	if(!preview) {	
		var index = href.indexOf(param)-1;
		if(index > -1) {
			window.location.href = href.slice(0, index)+href.slice(index+param.length+1, href.length);
		}
	} else {
		if(href.indexOf(param) < 0) {
			if(href.indexOf("?") < 0) {
				if(href.indexOf("brands-") < 0 && href.indexOf("products-") < 0 && href.indexOf("categories-") < 0 && href.indexOf("category-") < 0 && href.indexOf("study-") < 0) {
					window.location.href = href + "?" + param;
				} else {
					window.location.href = href + "&" + param;
				}
			} else {
				window.location.href = href + "&" + param;
			}
		}
	}
	
	return false;
}

function clickSeeMore(elem) {	
	var menuToExpand = elem.parentNode.parentNode;
	var box = elem.previousSibling;
	var menuAnim = getAnimationManager().add(menuToExpand);
	var duration = (box.offsetHeight < 300)? 300 : box.offsetHeight;
	
	removeClass(box,"hidden");
	addClass(elem,"hidden");
	
	var newHeight = menuToExpand.childNodes[0].offsetHeight;
	
	menuAnim.setAction({method: "resizeTo", height: newHeight, duration: duration, ease: 0.4});
	menuAnim.play();
		
	return false;	
}

function blogRollOut() {
	var btn = $("btnBackToHome");
	if (btn) {
		showSlideShow(true);
		btn.style.display = "none";
		return false;
	}
	else return true;
}

function showSlideShow(visible){
	var bannerInlineBox = $("bannerInlineBox");
	var height = bannerInlineBox.offsetHeight;
	var homeBanner = getAnimationManager().add("bannerBox");
	if (visible) homeBanner.setAction({method: "resizeTo", height: height, duration: 1000});
	else if ($("btnBackToHome").style.display == "none") homeBanner.setAction({method: "resizeTo", height: 0, duration: 1000});
	homeBanner.play();
	makeBlogPageLinks(visible);
	if (visible) $("btnBackToHome").style.display = "none";
	else $("btnBackToHome").style.display = "block";
}

function makeBlogPageLinks(home_page) {
	var page_links = $("BlogPageNumber").getElementsByTagName("a");
	var link_for_edit = null;
	var pos = 0;
	if (home_page) var blog = 'false';
	else var blog = 'true';
	for (var i=0;i<page_links.length;i++) {
		pos = page_links[i].href.indexOf("blog=");
		if (page_links[i].href.slice(pos+5,pos+6) == "f") page_links[i].href = page_links[i].href.slice(0,pos+5)+blog+page_links[i].href.slice(pos+10);
		else page_links[i].href = page_links[i].href.slice(0,pos+5)+blog+page_links[i].href.slice(pos+9);
	}
	
	var menuItem = $("menuBlog");
	if (home_page) removeClass(menuItem,"menuHome");
	else addClass(menuItem,"menuHome");
}

function openPressMovie(url) {
	addPressPlayer(url);
	var modalDialog = getModalDialogManager();
	modalDialog.open("sp-pressPlayer");
	
	return false;
}

function closePressMovie() {
	getModalDialogManager().close();
	document.getElementById("playerBox").removeChild(document.getElementById("swfBox"));
}

function addPressPlayer(url) {
	if(url.indexOf("www.ooyala.com")>-1) url = url.substr(url.lastIndexOf('embedCode=') + String('embedCode=').length, url.length);
	url = url.replace("[amp]", "&");
	if(url.indexOf("autoplay")<0) url = url + "&autoplay=1";
	
	var swfObjectBox = document.createElement("div");
	swfObjectBox.id = "swfBox";
	document.getElementById("playerBox").appendChild(swfObjectBox);
	
	addSWFObject1(url, "swfBox", true);
}
