function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function validateBusinessDetails(myform)
{

	if((myform.ClientName.value == "")||(myform.ClientName.value == null))
	{
		errorNumber += 1;
		errorMSG += errorNumber+". Please enter the <b class=red>Client Name for Account</b><BR>";
		NotokToSubmit = 0;	
	}
	else
	{
		if((SK_validateForm('ClientName','','RisCHAR') != true))
		{
		errorNumber += 1;
		errorMSG += errorNumber+". <b class=red>Client Name for Account</b>, contains invalid characters<BR>";
		NotokToSubmit = 0;
		}
	}
	if ((myform.CompanyName.value == "") || (myform.CompanyName.value == null))
	{
		errorNumber += 1;
		errorMSG += errorNumber+". Please enter the <b class=red>Clients Company Name</b><BR>";
		NotokToSubmit = 0;	
	}
	else
	{
		if((SK_validateForm('CompanyName','','RisCHAR') != true))
		{
		errorNumber += 1;
		errorMSG += errorNumber+". your Clients Company Name, contains invalid characters<BR>";
		NotokToSubmit = 0;
		}
	}

	if ((myform.ContactPerson.value == "") || (myform.ContactPerson.value == null))
	{
		errorNumber += 1;
		errorMSG += errorNumber+". Please enter the name of the <b class=red>Contact Person</b><BR>";
		NotokToSubmit = 0;	
	}
	if ((myform.AccountsPerson.value == "") || (myform.AccountsPerson.value == null))
	{
		errorNumber += 1;
		errorMSG += errorNumber+". Please enter the name of the <b class=red>Accounts Person</b><BR>";
		NotokToSubmit = 0;	
	}		
}

function validateContactDetails(myform)
{
	if ((myform.Telephone.value == "") || (myform.Telephone.value == null) || (SK_validateForm('Telephone','','RisPhone') != true))
	{
		errorNumber += 1;
		errorMSG += errorNumber+". Please enter a valid numerical <b class=red>Phone number!</b><BR>";
		NotokToSubmit = 0;
	}	

	if ((myform.CellNumber.value != "") && (myform.CellNumber.value != null) && (SK_validateForm('CellNumber','','NisPhone') != true))
	{
		errorNumber += 1;
		errorMSG += errorNumber+". Please enter a valid numerical <b class=red>Cell number</b> or leave this field blank<BR>";
		NotokToSubmit = 0;	
	}

	if ((myform.ContactEmail.value == "") || (myform.ContactEmail.value == null) || (SK_validateForm('ContactEmail','','RisEmail') != true))
	{
		errorNumber += 1;
		errorMSG += errorNumber+". Please enter a valid <b class=red>Contact Email Address </b>(required to contact you)<BR>";
		NotokToSubmit = 0;	
	}

	if ((myform.PABXModel.value == "") || (myform.PABXModel.value == null))
	{
		errorNumber += 1;
		errorMSG += errorNumber+". Please enter the <b class=red>PABX Model</b> - this will aid us in giving the correct support<BR>";
		NotokToSubmit = 0;	
	}

//	if ((myform.AccountsEmail.value == "") || (myform.AccountsEmail.value == null) || (SK_validateForm('AccountsEmail','','RisEmail') != true))
//	{
//		errorNumber += 1;
//		errorMSG += errorNumber+". Please enter a valid <b class=red>Accounts Email Address </b>(required to invoice accounts)<BR>";
//		NotokToSubmit = 0;	
//	}

}

//-->