$(document).ready(function(){  	
  
  $('.rule').click(function(){
    $('#popupRem').fadeIn('slow');
  });
  
   
  $('#buttonClose').click(function(){
    $('#popupRem').fadeOut('slow');  
  });
  
  $('.rule2').click(function(){
    $('#popupRem2').fadeIn('slow');
  });
  
  $('#buttonClose2').click(function(){
    $('#popupRem2').fadeOut('slow');  
  });
  
   $('.rule3').click(function(){
    $('#popupRem3').fadeIn('slow');
  });
  
  $('#buttonClose3').click(function(){
    $('#popupRem3').fadeOut('slow');  
  });
  
   $('.rule4').click(function(){
    $('#popupRem4').fadeIn('slow');
  });
  
  $('#buttonClose4').click(function(){
    $('#popupRem4').fadeOut('slow');  
  });
  
    $('.rule5').click(function(){
    $('#popupRem5').fadeIn('slow');
  });
  
  $('#buttonClose5').click(function(){
    $('#popupRem5').fadeOut('slow');  
  });
  
  $('#buttonClose6').click(function(){
    $('#popupRem6').fadeOut('slow');  
  });
  
  $('#linkClose').click(function(){
    document.getElementById('forget_table').style.display='none';
	document.getElementById('login_table').style.display='';
    $('.popUp').fadeOut('slow');  
	$('.register_login').fadeIn('slow');
  });  

  $('.login_show').click(function(){   
	document.getElementById('forget_table').style.display='none';
	document.getElementById('login_table').style.display='';
    document.getElementById('password_table').style.display='none';
    document.getElementById('register_table').style.display='';  
	$('.register_login').fadeIn('slow');   
  
  });  
     
		  
  $('#buttonCloseMain').click(function(){    
    $('.register_login').fadeOut('slow');
    document.registration_form.type.checked = false;
    //document.getElementById('email_login').value = '';
    //document.getElementById('first_name').value = '';
    //document.getElementById('email').value = '';
    //document.getElementById('centername').value = '';
    //document.getElementById('ucode2').value = '';
    
  });
   
  $('.cancel_show').click(function(){   
    document.getElementById('forget_table').style.display='none';
    document.getElementById('login_table').style.display='';
    $('.register_login').fadeIn('slow');
  });     
});


  
function showhidefield()
{       
    
	for (index=0; index < document.registration_form.type.length; index++) {
        if (document.registration_form.type[index].checked) {
            var radioValue = document.registration_form.type[index].value;
            break;
        }
    }
	
    if(radioValue == 'teacher' || radioValue == 'student')
	{
        document.getElementById("hideablearea").style.display = "";
        document.getElementById("hideablearea1").style.display = ""; 
        document.getElementById("hideablearea2").style.display = ""; 
        document.getElementById("hideablearea3").style.display = ""; 
        document.getElementById("hideablegovtarea").style.display ="none";        
        document.getElementById("hideablegovtarea1").style.display ="none";        
    }
	else
	{
        document.getElementById("hideablearea").style.display = "none";
        document.getElementById("hideablearea1").style.display = "none"; 
        document.getElementById("hideablearea2").style.display = "none"; 
        document.getElementById("hideablearea3").style.display = "none"; 
        document.getElementById("hideablegovtarea").style.display ="";
        document.getElementById("hideablegovtarea1").style.display ="";
    }
	//alert(radioValue);
	if(radioValue=='teacher' || radioValue=='cilt')
	{	
		$('#teacherList1').hide();
		$('#teacherList').hide();
	}
	if(radioValue == "student")
	{	
		$('#teacherList1').show();
		$('#teacherList').show();
	}
}
