/**
* @author:Arun Bagdi
* BigDevil Inc
*/

function checkboxChange(which)
{
	if (document.images)
	{
		for (i=0;i<which.length;i++)
		{
			var tempobj=which.elements[i];
			if (tempobj.name.substring(0,8)=="chk_emai")
			{				
				if(which.checkboxed.checked==false)
					tempobj.checked=false;
				else
					tempobj.checked=true;												 
			}
		}
	}
}

function validation(which)
{	
	selected=0;
	if (document.images)
	{
		for (i=0;i<which.length;i++)
		{	
			var tempobj=which.elements[i];
			if (tempobj.name.substring(0,8)=="chk_emai")
			{
				if(tempobj.checked==true)	
				{	
				   //document.importList.action = "/search?action=sendInvitation";
				   document.importList.submit();
				   return false;     
				}   
			}   
		}
	}
	if(selected==0)
	  {
		  alert('Select atleast one email address to send invitation.');
		  return false;
	  }					
}   
	
function setDomain(form , domain )
{   
	for (i=0;i<form.length;i++)
	{
		var tempobj=form.elements[i];
		if (tempobj.name == "domain" )
		{	
			document.inviteAdd.domain.selectedIndex = domain;
		}  
	}
}