/*
 * Version: $Revision: 1.10 $
 * Author: BeSite <info@besite.nl>
 * Copyright 2007 BeSite
 */

function SwapMainImage( iId, sThumbUrl, sUrl, sDescription, sMarginTop )
{
    var img = document.getElementById( "MainMediaImg" );
    img.src = sThumbUrl;
    img.alt = sDescription;
    img.title = sDescription;
    img.style.marginTop = sMarginTop;
    img.onclick = function() { $("#ShopItemMediaThumb_" + iId).click(); };
}

function ShowShopContactFormItem()
{
    $("#ShopContactFormItem").hide();
    $("#ShopContactFormItem").fadeIn("slow");
}

function CloseShopContactFormItem()
{
    $("#ShopContactFormItem").fadeOut("slow");
}

function ShowShopOrderFormItem()
{
    $("#ShopOrderFormItem").hide();
    $("#ShopOrderFormItem").fadeIn("slow");
}

function CloseShopOrderFormItem()
{
    $("#ShopOrderFormItem").fadeOut("slow");
}

function ShowShopContents()
{
    var element = document.getElementById( 'ShopItemContents' );
    var txtMore = document.getElementById( 'ContentsMoreText' );
    var txtLess = document.getElementById( 'ContentsLessText' );
    if( element && txtMore && txtLess )
    {
        if ( element.style.display == "none" )
        {
            element.style.display = DisplayValue( "block" );
            txtMore.style.display = DisplayValue( "none" );
            txtLess.style.display = DisplayValue( "inline" );
        }
        else
        {
            element.style.display = DisplayValue( "none" );
            txtMore.style.display = DisplayValue( "inline" );
            txtLess.style.display = DisplayValue( "none" );
        }
    }
}