function validEmpty()
{


  for(i=0;i<10;i++)
 {

  if (i==0 || i==1 || i==2 || i==4 || i==7 || i==9 )
    {
  
     val=document.frmJoin.elements[i].value
     if(val=="")
       {
	   
	  
	  	alert("Please insert all required data")
		
	    document.frmJoin.elements[i].focus()
	    document.frmJoin.elements[i].select()
	    return false
	    }//if
	 
	 }//if
	 
 }//for
return true;

   }//fun
   
///////////////////////////////////////////////////////
///////////////////////////////////////////////////////   
 function validMail(y)
{

if(y.value.length>0)
{
	if (y.value.indexOf("@")== "-1" || y.value.indexOf(".")== "-1")
	{
	alert("Please enter a valid email.");
	y.focus();
	return (false);
	}
	
	
}

return true;

}
//////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////

function validEmptyGeneral(x)
{

if(x.value == "" || x.value == 0)
	{
	alert("Please insert all required data")
	x.select
	x.focus()
	return false;
	}
	
	return true;
}//whene call it  validateEmptyGeneral(formName.elementName)
///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////*/

function validNum(y)
{
	
/////////////////////////////////////////////

 val=y.value ;

if (val!="")

{
   
    str="0123456789";
    len=y.value.length;
	//alert(len)

   for(x=0;x<len;x++ )
      {
        if(str.indexOf(y.value.charAt(x))==-1)
        {
         alert("please Insert Number Only")
         y.focus();
		 y.select()
      
         return false;
       }//if
 
   }//for
   
 }//if
 
 
 return true;
 }

////////////////////////////////////////
////////////////////////////////////////
function validYear(x)
{
val=x.value ;
if (val!="")
{
  if(x.value.length!=4)
   {
     alert("Year must be 4 digits")
     x.focus();
     x.select();
     return false;
    }//if
 }//if
 return true;
 
 }//fun
/////////////////////////////////////////////
function validChar(x)
{
str="0123456789"

val=x.value
len=val.length

for(i=0;i<len;i++)
  {
  ch=val.charAt(i)
  if(str.indexOf(ch)!=-1)
    {
	alert("Please enter a valid name")
	x.focus()
	x.select()
	return false
    }
  }

  return true
}

////////////////////////////////////////////////
function checkLogin(ID)
{


 if (ID==0)
   {
    alert("You Must Login First");
    return false
   }

return true

}

////////////////checkRad///////////////////////////

function checkRad()
{

len=document.frmRegister.radPack.length


if(len==null)
{
if(document.frmRegister.radPack.checked)
  return true
alert (" Choose Package First ")
return false
}

else
{

for(i=0;i<len;i++)
  {
  if(document.frmRegister.radPack[i].checked)
   return true
  
  }//for
 
  alert (" Choose Package First ")
  return false
 }//else
  
}//function
///////////////////////////////////////////////////////////////////