﻿// JScript File
var isFirst = "true";
function ShowRegistration()
{
    document.getElementById('divLoginRecovery').style.visibility='hidden';
    document.getElementById('divRegistration').style.visibility='visible';
    //document.getElementById('divOverlayer').style.visibility='visible';  
    
    document.getElementById('divPage').style.filter = "alpha(opacity=40)"; 
    //document.getElementById('divLogo').style.filter = "alpha(opacity=40)"; 
    document.getElementById('divLogoShop').style.filter = "alpha(opacity=40)";  
    
}   

function ShowLoginRecovery()
{
    document.getElementById('divRegistration').style.visibility='hidden';
    //document.getElementById('divOverlayer').style.visibility='hidden';    
    document.getElementById('divLoginRecovery').style.visibility='visible';
    document.getElementById('divPage').style.filter = "alpha(opacity=40)";
    document.getElementById('divLogoShop').style.filter = "alpha(opacity=40)";  
}    

function Cancel()
{
    document.getElementById('divLoginRecovery').style.visibility='hidden';
    document.getElementById('divRegistration').style.visibility='hidden'; 
    //document.getElementById('divOverlayer').style.visibility='hidden';   
    document.getElementById('divPage').style.filter = null;  
    // document.getElementById('divLogo').style.filter = null;  
      document.getElementById('divLogoShop').style.filter = null;  
      
}

function ShowDisabled()
{
    //alert('hier1');
    document.getElementById('divPage').style.filter ="alpha(opacity=40)";
    //alert('hier1');
    document.getElementById('divDisabled').style.visibility='visible'; 
    //alert('hier1');
}

function ShowDisabledCancel()
{
 //alert('hier1');
    document.getElementById('divPage').style.filter = null;  
     //alert('hier1');
    document.getElementById('divDisabled').style.visibility='hidden'; 
     //alert('hier1');
}

function InitPage()
{
  if (document.getElementById('ErrorMessage'))
  {
    ShowRegistration();
  }
}

function CheckboxChanged()
{
    //alert('in checkboxChanged');
    if(document.getElementById('Checkbox1').checked)
    {
        //alert('in submitConfirm');
        document.getElementById('submitConfirm').disabled = false;
        //alert('in submitConfirm');
    }
    else
    {
        document.getElementById('submitConfirm').disabled = true;
    }
}

function ShowConditions()
{
    document.getElementById('divConditions').style.visibility='visible';
    document.getElementById('divPage').style.filter = "alpha(opacity=40)";
    if (document.getElementById('divLogoShop'))
    {
        document.getElementById('divLogoShop').style.filter = "alpha(opacity=40)";
    }
    if (document.getElementById('divLogo'))
    {
        document.getElementById('divLogo').style.filter = "alpha(opacity=40)";
    }
}


function CancelConditions()
{
     document.getElementById('divConditions').style.visibility='hidden';
    document.getElementById('divPage').style.filter = null;
    if (document.getElementById('divLogoShop'))
    {
        document.getElementById('divLogoShop').style.filter = null;
    }
    if (document.getElementById('divLogo'))
    {
        document.getElementById('divLogo').style.filter = null;
    }
      
}

function ShowMovie()
{
  document.getElementById('divMovie').style.visibility='visible'; 
 document.getElementById('divPage').style.filter = "alpha(opacity=40)";
   if (document.getElementById('divLogoShop'))
    {
        document.getElementById('divLogoShop').style.filter = "alpha(opacity=40)";
    }
    if (document.getElementById('divLogo'))
    {
        document.getElementById('divLogo').style.filter = "alpha(opacity=40)";
    }
      if(document.getElementById('EmbedMovie').innerHTML=="")
  {
    document.getElementById('EmbedMovie').innerHTML = "<embed   src=\"film/bankproef.wmv\"  type=\"application/x-mplayer2\" name=\"MediaPlayer\" autostart=\"1\" showcontrols=\"1\" showstatusbar=\"0\" autorewind=\"1\" showdisplay=\"0\"></embed>";
  }       
}

function ShowMovieMenu()
{
  if(isFirst=="true")
  {
      document.getElementById('divMovie').style.visibility='visible'; 
    document.getElementById('divPage').style.filter = "alpha(opacity=40)";
    if (document.getElementById('divLogoShop'))
    {
        document.getElementById('divLogoShop').style.filter = "alpha(opacity=40)";
    }
    if (document.getElementById('divLogo'))
    {
        document.getElementById('divLogo').style.filter = "alpha(opacity=40)";
    }
    isFirst="false";
        if(document.getElementById('EmbedMovie').innerHTML=="")
    {
        document.getElementById('EmbedMovie').innerHTML = "<embed   src=\"film/bankproef.wmv\"  type=\"application/x-mplayer2\" name=\"MediaPlayer\" autostart=\"1\" showcontrols=\"1\" showstatusbar=\"0\" autorewind=\"1\" showdisplay=\"0\"></embed>";
    }   
  }
}
function CancelMovie()
{
    document.getElementById('divMovie').style.visibility='hidden';
     document.getElementById('divPage').style.filter = null; 
    if (document.getElementById('divLogoShop'))
    {
        document.getElementById('divLogoShop').style.filter = null;
    }
    if (document.getElementById('divLogo'))
    {
         document.getElementById('divLogo').style.filter = null;
    }
    
    
    document.getElementById('EmbedMovie').innerHTML="";
    
      
}

function changeInfoImage(number,productId)
{
    //alert('in changeInfo4 number = '+number+ ' productId = '+productId);
    if (document.getElementById('imgframe'))
    {
        //alert('1');
        //document.imgframe_name.src = "images/products/"+productId+"/"+productId+"_info_"+number+".jpg";
        var imgsrc = "images/products/"+productId+"/"+productId+"_info_"+number+".jpg"; 
        //alert(imgsrc);
        document.getElementById('imgframe').innerHTML =  "<img src='"+imgsrc+"' align='middle' />";
        //"<img src='images/products/"+productId+"/"+productId+"_info_"+number+".jpg' align='middle' />";
        //alert('2');
    
    }
}
