function setBadgeCornerBtnForFeaturedItems (topAjust, leftAjust, mozillaTopAjust, mozillaLeftAjust, garmentId, useBigButton) {

	useBigButton = (useBigButton == undefined ? false : useBigButton);

	if (badgeThumbnailId && (document.getElementById("ModelWidget") != null || parent.document.getElementById("ModelWidget") != null) || showTryOnBtn) {
		if (topAjust == null) topAjust = 0;
		if (leftAjust == null) leftAjust = 0;
		if (mozillaTopAjust == null) mozillaTopAjust = 0;
		if (mozillaLeftAjust == null) mozillaLeftAjust = 0;
		var topPos, leftPos;
		var diff = 18;
		if (navigator.appName == "Microsoft Internet Explorer") {
			topPos = -86 + diff + topAjust;
			leftPos = 86 - diff + leftAjust;
		}
		else {
			topPos = -86 + diff + topAjust + mozillaTopAjust;
			leftPos = 86 - diff + leftAjust + mozillaLeftAjust;
		}
	
		//document.write('<div class="badgeTryOnCornerOut" style="top:' + topPos + 'px; left:' + leftPos + 'px;" onmouseover="badgeCornerOver(this);" onmouseout="badgeCornerOut(this);" onclick="badgeCornerClick(this);">');
		
		if(useBigButton){
			document.write('<div class="badgeTryOnCornerOut" style="top:5px;width:100%;opacity:1.0;filter:alpha(opacity=100);height:30px;" onmouseover="badgeCornerOver(this);" onmouseout="badgeCornerOut(this);" onclick="badgeCornerClick(this);">');
			document.write("<img style='' onmouseover=\"this.src='/cs/Themes/hawaii/Common/images/try_on_over.gif'\" onmouseout=\"this.src='/cs/Themes/hawaii/Common/images/try_on_off.gif'\" src=\"/cs/Themes/hawaii/Common/images/try_on_off.gif\">");
		} else {
			document.write('<div class="badgeTryOnCornerOut" style="width:100%;" onmouseover="badgeCornerOver(this);" onmouseout="badgeCornerOut(this);" onclick="badgeCornerClick(this);">');
			document.write("<img src=\"/cs/Themes/hawaii/Common/images/fleche_look2.gif\">");
		}

		document.write('<input type="hidden" value="0"/>'); //for Badge ID, not used in this case
		document.write('<input type="hidden" value="' + garmentId + '"/>'); //ItemID:ColorID
		document.write('</div>');
	}
}
function getOneRandomOutfitsItemColorId() {
	var xmlHttp = getXmlHttp();
	if (xmlHttp) {
		xmlHttp.onreadystatechange = function() {
			if(xmlHttp.readyState == 4) {
				var text = trim(xmlHttp.responseText);
				modelWidgetAPI.removeAll();
				setTimeout("addModelGarment('"+text+"')", 100);
				
			}
		}
		var fullPath = "/cs/Themes/hawaii/Common/getOneRandomOutfitItemColorIdAjax.aspx";
		xmlHttp.open("GET", fullPath, true);
		xmlHttp.send(null);
	}
}

function featuredItemImageClick (objImg) {
	var objTryOn = objImg.parentNode.childNodes[objImg.parentNode.childNodes.length-1];
	badgeCornerClick(objTryOn);
}
function featuredItemOver (objImg) {
	var objTryOn = objImg.parentNode.childNodes[objImg.parentNode.childNodes.length-1];
	badgeCornerOver(objTryOn);
}
function featuredItemOut (objImg) {
	var objTryOn = objImg.parentNode.childNodes[objImg.parentNode.childNodes.length-1];
	badgeCornerOut(objTryOn);
}
function imageResized (objImg, ratio, position) {
	//objImg.parentNode.style.width = ratio+"px";
	//objImg.parentNode.style.height = ratio+"px";
	//objImg.parentNode.style.position = position;
	//window.status = "top: " + objImg.parentNode.style.top + "left: " + objImg.parentNode.style.left;
	//window.status = "top: " + objImg.parentNode.style.top + " / left: " + objImg.parentNode.style.left
}