function format_news_entry(strDate, strText)
{
	return(strDate + "&nbsp" + strText);
}

function format_exhibition_entry(strName, strType, strGallery, strLocation)
{
    strFormat = "&middot;&nbsp;<em>" + strName + "</em>";
    
    if (strType != null)
       strFormat += "&nbsp;:&nbsp;" + strType;

    if (strGallery != null)
       strFormat += "&nbsp;:&nbsp;" + strGallery;

    if (strLocation != null)
       strFormat += "&nbsp;:&nbsp;" + strLocation;

	return(strFormat);
}

function format_commission_entry(strName, strType, strFor)
{
    strFormat = "&middot;&nbsp;<em>" + strName + "</em>";
    
    if (strType != null)
       strFormat += "&nbsp;:&nbsp;" + strType;

    if (strFor != null)
       strFormat += "&nbsp;:&nbsp;" + strFor;

	return(strFormat);
}

function format_award_entry(strName, strFrom)
{
    strFormat = "&middot;&nbsp;" + strFrom + "&nbsp;:&nbsp;" + strName;
    
	return(strFormat);
}

function format_curation_entry(strName, strRole, strFor)
{
    strFormat = "&middot;&nbsp;<em>" + strName + "</em>";
    
    if (strRole != null)
       strFormat += "&nbsp;:&nbsp;" + strRole;

    if (strFor != null)
       strFormat += "&nbsp;:&nbsp;" + strFor;

	return(strFormat);
}

function format_review_entry(strName, strTitle, strVenue, strLocation)
{
    strFormat = "&middot;&nbsp;" + strName;
    
    if (strTitle != null)
       strFormat += "&nbsp;:&nbsp;" + strTitle;

    if (strVenue != null)
       strFormat += "&nbsp;:&nbsp;" + strVenue;

    if (strLocation != null)
       strFormat += "&nbsp;:&nbsp;" + strLocation;

	return(strFormat);
}

function format_database_entry(strName, strLocation)
{
    strFormat = "&middot;&nbsp;" + strLocation + "&nbsp;:&nbsp;" + strName;

	return(strFormat);
}

function format_year(iYear)
{
   if (iYear == -1)
       return("PRES");
       
   if (iYear == 0)
       return("PEND");
       
   return(iYear + "");
}

function format_news_header(strHeader)
{
   	if (strHeader == "recent")
		return("Recent Artworks");

   	if (strHeader == "event")
		return("Exhibitions and Events");
		
   	if (strHeader == "event-current")
		return("[ Current ]");

   	if (strHeader == "event-pending")
		return("[ Pending ]");

	return("!!ERROR!!");
}

function format_menu_width(strMenu, strItem)
{
	if (strMenu == "cv")
	{
		if (strItem == "biography")
		    return(74);
		    
		if (strItem == "exhibitions")
		    return(83);
		    
		if (strItem == "commissions")
		    return(95);

		if (strItem == "awards")
		    return(53);

		if (strItem == "curation")
		    return(62);

		if (strItem == "reviews")
		    return(59);
	}

	if (strMenu == "main")
	{
		if (strItem == "artwork")
		    return(75);
		    
		if (strItem == "shop")
		    return(46);
	}

	return(0);
}

function loading_image_width()
{
	return(171);
}

function loading_image_height()
{
	return(41);
}
