﻿jQuery(function(){

//    $('#home-image-container').cycle('fade');

});

function ShowLoginForm(){
    $.nyroModalManual({
        url: 'Login.aspx',
          css: { // Default CSS option for the nyroModal Div. Some will be overwritten or updated when using IE6
    bg: {
      position: 'absolute',
      overflow: 'hidden',
      top: 0,
      left: 0,
      height: '100%',
      width: '100%'
    },
    wrapper: {
      position: 'absolute',
      top: '40%',
      left: '50%',
      height: '600px'
    },
    wrapper2: {
    },
    content: {
      overflow: 'hidden'
    },
    loading: {
      position: 'absolute',
      top: '50%',
      left: '50%',
      marginTop: '-50px',
      marginLeft: '-50px'
    }
  }
    });
    return false;
}

function ShowLogoutForm(){
    $.nyroModalManual({
        url: 'Logout.aspx',
        selIndicator: 'nyroModalSel',
        formIndicator: 'nyroModal'
    });
    return false;
}



function hideLoginContainerpay()
{
    jQuery(".Blanketpay").fadeOut(600);
}
function clearSearchText()
{
    jQuery("#tbxSearch").attr("value","");
}

function ToggleBasketView()
{
    $("#basket-contents-container").slideToggle(600);
}

function ToggleLegendView()
{
    $("#legend-content").slideToggle(600, function(){
        if($("#legend-content").css("display") == "none")
        {
            $("#legend-image").attr("src", "assets/visual/global/view-legend.gif");
        }
        else
        {
            $("#legend-image").attr("src", "assets/visual/global/hide-legend.gif");
        }
    });
}

function OpenReminder()
{
   
    jQuery(".Blanket").fadeIn(600);
}

function CloseReminder()
{
    jQuery(".Blanket").fadeOut(600);
}

function OpenNewReg()
{
    jQuery(".Blanket2").fadeIn(600);
}


function OpenAddReg()
{
    jQuery(".Blanket2").fadeOut(600);
    jQuery(".Blanket3").fadeIn(600);
}


function OpenErr()
{
  
    jQuery(".Blanket4").fadeIn(600);
}

function CloseErr()
{
    jQuery(".Blanket4").fadeOut(600);
}

function OpenPwd()
{
    jQuery(".BlanketPwd").fadeIn(600);
}


function OpenReg1()
{
    $(".dropdownfield").css("display","none");
   jQuery(".BlanketReg1").fadeIn(600);
}

function CloseReg1()
{
    $(".dropdownfield").css("display","block");
    jQuery(".BlanketReg1").fadeOut(600);
}

function OpenReg2()
{
    $(".dropdownfield").css("display","none");
    jQuery(".BlanketReg2").fadeIn(100);
    
    //$(".dropdownfield").css("display","none");
}

function CloseReg2()
{
    $(".dropdownfield").css("display","block");
    jQuery(".BlanketReg2").fadeOut(100);
}

function OpenReg3()
{   
    //$("#ctl00_ContentPlaceHolder1_salu").css("display","none");
    $(".dropdownfield").css("display","none");
    //setInterval(function(){
        jQuery(".BlanketReg3").fadeIn(100);
    //}, 100);
   
}
function OpenReg4()
{
    $(".dropdownfield").css("display","none");
    jQuery(".BlanketReg4").fadeIn(100);
}