
function showThumb(iColor, iIndex)
{
	for (var i = 0; i < 4; i ++)
	{
  		if (document.getElementById('Color' + iColor + 'Thumb' + i))
  		{
  			document.getElementById('Color' + iColor + 'Thumb' + i).className        = "thumb";
  			document.getElementById('Color' + iColor + 'Dress' + i).style.visibility = "hidden";
  		}
  	}
  
	document.getElementById('Color' + iColor + 'Dress' + iIndex).style.visibility = "visible";
	document.getElementById('Color' + iColor + 'Thumb' + iIndex).className        = "thumbSelected";
}

function setColor(iIndex, sColor)
{
	for (var i = 1; i <= 4; i ++)
	{
  		if (document.getElementById('Color' + i))
  		{
  			document.getElementById('Color' + i).className                = "color";
  			document.getElementById('Color' + i + 'Thumbs').style.display = "none";
  			
  			for (var j = 0; j < 4; j ++)
  			{
  				if (document.getElementById('Color' + i + 'Thumb' + j))
  					document.getElementById('Color' + i + 'Dress' + j).style.visibility = "hidden";
  			}
  		}
  	}
  
	document.getElementById('Color' + iIndex).className                   = "colorSelected";
	document.getElementById('Color' + iIndex + 'Thumbs').style.display    = "block";
	document.getElementById('Color' + iIndex + 'Dress0').style.visibility = "visible";
	
	document.frmProduct.Color.value = sColor;
}

function validateForm( )
{
	var objFV = new FormValidator("frmProduct");
	
	if (objFV.value("ddPrice") == "")
	{
		alert("Please select the Size.");		

		return false;
	}

	return true;
}
