// JavaScript Document

function lfnchkval()
{
	var strmob= document.FrmONK.TxtCustMob.value
	
	if(document.FrmONK.TxtCustMob.value=='')
	{
	   alert('Enter Mobile No.');
	   document.FrmONK.TxtCustMob.focus();
	   return false;
	}
	else if( isNaN(document.FrmONK.TxtCustMob.value))
	{
	   alert('Mobile No. should be Number');
	   document.FrmONK.TxtCustMob.focus();
	   return false;
	}
	else if(strmob.length <10)
	{
	   alert('Enter correct Mobile No.');
	   document.FrmONK.TxtCustMob.focus();
	   return false;
	}
	else if(document.FrmONK.CboMobProvider.value=='')
	{
	   alert('Select Service Provider');
	   document.FrmONK.CboMobProvider.focus()
	   return false;
	}
	else
	{
		document.FrmONK.TxtCustMob.value='91'+document.FrmONK.TxtCustMob.value;
		document.FrmONK.submit();
	}
}


function change(count)
{		
	if(document.FrmONK.CboUploadcat.value=="")
	{
		alert('Select Category');
		document.FrmONK.CboUploadcat.focus();
		return false;
	}
	else if(document.FrmONK.fupload.value=="")
	{
		alert('Browse File');
		document.FrmONK.CboUploadcat.focus();
		return false;		
	}	
	else 
	{		
		return true;					
	}
}	 

function ismaxlength(obj)
 {
	var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
	if (obj.getAttribute && obj.value.length>mlength)
		{
		obj.value=obj.value.substring(0,mlength)
		alert('Address should not exceed '+ mlength +' characters');
		}
}
