// JavaScript Document
// run the currently selected effect

function runEffect(id) {
 	var toogleBox = document.getElementById(id);
 	$( toogleBox ).toggle( 'blind', 500);
};

// Notification Fade Close
function closeNotifications(id) {		
		var currentNotification = document.getElementById(id);
		$( currentNotification ).hide('fade',500 );
}
 
 
	function selectAll(className,mainId) {
 		 var mainStatus = document.getElementById(mainId);
 	     var allBox = document.getElementsByClassName(className) ;
 		 for(i=0;i<=(allBox.length-1);i++)    {
			  if(mainStatus.checked)
			     allBox[i].checked = true ;
			  else
			     allBox[i].checked = false ;
		 }
  	}
	
	function deleteRegistration(id,cid) {
		  var a = confirm('Confirm : Deleting Registration ?');
		  if(a) {
			   location.replace('actions/registerAct.php?did='+id+'&cid='+cid);
 		  }
	}
	
	function deleteTeamRegistration(id,cid) {
		  var a = confirm('Confirm : Deleting Team Registration ?');
		  if(a) {
			   location.replace('actions/teamAct.php?did='+id+'&cid='+cid);
 		  }
	}
	
	function changeAction(id,actionPage) {
		 var formname = document.getElementById(id);		
		 formname.action = actionPage;
		 formname.submit();
 	}
	
	function changeForm() {
	     document.getElementById('redirect').value = 1;	
		 document.getElementById('listcomp').submit();	
	}
 
