function setAssetBetaCookie( name, expires, path, domain ) {
	// set time, it's in milliseconds
	var today = new Date();
	var value = "1|" + today.getTime() + "|y|";

	if ( expires ) {
		expires = expires * 1000 * 60 * 60 * 24;
	}
	var expires_date = new Date( today.getTime() + (expires) );

	document.cookie = name + "=" +escape( value ) +
		( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
		( ( path ) ? ";path=" + path : "" ) + 
		( ( domain ) ? ";domain=" + domain : "" );
}

setAssetBetaCookie('bf', 30, '/', 'piczo.com');

var maxThumbnailSize = 100;

function resizeImage(image)
{
	// Do nothing if image is null
	if(!image)
		return;
		
	if(image.className=="thumbnail" && (image.clientHeight> maxThumbnailSize || image.clientWidth > maxThumbnailSize))
	{
		h = image.clientHeight;
		w = image.clientWidth;
		if(h >= w)
		{
			image.style.height = maxThumbnailSize+"px";
			image.style.width = Math.floor(w / (h /maxThumbnailSize))+"px";
		}
		else
		{
			image.style.width = maxThumbnailSize+"px";
			image.style.height = Math.floor(h / (w /maxThumbnailSize))+"px";
		}
	}

}


