/*
Button Mapping:
	Main left nav buttons:
		activeButton[1]
		auraButtons[1][*]
	The Aura Difference Bottom Tabs:
		activeButton[3]
		auraButtons[2][*] 
		auraButtons[3][*] 
	Affinity Colors Scrolling Images:
		activeButton[4]
		auraButtons[4][*] 
		auraButtons[5][*] 
		auraButtons[6][*] 
	Affinity Colors Icons for images in collection
		activeButton[7]
		auraButtons[7][*] 
	Aura Product Information Cans
		activeButton[9]
		auraButtons[9][*]
		auraButtons[10][*]
*/

//Fade
aureSlideshowAds=[];
var auraTransitionComplete = 1;
function fadeImages(newImage) {
	try{
		currentImageLoadCheck = newImage - 1;
		if (currentImageLoadCheck == -1) currentImageLoadCheck = auraAffinityColorsImageCollection.length-1;
		
		clearTimeout(auraSlideshowTimer);
		if (aureSlideshowAds[currentImageLoadCheck] && (aureSlideshowAds[currentImageLoadCheck].complete || aureSlideshowAds[currentImageLoadCheck].complete==null)) {
			opacity('auraAffinityColorPaletteImageOnTop', 0, 100, 700);
			setTimeout("fadeImagesComplete('" + newImage + "')",700);
		} else {
			aureSlideshowAds[currentImageLoadCheck] = new Image;
			aureSlideshowAds[currentImageLoadCheck].src = auraAffinityColorsImageCollection[currentImageLoadCheck];
			setTimeout("fadeImages('"+newImage+"')",500);
		}
	}catch(err){}
}
function fadeImagesComplete(newImage) {
	try{
		status='Done';
		fadeImagesSwapImages(newImage);
		auraTransitionComplete=1;
		//for ie
		try {
			aureSlideshowAds[newImage].clear(); 
		} catch(err) {}
		//for firefox
		try {
			aureSlideshowAds.clear();
		} catch(err) {}	
		if (auraSlideshowTimerControlState == "on") {
			auraSlideshowTimer = setTimeout("auraAffinityColorsStartSlideShow()", auraSlideshowTimerTransitionTime);
		}
	}catch(err){}	
}
function fadeImagesSwapImages(newImage) {
	try{
		var object = document.getElementById('auraAffinityColorPaletteImageOnTop');
		var backgroundObject = document.getElementById('auraAffinityColorPaletteImage');
		backgroundObject.style.backgroundImage = 'url('+object.src+')';
		opacity('auraAffinityColorPaletteImageOnTop', 100, 0, 1);
		setTimeout("document.getElementById('auraAffinityColorPaletteImageOnTop').src = auraAffinityColorsImageCollection["+newImage+"]",100);
	}catch(err){}
}
function opacity(id, opacStart, opacEnd, millisec) {
	//speed for each frame
	var speed = Math.round(millisec / 100);
	var timer = 0;

	//determine the direction for the blending, if start and end are the same nothing happens
	if(opacStart > opacEnd) {
		for(i = opacStart; i >= opacEnd; i--) {
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	} else if(opacStart < opacEnd) {
		for(i = opacStart; i <= opacEnd; i++)
			{
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	}
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
	try{
		var object = document.getElementById(id).style; 
		object.opacity = (opacity / 100);
		object.MozOpacity = (opacity / 100);
		object.KhtmlOpacity = (opacity / 100);
		object.filter = "alpha(opacity=" + opacity + ")";
	}catch(e){}
}

function currentOpac(id, opacEnd, millisec) {
	//standard opacity is 100
	var currentOpac = 100;
	
	//if the element has an opacity set, get it
	if(document.getElementById(id).style.opacity < 100) {
		currentOpac = document.getElementById(id).style.opacity * 100;
	} 
	
	//call for the function that changes the opacity
	opacity(id, currentOpac, opacEnd, millisec)
}

//buttonSliding
function getElementbyClass(button, classname) {
	var inc=0
	var alltags=document.all? document.all : document.getElementsByTagName("*")
	for (i=0; i<alltags.length; i++) {
		if (alltags[i].className==classname) {
			auraButtons[button][inc++]=alltags[i]
		}
	}
}


function slideBackgroundAction(button, number, i) {
	auraButtons[button][number].style.backgroundPosition = i+"px 0px";
}
function slideBackgroundActionUpDown(button, number, i) {
	auraButtons[button][number].style.backgroundPosition = "0px " + i + "px";
}
function slideBackground(button, number, direction, millisec, pixels, start, color){
	var speed = Math.round(millisec / 100);
	var timer = 0;
	var xAxis = 1;

	if(direction == "left") {
		xAxis = start;
		for(i = xAxis; i >= xAxis-pixels; i--) {
			setTimeout("slideBackgroundAction('" + button + "','" + number + "','" + i + "')",(timer * speed));
			timer++;
		}
		auraButtons[button][number].style.color = color;
	}
	if(direction == "right") {
		xAxis = start;
		for(i = xAxis; i <= xAxis + pixels; i++) {
			setTimeout("slideBackgroundAction('" + button + "','" + number + "','" + i + "')",(timer * speed));
			timer++;
		}
		auraButtons[button][number].style.color = color;
	}
	if(direction == "up") {
		xAxis = start;
		for(i = xAxis; i >= xAxis-pixels; i--) {
			setTimeout("slideBackgroundActionUpDown('" + button + "','" + number + "','" + i + "')",(timer * speed));
			timer++;
		}
		auraButtons[button][number].style.color = color;
	}
	if(direction == "down") {
		xAxis = start;
		for(i = xAxis; i <= xAxis + pixels; i++) {
			setTimeout("slideBackgroundActionUpDown('" + button + "','" + number + "','" + i + "')",(timer * speed));
			timer++;
		}
		auraButtons[button][number].style.color = color;
	}
}

//auraFades for left nav buttons
function auraChangeLeftNavButton(button, number) {
		slideBackground(button, activeButton[button],'left',600,54,0,"#7f7f7f");
		slideBackground(button, number,'right',600,54,-54,"#333333");	
		activeButton[button] = number;
}
function auraChangeButton(button, number,nodeuuid,template,lang,auraLandingNodeUUID) {
	if (number != activeButton[button]) 
	{
		try {
			auraSlideshowTimerControl('stop');
		} catch(err) {}
		
		auraChangeLeftNavButton(button, number);	
		
		loadAuraTemplate(nodeuuid,template,lang,auraLandingNodeUUID);
	}	
}
function loadAuraTemplate(nodeuuid,template,lang,auraLandingNodeUUID) 
{
	
	var url 	= '/aura/auratemplates/'+ template + '/rendercontent.jsp';
	var params 	= 'auraNodeUUID='+ nodeuuid+'&auraLang='+lang+'&auraLandingNodeUUID='+auraLandingNodeUUID;
	
	$('auraMainSectionInnerContent').style.display = "none";
	$('auraMainSectionLoadingCan').style.display = "block";	
				
	var myAjax = new Ajax.Request(
			        url,
			        {method: 'post', parameters: params, onComplete: insertDiv}
					);
}
function loadAffinityPallete(template,div,auraLandingNodeUUID) 
{
	var url 	= '/aura/auratemplates/'+ template + '/rendercontent.jsp';
	var params 	= 'auraLandingNodeUUID='+auraLandingNodeUUID;
	$('auraAffinityColorPaletteOuterDiv').style.display = "none";
	$('auraAffinityAllColorsLoadingCan').style.display = "block";
					
	var myAjax = new Ajax.Request(
			        url,
			        {method: 'post', parameters: params, onComplete: insertAfinityPalleteDiv}
					);
}
function insertDiv(response) 
{
	Element.update($('auraMainSectionInnerContent'),response.responseText);
}
function showInsertedDiv()
{
	$('auraMainSectionLoadingCan').style.display = "none";
	$('auraMainSectionInnerContent').style.display = "block";	
	
}
function insertAfinityPalleteDiv(response) 
{
	Element.update($('auraAffinityAllColorsOuterDiv'),response.responseText);
}
function showAffinityPalleteDiv()
{
	$('auraAffinityAllColorsLoadingCan').style.display = "none";
		
	auraAffinityColorsSeeAllColorsClick();
}
function reportError(request) 
{
	alert("error");
}
function auraButtonTextColor(button, number, color) {
	if (number != activeButton[button]) {
		auraButtons[button][number].style.color = color;
	}
}

//For the aura landing page
// JavaScript Document
function setAuraDefaultTemplateContentButtonWidth(button) {
	var totalButtons = auraButtons[button].length;
	var buttonWidth = Math.round(740 / totalButtons);
	var totalWidth = totalButtons * buttonWidth + (totalButtons-1);
	document.getElementById('auraTabbedContent').style.width = totalWidth + "px";
	document.getElementById('auraTabbedContentBottomBack').style.width = (totalWidth - 110) + "px";
	document.getElementById('auraTabbedContentBottomOuter').style.width = (totalWidth) + "px";
	for (i=0; i < auraButtons[2].length; i++) {
		auraButtons[button][i].style.width = buttonWidth + "px";
	}
//	var totalWidthLastButton = buttonWidth-1;
	auraButtons[button][totalButtons-1].style.marginRight = "0px";
}

function auraDefaultTemplateChangeButton(button, number) {
	if (number != activeButton[button]) {
		slideBackground(button, activeButton[button],'down',1000,45,-45,"#ffffff");
		slideBackground(button, number,'up',1000,45,0,"#ffffff");	
		document.getElementById('auraTabbedContentBottom'+number).style.display = 'block';
		document.getElementById('auraTabbedContentBottom'+activeButton[button]).style.display = 'none';
		auraScroller('auraTabbedContentBottomBack', 'auraTabbedContentBottomOuter', 'auraScroller', 'auraScrollArea', '690px', '720px', '640px', '710px');
		activeButton[button] = number;
	}
}

function auraDefaultTemplateButtonMouseOver(button, number) {
	if (number != activeButton[button] && navigator.platform.indexOf("Mac") == -1) {
		auraButtons[button][number].style.background = "url(/images/common/defaultTemplateButtonBacksMO.png)";
	}
}

function auraDefaultTemplateButtonMouseOut(button, number) {
	if (number != activeButton[button] && navigator.platform.indexOf("Mac") == -1) {
		auraButtons[button][number].style.background = "url(/images/common/defaultTemplateButtonBacks.png)";
	}
}

//For aura Image Collection Page - Scrolling Images
var auraScrollingImagesComplete = 1;
var auraScrollingImagesSpeed = 500;
var auraScrollingImagesWidth = 127;
var auraScrollingImagesFadeComplete = 1;

function auraScrollingImagesClick(button, number, text1, text2, image1, image2, image3, color1, color1text, color2, color2text, color3, color3text, color4, color4text, textBottom, emailLinks, encodedTitle1, encodedTitle2, lang, auraLandingNodeUUID,auraAffinityURL,emailImageAffinity) {
	auraAffinityColorsReturnToGallery(); 
	if (number != activeButton[button] && auraTransitionComplete == 1) {
		auraScrollingImagesFadeComplete = 0;
		auraSlideshowTimerControl('stop');
		auraButtons[button][activeButton[button]].style.border = '3px solid #eeeeee';
			auraButtons[button+1][activeButton[button]].style.filter = "alpha(opacity=99)";
			auraButtons[button+1][activeButton[button]].style.opacity = .99;
			auraButtons[button+1][activeButton[button]].style.MozOpacity = .99;
			auraButtons[button+1][activeButton[button]].style.KhtmlOpacity = .99;
			auraButtons[button+2][activeButton[button]].style.display = "none";
		auraButtons[button][number].style.border = '3px solid #d9c98e';
			auraButtons[button+1][number].style.opacity = .30;
			auraButtons[button+1][number].style.MozOpacity = .30;
			auraButtons[button+1][number].style.KhtmlOpacity = .30;
			auraButtons[button+1][number].style.filter = "alpha(opacity=30)";
			auraButtons[button+2][number].style.display = "block";
		activeButton[button] = number;

		document.getElementById('auraAffinityColorsCollectionName').innerHTML = text1;
		document.getElementById('auraAffinityColorsImageName').innerHTML = text2;
		document.getElementById('auraAffinityColorsBottomSectionTableText').innerHTML = textBottom;
		
		//Replaces array of collection images and resets icons to have first image as default
		auraAffinityColorsImageCollection.clear();
		auraButtons[7][0].style.backgroundImage = 'url(/images/common/auraTemplateImageSelected.gif)';
		auraButtons[7][1].style.backgroundImage = 'url(/images/common/auraTemplateImageUnselected.gif)';
		auraButtons[7][2].style.backgroundImage = 'url(/images/common/auraTemplateImageUnselected.gif)';
		activeButton[7] = 0;
		if (image1 == null) {
			auraButtons[7][0].style.display = 'none';
		} else {
			auraButtons[7][0].style.display = 'block';
			auraAffinityColorsImageCollection[0] = image1;
		}
		if (image2 == null) {
			auraButtons[7][1].style.display = 'none';
		} else {
			auraButtons[7][1].style.display = 'block';
			auraAffinityColorsImageCollection[1] = image2;
		}
		if (image3 == null) {
			auraButtons[7][2].style.display = 'none';
		} else {
			auraButtons[7][2].style.display = 'block';
			auraAffinityColorsImageCollection[2] = image3;
		}
		auraAffinityColorsImageCollectionCounterTotal = auraAffinityColorsImageCollection.length;

		auraSlideshowTimerControl();

		document.getElementById('auraAffinityColorsDollopOuter1').innerHTML = '<div id="auraAffinityColorsDollop1" class="auraAffinityColorsDollopImage"></div>';
		document.getElementById('auraAffinityColorsDollopOuter2').innerHTML = '<div id="auraAffinityColorsDollop2" class="auraAffinityColorsDollopImage"></div>';
		document.getElementById('auraAffinityColorsDollopOuter3').innerHTML = '<div id="auraAffinityColorsDollop3" class="auraAffinityColorsDollopImage"></div>';
		document.getElementById('auraAffinityColorsDollopOuter4').innerHTML = '<div id="auraAffinityColorsDollop4" class="auraAffinityColorsDollopImage"></div>';
		document.getElementById('auraAffinityColorsChangeDollopText1').innerHTML = color1text;
		document.getElementById('auraAffinityColorsChangeDollopText2').innerHTML = color2text;
		document.getElementById('auraAffinityColorsChangeDollopText3').innerHTML = color3text;
		document.getElementById('auraAffinityColorsChangeDollopText4').innerHTML = color4text;
		auraAffinityColorsChangeDollop1(color1);
		auraAffinityColorsChangeDollop2(color2);
		auraAffinityColorsChangeDollop3(color3);
		auraAffinityColorsChangeDollop4(color4);

		document.getElementById('auraAffinityColorPaletteImageOnTop').src = auraAffinityColorsImageCollection[0];

		if (image2 == null) {
			fadeImages(0);
		} else {
			fadeImages(1);
		}
			
		if(emailLinks == 'y')
			setEmailLinks('affinity',number,text1,text2,lang,auraLandingNodeUUID,auraAffinityURL,emailImageAffinity);
				
	}
}

function setEmailLinks(template,number,text1,text2,lang,auraLandingNodeUUID,auraAffinityURL,emailImageAffinity) {

	//var emailURL = '/email/emailItemFormAura.do?at='+ template + '&st='+ number + '&auraEmailTitle='+ text1 + text2 +'&auraLang='+lang+'&auraLandingNodeUUID='+auraLandingNodeUUID;
		
	var emailURL = 'javascript:openEmailToFriendLB(\''+text1 + text2+'\',\''+ auraAffinityURL + number +'\',\''+ lang +'\',\''+ emailImageAffinity + '\');';
	
	var emailId1 = document.getElementById('auraShareThis1');
	if(emailId1){ emailId1.href = emailURL; }
		
	var addToFavURL = 'javascript:addToFav(\'affinity\',\''+text1 + text2+'\',\''+ number +'\',\''+ lang +'\',\''+ auraLandingNodeUUID + '\');';
	
	var addFav1 = document.getElementById('auraAddToFav1');
	if(addFav1){ addFav1.href = addToFavURL; }
		
	try{
		Event.unloadCache();
	}catch(Err){}
	
	initializeLB();
}

function auraScrollingImagesCollectionImageClick(button, number, image) {
	if (number != activeButton[button] && auraTransitionComplete == 1) {
		auraTransitionComplete = 0;
		auraSlideshowTimerControl('stop');
		auraButtons[button][activeButton[button]].style.backgroundImage = 'url(/images/common/auraTemplateImageUnselected.gif)';
		auraButtons[button][number].style.backgroundImage = 'url(/images/common/auraTemplateImageSelected.gif)';
		document.getElementById('auraAffinityColorPaletteImageOnTop').src = auraAffinityColorsImageCollection[number];
		if (number == auraAffinityColorsImageCollection.length-1) {
			fadeImages(0);
		} else {
			fadeImages(number+1);			
		}
		activeButton[button] = number;
	}
}

function auraScrollingImages(direction) {
		if (auraScrollingImagesComplete == 1) {
			auraScrollingImagesComplete = 0;
			for (x = 0; x < totalButtons; x++) {
				if (direction == 'right' && auraScrollingImagesLocation[x] < -(x * auraScrollingImagesWidth)) {
					auraScrollingImagesLocation[x] = auraScrollingImagesLocation[x] + totalLength;
				}
				if (direction == 'left' && auraScrollingImagesLocation[x] > ((auraScrollingImagesWidth*5)-1)-(x * auraScrollingImagesWidth)) {
					auraScrollingImagesLocation[x] = auraScrollingImagesLocation[x] - totalLength;
				}
			}
			slideDiv(4, direction, auraScrollingImagesSpeed, auraScrollingImagesWidth);
			

			setTimeout("auraScrollingImagesComplete = 1;",auraScrollingImagesWidth*5);
		}
}

function slideDivAction(button, i, pixels) {
	var auraScrollingNum
	for (x = 0; x < totalButtons; x++) {
		auraScrollingNum = auraScrollingImagesLocation[x] + i
		auraButtons[button][x].style.left = auraScrollingNum + "px";
		if (i == pixels) {
			auraScrollingImagesLocation[x] = auraScrollingImagesLocation[x] + pixels;
			auraButtons[button][0].style.filter = "alpha(opacity=99)"; // Fixes glitch in ie that after images slide and image is clicked, images shift 2 pixels
			auraButtons[button][0].style.filter = "none";
		}
		if (i == -pixels) {
			auraScrollingImagesLocation[x] = auraScrollingImagesLocation[x] - pixels;
			auraButtons[button][0].style.filter = "alpha(opacity=99)";
			auraButtons[button][0].style.filter = "none";
		}
	}
}

function slideDiv(button, direction, millisec, pixels){
	var speed = Math.round(millisec / 100);
	var timer = 0;

	if(direction == "right") {
		for(i = -1; i >= (pixels-(pixels*2)); i--) {
			setTimeout("slideDivAction('" + button + "'," + i + ","+pixels+")",(timer * speed));
			timer++;
		}
	}
	if(direction == "left") {
		for(i = 1; i <= pixels; i++) {
			setTimeout("slideDivAction('" + button + "'," + i + ","+pixels+")",(timer * speed));
			timer++;
		}
	}
}

function auraAffinityColorsStartSlideShow() {
	try{
		if (auraAffinityColorsImageCollectionCounterTotal > 1) {		
			auraTransitionComplete = 0;
			newHiddenImage = activeButton[7]+2;
			if (newHiddenImage > auraAffinityColorsImageCollectionCounterTotal-1) newHiddenImage = newHiddenImage - auraAffinityColorsImageCollectionCounterTotal;
			fadeImages(newHiddenImage);
	
			if (activeButton[7] < auraAffinityColorsImageCollectionCounterTotal-1) {
				auraButtons[7][activeButton[7]].style.backgroundImage = 'url(/images/common/auraTemplateImageUnselected.gif)'; 
				activeButton[7]++
				auraButtons[7][activeButton[7]].style.backgroundImage = 'url(/images/common/auraTemplateImageSelected.gif)';
			} else {
				auraButtons[7][activeButton[7]].style.backgroundImage = 'url(/images/common/auraTemplateImageUnselected.gif)'; 
				activeButton[7] = 0;
				auraButtons[7][activeButton[7]].style.backgroundImage = 'url(/images/common/auraTemplateImageSelected.gif)';
			}
			auraSlideshowTimer = setTimeout("auraAffinityColorsStartSlideShow()", auraSlideshowTimerTransitionTime);
		}
	}catch(err){}
}

function auraSlideshowTimerControl(action) {
	try{
		if (auraAffinityColorsImageCollectionCounterTotal > 1) {
			document.getElementById('auraAffinityColorPalettePlayPause').style.display = 'block';
		} else {
			document.getElementById('auraAffinityColorPalettePlayPause').style.display = 'none';
		}
	}catch(e){}
	try
	{
		if (auraSlideshowTimerControlState == 'on' || action == 'stop') {
			clearTimeout(auraSlideshowTimer);
			document.getElementById('auraAffinityColorPalettePlayPause').style.backgroundImage = 'url(/images/common/auraPlayButton.png)';
			auraSlideshowTimerControlState = 'off'; 
		} else if (auraSlideshowTimerControlState == 'off') {
			auraSlideshowTimer = setTimeout("auraAffinityColorsStartSlideShow(auraAffinityColorsImageCollection[activeButton[7]+1])", auraSlideshowTimerTransitionTime);
			document.getElementById('auraAffinityColorPalettePlayPause').style.backgroundImage = 'url(/images/common/auraPauseButton.png)';
			auraSlideshowTimerControlState = 'on';
		}
	}catch(e){}
}

function RGB2HTML(red, green, blue)
{
    var decColor = red + 256 * green + 65536 * blue;
    return decColor.toString(16);
}

//Aura Product Information Page
var auraScrollingCansComplete = 1;
var auraScrollingCansSpeed = 500;
var auraScrollingCansWidth = 161;
var auraZommingCansComplete = 1;
var auraProdInfoFadeSpeed = 100;

function auraScrollingCans(direction) {
		if (auraScrollingCansComplete == 1) {
			auraScrollingCansComplete = 0;
			for (x = 0; x < totalButtons; x++) {
				if (direction == 'right' && auraScrollingImagesLocation[x] < -(x * auraScrollingCansWidth)) {
					auraScrollingImagesLocation[x] = auraScrollingImagesLocation[x] + totalLength;
				}
				if (direction == 'left' && auraScrollingImagesLocation[x] > ((auraScrollingCansWidth*4)-1)-(x * auraScrollingCansWidth)) {
					auraScrollingImagesLocation[x] = auraScrollingImagesLocation[x] - totalLength;
				}
			}
			slideDiv(9, direction, auraScrollingCansSpeed, auraScrollingCansWidth);
			setTimeout("auraScrollingCansComplete = 1;",auraScrollingCansWidth*5);
		}
}

function auraProductInformationCanClick(imageId, typeButton, number) {
	if (auraZommingCansComplete == 1 && number != activeButton[9]) {
		auraZommingCansComplete = 0;
		auraEnlargeImage('auraScrollingCansImage'+activeButton[9], auraProductInformationZoomSpeed, activeButton[9]);
		auraEnlargeImage(imageId, auraProductInformationZoomSpeed, number);
		auraProductInformationOpacity(typeButton,number, 100, 0, auraProdInfoFadeSpeed);
		auraProductInformationOpacity(typeButton,activeButton[9], 0, 100, auraProdInfoFadeSpeed);
		document.getElementById('auraProductInformationBottomSectionTableText'+number).style.display = 'block';
		document.getElementById('auraProductInformationBottomSectionTableText'+activeButton[9]).style.display = 'none';
		auraScroller('auraProductInformationBottomSectionTableText', 'auraProductInformationBottomSectionTableTextOuter', 'auraScroller', 'auraProductInformationScrollArea', '630px', '666px', '630px', '666px');
		activeButton[9] = number;
	}
}
function auraEnlargeImageAction(i, id) {
	document.getElementById(id).style.width = i+"px";
	if (i == auraProductInformationZoomBigImgSize) auraZommingCansComplete = 1;
}

function auraEnlargeImage(imageId, millisec, number) {
	var object=document.getElementById(imageId);
	var speed = Math.round(millisec / 100);
	var timer = 0;
	var size = object.style.width;
		
	if (size == auraProductInformationZoomBigImgSize+'px') {
		object.src=auraProductInformationCanImages[number][0];
		for(i = auraProductInformationZoomBigImgSize-1; i >= auraProductInformationZoomSmlImgSize; i--) {
			setTimeout("auraEnlargeImageAction('" + i + "','" + imageId + "')",(timer * speed));
			timer++;
		}
	} else if (size == auraProductInformationZoomSmlImgSize+'px' || size == '') {
		object.style.display = 'none';
		object.src=auraProductInformationCanImages[number][1]; 
		object.style.width = auraProductInformationZoomSmlImgSize+"px";
		object.style.display = '';
		for(i = auraProductInformationZoomSmlImgSize; i <= auraProductInformationZoomBigImgSize; i++) {
			setTimeout("auraEnlargeImageAction('" + i + "','" + imageId + "')",(timer * speed));
			timer++;
		}
	}
}
//change the opacity object
function auraProductInformationOpacityAction(opacity, button, number) {
	auraButtons[button][number].style.opacity = (opacity / 100);
	auraButtons[button][number].style.MozOpacity = (opacity / 100);
	auraButtons[button][number].style.KhtmlOpacity = (opacity / 100);
	auraButtons[button][number].style.filter = "alpha(opacity=" + opacity + ")";
	if (opacity == 100) {
		try{ auraButtons[button][number].style.removeAttribute("filter"); } catch(err) {}  // <<< added
	}
//	if (opacity == 100) auraButtons[button][number].style.removeAttribute('top');
}

function auraProductInformationOpacity(button, number, opacStart, opacEnd, millisec) {
	//speed for each frame
	var speed = Math.round(millisec / 100);
	var timer = 0;

	//determine the direction for the blending, if start and end are the same nothing happens
	if(opacStart > opacEnd) {
		for(i = opacStart; i >= opacEnd; i--) {
			setTimeout("auraProductInformationOpacityAction(" + i + "," + button + "," + number + ")",(timer * speed));
			timer++;
		}
	} else if(opacStart < opacEnd) {
		for(i = opacStart; i <= opacEnd; i++)
			{
			setTimeout("auraProductInformationOpacityAction(" + i + "," + button + "," + number + ")",(timer * speed));
			timer++;
		}
	}
}

function auraDifferenceScroller() {
	auraScroller('auraTabbedContentBottomBack', 'auraTabbedContentBottomOuter', 'auraScroller', 'auraScrollArea', '690px', '720px', '640px', '710px');
	if (navigator.platform.indexOf("Mac") == -1) {
		onmousewheel(document.getElementById('auraTabbedContentBottomOuter'),'auraTabbedContentBottomBack', 'auraTabbedContentBottomOuter', 'auraScroller', 'auraScrollArea');			
	}
}

function auraDiffBootomJS() 
{//alert("aura differenece bottom js func");
	//Default Template
			activeButton[3] = 0;
			auraButtons[2] = new Array();
			getElementbyClass(2,'auraTabbedContentButton');
			auraButtons[3] = new Array();
			getElementbyClass(3,'auraTabbedContentButtonBack');
			auraButtons[3][activeButton[3]].style.backgroundPosition = "0px -45px";
			setAuraDefaultTemplateContentButtonWidth(2);
			
			document.getElementById('auraTabbedContentBottomBack').style.top = '0px';
			document.getElementById('auraTabbedContentBottom'+activeButton[3]).style.display = 'block';
			
			setTimeout("auraDifferenceScroller();",500);
			showInsertedDiv();			
}

var totalButtons;
var totalLength;
var auraScrollingImagesLocation = new Array();

function auraAffinityBootomJS()
{			
		//alert("aura affinity bottom js func ");
			auraButtons[4] = new Array();
			getElementbyClass(4, 'auraScrollingImagesOuterImage');
			activeButton[4] = 0;
			auraButtons[5] = new Array();
			getElementbyClass(5, 'auraScrollingImagesImageFade');
			auraButtons[6] = new Array();
			getElementbyClass(6, 'auraScrollingImagesOvertype');
			auraShowAllColorsPaletteVisible = 2;
			totalButtons = auraButtons[4].length;
			
			totalLength = totalButtons * auraScrollingImagesWidth;
			
			document.getElementById('auraScrollingImages2').style.width = totalLength + 'px';
			
			for (y = 0; y < totalButtons; y++) {
				auraScrollingImagesLocation[y] = 0;
			}
			
			//Set initial sliding button state
			auraButtons[4][0].style.border = '3px solid #d9c98e';
				auraButtons[5][0].style.opacity = .30;
				auraButtons[5][0].style.MozOpacity = .30;
				auraButtons[5][0].style.KhtmlOpacity = .30;
				auraButtons[5][0].style.filter = "alpha(opacity=30)";
				auraButtons[6][0].style.display = "block";
				
			if (totalButtons <= 5) {
				document.getElementById('auraScrollingImagesRightArrow').style.display = 'none';
				document.getElementById('auraScrollingImagesLeftArrow').style.display = 'none';
				document.getElementById('auraScrollingImages').style.left = '72px';				
			}
			//Icons for images in collection
			auraButtons[7] = new Array();
			getElementbyClass(7, 'auraAffinityColorsCollectionImageIcon');
			activeButton[7] = 0;
			auraButtons[7][0].style.background = 'url(/images/common/auraTemplateImageSelected.gif)';
		
		   if (auraAffinityColorsImageCollection.length == 1) { 
		    auraButtons[7][1].style.display = 'none';
		    auraButtons[7][2].style.display = 'none';
		   } else if (auraAffinityColorsImageCollection.length == 2) {
		    auraButtons[7][2].style.display = 'none';
		   }
		
		//default Image set NEEDS TO BE PULLED FROM CMS!
		var auraDefaultImage = new Image;
		auraDefaultImage.src = auraAffinityColorsImageCollection[0];
		document.getElementById('auraAffinityColorPaletteImage').style.backgroundImage = 'url('+auraDefaultImage.src+')';
		if (auraAffinityColorsImageCollection.length > 1) {
			document.getElementById('auraAffinityColorPaletteImageOnTop').src = auraAffinityColorsImageCollection[1];		
		}
		
		showInsertedDiv();
		//Rounding Bottom Section
		auraAffinityColorsBottomCurveSettings = {tl: { radius: 5 }, tr: { radius: 5 }, bl: { radius: 5 }, br: { radius: 5 }, antiAlias: true, autoPad: false}
		var auraAffinityColorsBottomCurve = new curvyCorners(auraAffinityColorsBottomCurveSettings, document.getElementById("auraAffinityColorsBottomSectionOuter"));
		auraAffinityColorsBottomCurve.applyCornersToAll();
		
		
		auraAffinityColorsBottomCurveSettings = {tl: { radius: 5 }, tr: false, bl: { radius: 5 }, br: false, antiAlias: true, autoPad: false}
		var auraAffinityColorsBottomCurve = new curvyCorners(auraAffinityColorsBottomCurveSettings, document.getElementById("auraAffinityColorPaletteDivider2"));
		auraAffinityColorsBottomCurve.applyCornersToAll();

		auraAffinityColorsBottomCurveSettings = {tl: false, tr: { radius: 5 }, bl: false, br: { radius: 5 }, antiAlias: true, autoPad: false}
		var auraAffinityColorsBottomCurve = new curvyCorners(auraAffinityColorsBottomCurveSettings, document.getElementById("auraAffinityColorPaletteDivider3"));
		auraAffinityColorsBottomCurve.applyCornersToAll();
		
		auraSlideshowTimerControlState = 'off';
		auraSlideshowTimerTransitionTime = 4000;
		//auraSlideshowTimer = setTimeout("auraAffinityColorsStartSlideShow(auraAffinityColorsImageCollection[activeButton[7]+1])", auraSlideshowTimerTransitionTime);
}

function auraAffinityColorsChangeDollop1(color) {
		
	var flashvars = {};
	flashvars.dollopColor = color;
			
	var params = {};
	params.wmode = "transparent";
	params.bgcolor = "#333333";
	
	var attributes = {};
	
	swfobject.embedSWF("/theme/flashDollop/dollop.swf", "auraAffinityColorsDollop1", "70", "70", "8", "expressInstall.swf", flashvars, params, attributes);
	
}

function auraAffinityColorsChangeDollop2(color) {
		
	var flashvars = {};
	flashvars.dollopColor = color;
		
	var params = {};
	params.wmode = "transparent";
	params.bgcolor = "#333333";
	
	var attributes = {};
	
	swfobject.embedSWF("/theme/flashDollop/dollop.swf", "auraAffinityColorsDollop2", "70", "70", "8", "expressInstall.swf", flashvars, params, attributes);
}

function auraAffinityColorsChangeDollop3(color) {
	
	var flashvars = {};
	flashvars.dollopColor = color;
			
	var params = {};
	params.wmode = "transparent";
	params.bgcolor = "#333333";
	
	var attributes = {};
	
	swfobject.embedSWF("/theme/flashDollop/dollop.swf", "auraAffinityColorsDollop3", "70", "70", "8", "expressInstall.swf", flashvars, params, attributes);
}

function auraAffinityColorsChangeDollop4(color) {
	
	var flashvars = {};
	flashvars.dollopColor = color;
			
	var params = {};
	params.wmode = "transparent";
	params.bgcolor = "#333333";
	
	var attributes = {};
	
	swfobject.embedSWF("/theme/flashDollop/dollop.swf", "auraAffinityColorsDollop4", "70", "70", "8", "expressInstall.swf", flashvars, params, attributes);
}

function auraAffinityColorsChangeDollop(color,id) {
		
	var flashvars = {};
	flashvars.dollopColor = color;
			
	var params = {};
	params.wmode = "transparent";
	params.bgcolor = "#333333";
	
	var attributes = {};
	
	swfobject.embedSWF("/theme/flashDollop/dollop.swf", "auraAffinityPalleteDollop"+id, "65", "65", "8", "expressInstall.swf", flashvars, params, attributes);
}

var auraProductInformationZoomSpeed = 500;
var auraProductInformationZoomSmlImgSize = '135';
var auraProductInformationZoomBigImgSize = '197';
var auraScrollingImagesLocation = new Array();

function auraProductInfoScroller() {
		auraScroller('auraProductInformationBottomSectionTableText', 'auraProductInformationBottomSectionTableTextOuter', 'auraScroller', 'auraProductInformationScrollArea', '630px', '666px', '630px', '666px');
		if (navigator.platform.indexOf("Mac") == -1) {
			onmousewheel(document.getElementById('auraProductInformationBottomSectionTableTextOuter'),'auraProductInformationBottomSectionTableText', 'auraProductInformationBottomSectionTableTextOuter', 'auraScroller', 'auraProductInformationScrollArea');			
	}
}

function auraProductInfoBootomJS(activeTab)
{
	activeButton[9] = activeTab;
	auraButtons[9] = new Array();
	getElementbyClass(9, 'auraScrollingCansOuter');
	auraButtons[10] = new Array();
	getElementbyClass(10, 'auraScrollingCansOvertype');	
	
	auraButtons[10][activeButton[9]].style.opacity = (0 / 100);
	auraButtons[10][activeButton[9]].style.MozOpacity = (0 / 100);
	auraButtons[10][activeButton[9]].style.KhtmlOpacity = (0 / 100);
	auraButtons[10][activeButton[9]].style.filter = "alpha(opacity=0)";
	
	totalButtons = auraButtons[9].length;
	totalLength = totalButtons * auraScrollingCansWidth;
	document.getElementById('auraScrollingCans2').style.width = totalLength + 'px';
	
	for (y = 0; y < totalButtons; y++) {
		auraScrollingImagesLocation[y] = 10;
	}			
					
	if (totalButtons <= 4) {
		document.getElementById('auraScrollingCansRightArrow').style.display = 'none';
		document.getElementById('auraScrollingCansLeftArrow').style.display = 'none';			
	}
			
	
	document.getElementById('auraProductInformationBottomSectionTableText').style.top = '0px';
	document.getElementById('auraProductInformationBottomSectionTableText'+activeButton[9]).style.display = 'block';
	setTimeout("auraProductInfoScroller();",500);
	
	//Enlarge Default Can
	auraEnlargeImage('auraScrollingCansImage'+activeButton[9], auraProductInformationZoomSpeed, activeButton[9]);
			
			
	//Rounding Bottom Section
	auraProducInformationBottomLinksTableSettings = {tl: { radius: 5 }, tr: { radius: 5 }, bl: { radius: 5 }, br: { radius: 5 }, antiAlias: true, autoPad: false}
	var auraProducInformationBottomLinksTable = new curvyCorners(auraProducInformationBottomLinksTableSettings, document.getElementById("auraProductInformationBottomSectionTableLinks"));
	auraProducInformationBottomLinksTable.applyCornersToAll();
	showInsertedDiv();		
}

function affinityColorsPalleteJS()
{
		showAffinityPalleteDiv();
		auraAffinityColorsBottomCurveSettings = {tl: { radius: 5 }, tr: false, bl: { radius: 5 }, br: false, antiAlias: true, autoPad: false}
		var auraAffinityColorsBottomCurve = new curvyCorners(auraAffinityColorsBottomCurveSettings, document.getElementById("auraAffinityColorPaletteDivider4"));
		auraAffinityColorsBottomCurve.applyCornersToAll();

		auraAffinityColorsBottomCurveSettings = {tl: false, tr: { radius: 5 }, bl: false, br: { radius: 5 }, antiAlias: true, autoPad: false}
		var auraAffinityColorsBottomCurve = new curvyCorners(auraAffinityColorsBottomCurveSettings, document.getElementById("auraAffinityColorPaletteDivider5"));
		auraAffinityColorsBottomCurve.applyCornersToAll();

		setTimeout("affinityColorsPalleteScroller();",500);
}

function affinityColorsPalleteScroller() {
	if (navigator.platform.indexOf("Mac") == -1) {
		auraScroller('auraAffinityColorsBottomSectionLinksTableInner', 'auraAffinityColorsBottomSectionLinksTableOuter', 'auraScroller', 'auraScrollAreaAffinityPallete', '700px', '700px', '700px', '700px');
		onmousewheel(document.getElementById('auraAffinityColorsBottomSectionLinksTableOuter'),'auraAffinityColorsBottomSectionLinksTableInner', 'auraAffinityColorsBottomSectionLinksTableOuter', 'auraScroller', 'auraScrollAreaAffinityPallete');			
	} else {
		auraScroller('auraAffinityColorsBottomSectionLinksTableInner', 'auraAffinityColorsBottomSectionLinksTableOuter', 'auraScroller', 'auraScrollAreaAffinityPallete', '700px', '700px', '700px', '700px', '110');
	}
}

auraShowAllColorsPaletteVisible = 2;
function auraAffinityColorsSeeAllColorsClick() {
	if (auraShowAllColorsPaletteVisible == 0 || auraShowAllColorsPaletteVisible == 2) {
		if (auraSlideshowTimerControlState == 'on') {
   			auraSlideshowTimerControl('stop');
  		} 
		auraShowAllColorsPaletteVisible = 1;
		document.getElementById('auraAffinityColorsCollectionImageIcons').style.display = 'none';
		document.getElementById('auraAffinityColorsCollectionName').style.display = 'none';
		document.getElementById('auraAffinityColorsImageName').style.display = 'none';
		document.getElementById('auraAffinityColorsSeeAllColorsButton2').style.display = 'none';
		document.getElementById('auraAffinityReturnToGalleryButton').style.display = 'block';
		document.getElementById('auraAffinityColorsAffinityPaletteTitle').style.display = 'block';
		document.getElementById('auraAffinityColorPaletteOuterDiv').style.display = 'none';
		document.getElementById('auraAffinityAllColorsOuterDiv').style.display = 'block';
	}
}
function auraAffinityColorsReturnToGallery() {
	if (auraShowAllColorsPaletteVisible == 1 || auraShowAllColorsPaletteVisible == 2) {
		auraShowAllColorsPaletteVisible = 0;
		document.getElementById('auraAffinityColorsCollectionImageIcons').style.display = 'block';
		document.getElementById('auraAffinityColorsCollectionName').style.display = 'block';
		document.getElementById('auraAffinityColorsImageName').style.display = 'block';
		document.getElementById('auraAffinityColorsSeeAllColorsButton2').style.display = 'block';
		document.getElementById('auraAffinityReturnToGalleryButton').style.display = 'none';
		document.getElementById('auraAffinityColorsAffinityPaletteTitle').style.display = 'none';
		document.getElementById('auraAffinityColorPaletteOuterDiv').style.display = 'block';
		document.getElementById('auraAffinityAllColorsOuterDiv').style.display = 'none';
		$('auraAffinityAllColorsOuterDiv').innerHTML='';
		auraSlideshowTimerControl();
	}
}

function addToFav(template,title,tabNo,lang,auraLandingNodeUUID)
{
				
	var addToFavUrl       = '/favorites/addToFavoritesForm.do?artifactType=auraArticle&check=true&auraLandingNodeUUID='+auraLandingNodeUUID;
	var addToFavUrlParams = '&at='+template+'&st='+tabNo+'&auraEmailTitle='+title+'&auraLang='+lang;

//	addToFavUrlParams = addToFavUrlParams+'&at='+template+'&st='+tabNo+'&auraEmailTitle='+title+'&auraLang='+lang;
	
	addToFavUrl = addToFavUrl + addToFavUrlParams;
	
	var disp_setting="toolbar=no,location=no,directories=no,menubar=no,"; 
  		disp_setting+="scrollbars=yes,width=600, height=700, left=100, top=25";
  		
	var addtofav=window.open(addToFavUrl,"",disp_setting);
}

//Aura Dif Video Template 
function auraDifferenceVideoButtonHover(button, number, direction) {
	if (number != activeButton[button]) {
		if (direction == "over") {
			auraButtons[12][number].style.color = '#ffffff';
			auraButtons[13][number].style.backgroundImage = 'url(/images/common/auraLargeVideoButtonRollover.png)';	
		} else {
			auraButtons[12][number].style.color = '#cccccc';
			auraButtons[13][number].style.backgroundImage = 'url(/images/common/auraDifferenceLargeVideoButtonBack.png)';	
		}
	}
}
auraDifferenceVideoChangeButtonComplete = 1;
function auraDifferenceVideoChangeButton(button, number, type, videoFilename) {
	var VideoChangeButtonSpeed = 800;
	if (number != activeButton[button] && auraDifferenceVideoChangeButtonComplete == 1 && type == 'video') {
	// if the button is for a video
		auraDifferenceVideoChangeButtonComplete = 0;
		//
		document.getElementById('auraDifferenceVideoContent').style.display = 'none';
		document.getElementById('auraDifferenceVideoFlash').style.display = 'block';
		document.getElementById('auraDifferenceVideoFlash').innerHTML = '<div id="auraFlashVideo"></div>';
		auraFlashVideoLoad('auraFlashVideo', videoFilename);
		//
		try {
			document.getElementById('auraTabbedContentBottom'+activeButton[button]).style.display = 'none';
		} catch (err) {}
		slideBackground(button, activeButton[button],'up',VideoChangeButtonSpeed,43,0,"#cccccc");
		auraButtons[12][activeButton[button]].style.color = '#cccccc';
		auraButtons[13][activeButton[button]].style.backgroundImage = 'url(/images/common/auraDifferenceLargeVideoButtonBack.png)';
		slideBackground(button, number,'down',VideoChangeButtonSpeed,43,-43,"#ffffff");	
		auraButtons[12][number].style.color = '#ffffff';
		activeButton[button] = number;
		setTimeout('auraDifferenceVideoChangeButtonComplete = 1', 627);
	} else if (number != activeButton[button] && auraDifferenceVideoChangeButtonComplete == 1 && type == 'flashContent') {
		// if the button is for a flash content file
		auraDifferenceVideoChangeButtonComplete = 0;
		//
		document.getElementById('auraDifferenceVideoContent').style.display = 'none';
		document.getElementById('auraDifferenceVideoFlash').style.display = 'block';
		document.getElementById('auraDifferenceVideoFlash').innerHTML = '<div id="auraFlashVideo"></div>';
		eval('auraFlashContentLoad'+number)();
		//
		try {
			document.getElementById('auraTabbedContentBottom'+activeButton[button]).style.display = 'none';
		} catch (err) {}
		slideBackground(button, activeButton[button],'up',VideoChangeButtonSpeed,43,0,"#cccccc");
		auraButtons[12][activeButton[button]].style.color = '#cccccc';
		auraButtons[13][activeButton[button]].style.backgroundImage = 'url(/images/common/auraDifferenceLargeVideoButtonBack.png)';
		slideBackground(button, number,'down',VideoChangeButtonSpeed,43,-43,"#ffffff");	
		auraButtons[12][number].style.color = '#ffffff';
		activeButton[button] = number;
		setTimeout('auraDifferenceVideoChangeButtonComplete = 1', 627);
	} else if (number != activeButton[button] && auraDifferenceVideoChangeButtonComplete == 1) {
	// if the button is for content
		auraDifferenceVideoChangeButtonComplete = 0;
		// Hide Video, Show content div, Clear video div to stop movie
		document.getElementById('auraDifferenceVideoFlash').style.display = 'none';
		document.getElementById('auraDifferenceVideoContent').style.display = 'block';
		document.getElementById('auraDifferenceVideoFlash').innerHTML = '';
		//
		document.getElementById('auraTabbedContentBottom'+number).style.display = 'block';
		try {
			document.getElementById('auraTabbedContentBottom'+activeButton[button]).style.display = 'none';
		} catch (err) {}
		slideBackground(button, activeButton[button],'up',VideoChangeButtonSpeed,43,0,"#cccccc");
		auraButtons[12][activeButton[button]].style.color = '#cccccc';
		auraButtons[13][activeButton[button]].style.backgroundImage = 'url(/images/common/auraDifferenceLargeVideoButtonBack.png)';
		slideBackground(button, number,'down',VideoChangeButtonSpeed,43,-43,"#ffffff");	
		auraButtons[12][number].style.color = '#ffffff';
		activeButton[button] = number;
		setTimeout('auraVideoScroller()', 250);
		setTimeout('auraDifferenceVideoChangeButtonComplete = 1', 627);
	}
}
function auraVideoScroller() {
auraScroller('auraVideoTabbedContentBottomBack', 'auraVideoTabbedContentBottomOuter', 'auraVideoScroller', 'auraVideoScrollArea', '700px', '740px', '665px', '740px');	
if (navigator.platform.indexOf("Mac") == -1) {
		onmousewheel(document.getElementById('auraVideoTabbedContentBottomOuter'),'auraVideoTabbedContentBottomBack', 'auraVideoTabbedContentBottomOuter', 'auraVideoScroller', 'auraVideoScrollArea');			
	}
}

function auraDifferenceVideoBottom(activeNumber, type, videoFilename) {
	auraDifferenceVideoButtonHighlight= new Image(209,53); 
	auraDifferenceVideoButtonHighlight.src="/images/common/auraDifferenceVideoButtonHighlight.png"; 

	activeButton[11] = activeNumber;
	auraButtons[11] = new Array();
	auraButtons[12] = new Array();
	auraButtons[13] = new Array();
	getElementbyClass(11,'auraDifferenceVideoButton');
	getElementbyClass(12,'auraDifferenceVideoMenuTitle');
	getElementbyClass(13,'auraDifferenceVideoButtonBack');

	setAuraLargeVideoTemplateButtonWidth(11);
	
//	setAuraDefaultTemplateContentButtonWidth(2);
//Scroller
	document.getElementById('auraVideoTabbedContentBottomBack').style.top = '0px';

	auraButtons[11][activeButton[11]].style.backgroundPosition = "0px 0px";
	auraButtons[12][activeButton[11]].style.color = '#ffffff';
	if (type == 'video') {
		document.getElementById('auraDifferenceVideoContent').style.display = 'none';
		document.getElementById('auraDifferenceVideoFlash').style.display = 'block';
		auraFlashVideoLoad('auraFlashVideo', videoFilename);
	} else if ( type == 'flashContent') {
		document.getElementById('auraDifferenceVideoContent').style.display = 'none';
		document.getElementById('auraDifferenceVideoFlash').style.display = 'block';
		eval('auraFlashContentLoad'+activeNumber)();
	} else {
		document.getElementById('auraDifferenceVideoFlash').style.display = 'none';
		document.getElementById('auraDifferenceVideoContent').style.display = 'block';
		document.getElementById('auraTabbedContentBottom'+activeButton[11]).style.display = 'block';		
	}
//	auraDifferenceVideoChangeButton()
//	setTimeout("auraVideoScroller();",500);
	showInsertedDiv();
}
function setAuraLargeVideoTemplateButtonWidth(button) {
	var totalButtons = auraButtons[button].length;
	var buttonWidth = Math.round(722 / totalButtons);
	for (i=0; i < auraButtons[button].length; i++) {
		auraButtons[button][i].style.width = buttonWidth + "px";
	}
	var leftPadding = Math.round(((740 - totalButtons) - (buttonWidth * totalButtons)) / 2);
	var totalWidth = 740 - leftPadding - 5;
	document.getElementById('auraDifferenceVideoRightButtons').style.width = totalWidth + "px";
	document.getElementById('auraDifferenceVideoRightButtons').style.paddingLeft = leftPadding + "px";
}

function auraFlashVideoLoad(flashVideoId, videoFilename) {
	/*var s1 = new SWFObject("/swf/mediaplayer-auraReskin.swf",flashVideoId,"740","374","8", "#999999");
		s1.addParam("allowfullscreen","true");
		
		s1.addVariable("autostart","true");
		s1.addVariable("width","740");
		s1.addVariable("height","374");
		s1.addVariable("file", videoFilename);
		s1.write(flashVideoId);*/
		
	var flashvars = {};
	flashvars.autostart = "true";
	flashvars.width = "740";
	flashvars.height = "374";
	flashvars.file = videoFilename;
		
	var params = {};
	params.allowfullscreen = "true";
	params.bgcolor = "#999999";
	
	var attributes = {};
	
	swfobject.embedSWF("/swf/mediaplayer-auraReskin.swf", flashVideoId, "740", "374", "8", "expressInstall.swf", flashvars, params, attributes);
}
