﻿﻿$(document).ready(function() {
    $('#ddLPtypes').change(function() {        
         if($('#ddLPtypes option:selected').text().toLowerCase()=="attend the lectures")
             {
              $('.divLect').show();
               $('.divPoster').hide();
             }
         else if($('#ddLPtypes option:selected').text().toLowerCase()=="present a poster" || $('#ddLPtypes option:selected').text().toLowerCase()=="attend the lectures and present a poster")
             {
              $('.divLect').hide();
              $('.divPoster').show();
             } 
    });
    
//    $('.sendEmailFunction').click( function() { window.open("/AdminRounds/SendEmail", "width=400; height=500; toolbar=no; menubar=no"); return false; });
        $('.sendEmailFunction').click( function() {
            $('#sendEmailID').show();  
        });
        $('.closeEmail').click( function() {
            $('#sendEmailID').hide();  
        });
    
    if($('#ddLPtypes option:selected').text().toLowerCase()=="attend the lectures")
        {
         $('.divLect').show();
         $('.divPoster').hide();
        }
        
     
     if($('#ddLPtypes option:selected').text().toLowerCase()=="present a poster")
        {
         $('.divLect').hide();
          $('.divPoster').show();
        }
        
      if($('#ddLPtypes option:selected').text().toLowerCase()=="attend the lectures and present a poster")
      {
      $('.divLect').hide();
          $('.divPoster').show();
      }
        
    $('#ddPresenter').change(function(){
        if($('#ddPresenter  option:selected').text().toLowerCase()=="the contact person for the poster")
           {
             $('.divPrePoster').show();
             $('.divPresenter').hide();
           }
           else
           {
           $('.divPresenter').show();
            $('.divPrePoster').hide();
           }
    });
    
    if($('#ddPresenter  option:selected').text().toLowerCase()=="the contact person for the poster")
       {
         $('.divPrePoster').show();
         $('.divPresenter').hide();
       }
    if($('#ddPresenter  option:selected').text().toLowerCase()=="the presenter")
       {
         $('.divPrePoster').hide();
         $('.divPresenter').show();
       }
    
       /*$('input[submit].btn').click(function(){
            if('#Name').val() == 'asd'){
            alert('hi');
            }
       });
       $('input[type=text].btn').click(function(){
            if($('form[action=/TellaFriend/Step2] #Name').val()==""){
                alert('hi');
            }
       });*/
});

function ADDFiles()
{
 var hdn= $('.hdnFileNO').val();
 hdn++;
 $('.hdnFileNO').val(hdn);
 $('.addUploadFiles').append(" <span class=\"field\"><input type=\"file\" id=\"File"+hdn+"\" name=\SourceFile"+hdn+"\" /></span><br/>");
 //increase the hidden value

}

