function SetPhoto(iIndex, pstrWidth, pstrHeight, pstrStyleId, dressid) 
{
	//intPhotoViewer = iIndex;
	LoadPhotoViewerNew(iIndex, pstrWidth, pstrHeight, pstrStyleId, dressid);
}

function LoadPhotoViewerNew(iIndex, pstrWidth, pstrHeight, pstrStyleId, dressid) 
{	
	var width = pstrWidth;
	var height = pstrHeight;
	var nocache = 0;

	date=new Date();
	newtime=date.getTime();

	document.getElementById('imgPhoto').innerHTML = "<a href='"+WWWROOT+"/detail.php?id="+dressid+"'><img src='" + iIndex + "' width=" + width + " height=" + height + " pbsrcnl = '" + iIndex + "' id='"+ newtime + "' border=0 style='cursor: pointer;'></a>";
	document.getElementById('styleid').innerHTML = "<a href='"+WWWROOT+"/detail.php?id="+dressid+"' class='samilink'>&nbsp;"+pstrStyleId+"&nbsp;</a>"; 
	
}

function validateSNew()
{
	if(document.getElementById("zip").value=="ZIP CODE" || document.getElementById("zip").value=="")
	{
		alert("Please enter Zip Code");
		document.getElementById("zip").focus();
		return false;
	}

	if(document.getElementById("mile").value=="0")
	{
		alert("Please select miles");
		document.getElementById("mile").focus();
		return false;
	}
	else
	{
		return true;
	}
	
	return false;
}

