// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//  FUNCTIONS - called by the ASP Pages 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

//*************************** WC-6 form fields calculations*******************************
//decimal is rounded to 2 digits & all these funtions are fired when submited or 
// exclusive click on the button
//**********************************************************************************

function CheckDateFormat(dField,nextField)
{
  var date1 = dField.value;
  var status = true;
  if (date1 != "")
  	{
     		if ((date1.length != 8) && (date1.length != 10))
     		{
				status = false;
				dField.focus();   				
				return status;		
	 		}	 		
 	}  	

 	if (date1.length == 8)
 	{
		var pos1=date1.indexOf('/');
		var pos2=date1.indexOf('/',pos1+1);
		var strMonth;
		var strDay;
		var strYear;		
		var newDate;
	
	
		if (pos1 != -1) 
		{
			strMonth=date1.substring(0,pos1);
			strDay=date1.substring(pos1+1,pos2);
			strYear=date1.substring(pos2+1);
		
			if (strMonth.length == 1)		
				strMonth = "0" + strMonth;
			
			if (strDay.length == 1)
				strDay = "0" + strDay;						
					
				newDate = strMonth + '/' + strDay  + '/' + strYear;
		}
		else 
		{				
				newDate = date1.substring(0,2) + '/' + date1.substring(2,4) + '/' + date1.substring(4)
        }
				dField.value = newDate;	 
 	}	 
	
		if (status)
   			nextField.focus();	
}

function getValidation() { 
	var validation = true;
	var DeptNo			= DocUpload.txtNAIC_DeptRecNo.value;	
	var SERFFNo			= DocUpload.txtSerffNo.value;
	var CompanyNo		= DocUpload.txtNAIC_Company_No.value;
	var companyName		= DocUpload.txtNAIC_Company_Name.value;
	var effectiveDate	= DocUpload.txtYear.value;
	var file			= DocUpload.fileField1.value;
	
	 if (DeptNo == "")  {
		alert('Please enter the Department Record Number.'); 
		DocUpload.txtNAIC_DeptRecNo.focus();
		return false;
	 }
	 
	 if (SERFFNo == "") {	
		alert('Please enter the SERFF Tracking Number.');
		DocUpload.txtSerffNo.focus();
		return false;	   
	 }
	 
	 if (CompanyNo == "") {	
		alert('Please enter the NAIC Number.');
		DocUpload.txtNAIC_Company_No.focus();
		return false;	   
	 }
	 
	 if (companyName == "") {	
		alert('Please enter the Company Name.');
		DocUpload.txtNAIC_Company_Name.focus();
		return false;	   
	 }
	 
	 if (effectiveDate == "") {	
		alert('Please enter the Effective Date and it must be in mm/dd/yyyy format.');
		DocUpload.txtYear.focus();
		return false;	   
	 }
	 
	 if (file == "") {	
		alert('Please load the file from your machine.');
		DocUpload.fileField1.focus();
		return false;	   
	 }
	 

			 	 	
     	 	 		
   return validation;
}

function rounding(num, d) { 
           n = Math.pow(10, !d ? 2 : d);
           return (Math.round(num*n) / n);
   }
   
function PCDTCurrentDate()
{
	if (isDate(document.frm_PCDT.Filling_Date.value)==false && document.frm_PCDT.Filling_Date.value!="")
	{ 	
		alert("Please Enter the Valid Date of Filing");
		document.frm_PCDT.Filling_Date.focus();
		return false;
	}
}   
function fillRenewDate()
{
	if (isDate(document.frm_PCDT.Eff_Date_New.value)==false && document.frm_PCDT.Eff_Date_New.value!="")
	{ 	
		alert("Please Enter the Valid New Effective Date");
		document.frm_PCDT.Eff_Date_New.focus();
		return false;
	}
	if (isDate(document.frm_PCDT.Eff_Date_Renewal.value)==false && document.frm_PCDT.Eff_Date_Renewal.value!="")
	{ 	
		alert("Please Enter the Valid Renewal Effective Date");
		document.frm_PCDT.Eff_Date_Renewal.focus();
		return false;
	}

	if (document.frm_PCDT.Eff_Date_New.value.length>0)
	{
		document.frm_PCDT.Eff_Date_Renewal.value=document.frm_PCDT.Eff_Date_New.value;
	}
}   
function FieldEmpty()
{

 if (document.frm_PCDT.OPTIN_MWCIA.checked==true)
 {

		document.frm_PCDT.OPTIN_Carrier.checked=false;  
		document.frm_PCDT.Check_Amount.disabled =true;
		document.frm_PCDT.Check.disabled =true;			

 }
else if (document.frm_PCDT.OPTIN_Carrier.checked==true)
 {
		
		document.frm_PCDT.OPTIN_MWCIA.checked=false;  
		document.frm_PCDT.Check.value ="";
		document.frm_PCDT.Check_Amount.value="";
		document.frm_PCDT.Check_Amount.disabled =false;
		document.frm_PCDT.Check.disabled =false;			
 }

/*	alert("Sajid");
	alert(document.frm_PCDT.OPTIN_MWCIA.value);
	alert(document.frm_PCDT.OPTIN_Carrier.value);
	if(document.frm_PCDT.OPTIN_MWCIA.value==true)
	{
		document.frm_PCDT.Check.value ="";
		document.frm_PCDT.Check_Amount.value="";
		document.frm_PCDT.Check.disabl ="";
		document.frm_PCDT.Check_Amount.value="";
	document.frm_PCDT.*/
}
function calculateA5() { 
	var A5;		
	A5 = rounding(Number((document.frm_WC6.Mfact.value * document.frm_WC6.UDfact.value * document.frm_WC6.Tfact.value * (1+Number(document.frm_WC6.LAE.value)))),3);
	
	document.frm_WC6.Lfact.value = A5;
	//document.form1.wc6txtLOSS_FACTOR.value = A5;			
}

function calculateB10() { 
	var B10;
	B10 = rounding((Number(document.frm_WC6.Comb.value) + Number(document.frm_WC6.OA.value)+ Number(document.frm_WC6.GE.value) + Number(document.frm_WC6.PTax.value) + Number(document.frm_WC6.OTax.value)),3);
	document.frm_WC6.TPE.value = B10;
	//document.form1.wc6txtTOT_PREM_EXP.value = B10;	
}

function calculateB13() { 
	var B13;
	B13 = rounding(eval(eval(Number(document.frm_WC6.TPE.value) + Number(document.frm_WC6.PROF.value)) + Number(document.frm_WC6.CII.value)), 3);
	document.frm_WC6.TPR.value = B13;
	//document.form1.wc6txtTOT_PREM_EXP_PROFIT.value = B13;	
}

function calculateB14() { 
	var B14;
	B14 = rounding((1.0 - Number(document.frm_WC6.TPR.value)),3);
	document.frm_WC6.ELAE.value = B14;
	//document.frm_WC6.SLCMul.value = B14;	
}

function calculateC() { 
	var c;
	c = rounding((document.frm_WC6.Lfact.value / document.frm_WC6.ELAE.value),3);
	
		if(isNaN(parseFloat(c)))
		{
				document.frm_WC6.FLCMul.value = 0;	

		}
		else
		{
			document.frm_WC6.FLCMul.value = c;	
		}

//	document.form1.wc6txtFORMULA_LCM.value = c;		
}

function calcformw6() { 
	calculateA5();
	calculateB10();
	calculateB13();
	calculateB14();
	calculateC();
	wc6_validation();

}

//*************************** On form submit function *******************************
// Main JS function.  Calls validation functions and then calculate functions
//**********************************************************************************
function validate_submit(callfor,callfrom) { 
	var wc1_falg=true;
	var wc6_falg=true;
	
	//---check for form requied and warning columns
	if (callfrom=="wc1") 
			{wc1_falg = wc1_validation();}
	if (callfrom=="wc6") 
		{wc6_falg = wc6_validation();}

	//---submitting forms	
	if ((wc1_falg==true)&&(wc6_falg==true))
	{	
		//---if calling from wc6 compute all values
		if (callfrom=="wc6")
			{calcformw6();}
			
		if (callfor == "wc6") 
			{
			document.form1.callfor.value="setvalue";
			document.form1.action="wc6.asp";
			document.form1.submit();
			}
		else if (callfor == "wc1") 
			{
			document.form1.callfor.value="setvalue";
			document.form1.action="wc1.asp";
			document.form1.submit();
			}			
		else if (callfor == "sor") 
			{
			document.form1.callfor.value="setvalue";
			document.form1.action="sor.asp";
			document.form1.submit();
			}			
		else if (callfor == "save") 	
			{
			document.form1.callfor.value="setvalue";
			document.form1.action="save.asp";
			document.form1.submit();
			}
		else if (callfor == "coverletter") 	
			{
			document.form1.callfor.value="setvalue";
			document.form1.action="coverletter.asp";
			document.form1.submit();
			}			
		return true;	
	}	
	else
		return false;
}


//added by -------- -------- start

function WC7Validate(var1,obj)
{
		if (obj == "r1c2")
		{
			if (var1 > 0)
			{
				document.WC7.r1c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
				document.WC7.r1c5.value = Math.round(document.WC7.r1c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r1c6.value = Math.round(document.WC7.r1c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}

		if (obj == "r2c2" && obj != null)
		{
			if (var1>0)
			{
				document.WC7.r2c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
				document.WC7.r2c5.value = Math.round(document.WC7.r2c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r2c6.value = Math.round(document.WC7.r2c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}

		if (obj == "r3c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r3c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			
				document.WC7.r3c5.value = Math.round(document.WC7.r3c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r3c6.value = Math.round(document.WC7.r3c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}

		if (obj == "r4c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r4c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);

				document.WC7.r4c5.value = Math.round(document.WC7.r4c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r4c6.value = Math.round(document.WC7.r4c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}

		if (obj == "r5c2"  && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r5c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    
			    document.WC7.r5c5.value = Math.round(document.WC7.r5c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r5c6.value = Math.round(document.WC7.r5c6.value*Math.pow(10,2))/Math.pow(10,2);

			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}

		if (obj == "r6c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r6c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
				document.WC7.r6c5.value = Math.round(document.WC7.r6c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r6c6.value = Math.round(document.WC7.r6c6.value*Math.pow(10,2))/Math.pow(10,2);

			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}

		if (obj == "r7c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r7c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
				document.WC7.r7c5.value = Math.round(document.WC7.r7c5.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}

		if (obj == "r7c3" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r7c3.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
				document.WC7.r7c6.value = Math.round(document.WC7.r7c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				document.WC7.r7c3.focus();
				return false;
			}*/
		}

		if (obj == "r7c4" && obj != null)
		{
			if (var1 < 10000000)
				{
					document.WC7.r7c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
				}
			/*	else
				{
					alert("Value must be numeric and less then 10,000,000");
					document.WC7.r7c4.focus();
					return false;
				}*/
		}
////////////////

		if (obj == "r9c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r9c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
				document.WC7.r9c5.value = Math.round(document.WC7.r9c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r9c6.value = Math.round(document.WC7.r9c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}

		if (obj == "r10c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r10c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
 			    document.WC7.r10c5.value = Math.round(document.WC7.r10c5.value*Math.pow(10,2))/Math.pow(10,2);
			    document.WC7.r10c6.value = Math.round(document.WC7.r10c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r11c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r11c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
				document.WC7.r11c5.value = Math.round(document.WC7.r11c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r11c6.value = Math.round(document.WC7.r11c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r12c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r12c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
				document.WC7.r12c5.value = Math.round(document.WC7.r12c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r12c6.value = Math.round(document.WC7.r12c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r13c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r13c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r13c5.value = Math.round(document.WC7.r13c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r13c6.value = Math.round(document.WC7.r13c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}

		if (obj == "r14c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r14c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r14c5.value = Math.round(document.WC7.r14c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r14c6.value = Math.round(document.WC7.r14c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}

		if (obj == "r15c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r15c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r15c5.value = Math.round(document.WC7.r15c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r15c6.value = Math.round(document.WC7.r15c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r16c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r16c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r16c5.value = Math.round(document.WC7.r16c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r16c6.value = Math.round(document.WC7.r16c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r17c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r17c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r17c5.value = Math.round(document.WC7.r17c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r17c6.value = Math.round(document.WC7.r17c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r18c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r18c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r18c5.value = Math.round(document.WC7.r18c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r18c6.value = Math.round(document.WC7.r18c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r19c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r19c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r19c5.value = Math.round(document.WC7.r19c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r19c6.value = Math.round(document.WC7.r19c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r20c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r20c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r20c5.value = Math.round(document.WC7.r20c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r20c6.value = Math.round(document.WC7.r20c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r21c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r21c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r21c5.value = Math.round(document.WC7.r21c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r21c6.value = Math.round(document.WC7.r21c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r22c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r22c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r22c5.value = Math.round(document.WC7.r22c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r22c6.value = Math.round(document.WC7.r22c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r23c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r23c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r23c5.value = Math.round(document.WC7.r23c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r23c6.value = Math.round(document.WC7.r23c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r24c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r24c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r24c5.value = Math.round(document.WC7.r24c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r24c6.value = Math.round(document.WC7.r24c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r25c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r25c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r25c5.value = Math.round(document.WC7.r25c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r25c6.value = Math.round(document.WC7.r25c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r26c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r26c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r26c5.value = Math.round(document.WC7.r26c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r26c6.value = Math.round(document.WC7.r26c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r27c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r27c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r27c5.value = Math.round(document.WC7.r27c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r27c6.value = Math.round(document.WC7.r27c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r28c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r28c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r28c5.value = Math.round(document.WC7.r28c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r28c6.value = Math.round(document.WC7.r28c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r29c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r29c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r29c5.value = Math.round(document.WC7.r29c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r29c6.value = Math.round(document.WC7.r29c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r30c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r30c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r30c5.value = Math.round(document.WC7.r30c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r30c6.value = Math.round(document.WC7.r30c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r31c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r31c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r31c5.value = Math.round(document.WC7.r31c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r31c6.value = Math.round(document.WC7.r31c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r32c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r32c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r32c5.value = Math.round(document.WC7.r32c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r32c6.value = Math.round(document.WC7.r32c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}
		if (obj == "r33c2" && obj != null)
		{
			if (var1 >0)
			{
				document.WC7.r33c2.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			    document.WC7.r33c5.value = Math.round(document.WC7.r33c5.value*Math.pow(10,2))/Math.pow(10,2);
				document.WC7.r33c6.value = Math.round(document.WC7.r33c6.value*Math.pow(10,2))/Math.pow(10,2);
			}
			/*else
			{
				alert("Value must be numeric and between 1.2 and 2.7");
				return false;
			}*/
		}

}

function WC1Validate(var1,obj)
{

		if(obj == "oeff_Rate")
		{
			if (document.frm_WC1.oeff_Rate.value!="")
			{
				document.frm_WC1.oeff_Rate.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			}
			if (document.frm_WC1.oeff_Rate.value>10)
			{
				showModalDialog("actuarial_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:425px");
				return true;
			}
		}
			
		if (obj == "mul")
		{
			if (var1 >= 1.3)
			{
				document.frm_WC1.mul.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			}
		}

		if (obj=="xconst" && document.frm_WC1.xconst.value!="")
		{
			if (var1 < 10000000)
			{
				document.frm_WC1.xconst.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			}
		}
	 
		if (obj=="lrginc" && document.frm_WC1.lrginc.value!="")
		{
			if (var1 < 10000000)
			{
				document.frm_WC1.lrginc.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			}
		}
	 
		if (obj=="smch")
		{
			if (var1 < 10000000 && document.frm_WC1.smch.value!="")
			{
				document.frm_WC1.smch.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			}
		}

		if (obj == "lmul")
		{
			//by Mohsin sb 18-08-2004
			if (var1 >= 1.3)
			//if (var1 >= 1.2)
			{
				document.frm_WC1.lmul.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			}
		}	 

		if (obj == "hmul")
		{
			//by Mohsin sb 18-08-2004
			if (var1 >= 1.3)
			//if (var1 <= 2.7)
			{
				document.frm_WC1.hmul.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			}
		}	 	 

		if (obj == "avmul")
		{
			//by Mohsin sb 18-08-2004
			if (var1 >= 1.3)
			//if (var1 < 10000000)
			{
				document.frm_WC1.avmul.value= (var1*Math.pow(10,3))/Math.pow(10,3);
				document.frm_WC1.avmul.value = roundnum3(document.frm_WC1.avmul.value);
			}
		} 
	
		if (obj == "exconst" && document.frm_WC1.exconst.value!="")
		{
			if (var1 < 10000000)
			{
				document.frm_WC1.exconst.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			}
		}

// new fields added start
		if (obj == "dev_largest_rate_increase" && document.frm_WC1.dev_largest_rate_increase.value!="")
		{
			if (var1 < 10000000)
			{
				document.frm_WC1.dev_largest_rate_increase.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			}
		}

		if (obj == "dev_smallest_rate_increase" && document.frm_WC1.dev_smallest_rate_increase.value!="")
		{
			if (var1 < 10000000)
			{
				document.frm_WC1.dev_smallest_rate_increase.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
			}
		}
	return true;

}
function wc7_validation()
{
	// row1
		if (document.WC7.r1c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r1c2.value=="" || document.WC7.r1c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r1c2.focus();
				return false;
			}		
	    }

	// row2
		if (document.WC7.r2c1 == null || document.WC7.r2c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r2c2.value=="" || document.WC7.r2c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r2c2.focus();
				return false;
			}		
	    }

	// row3
		if (document.WC7.r3c1 == null || document.WC7.r3c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r3c2.value=="" || document.WC7.r3c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r3c2.focus();
				return false;
			}		
	    }

	// row4
		if (document.WC7.r4c1 == null || document.WC7.r4c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r4c2.value=="" || document.WC7.r4c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r4c2.focus();
				return false;
			}		
	    }

	// row5
		if (document.WC7.r5c1 == null || document.WC7.r5c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r5c2.value=="" || document.WC7.r5c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r5c2.focus();
				return false;
			}		
	    }
	// row9
		if (document.WC7.r9c1 == null || document.WC7.r9c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r9c2.value=="" || document.WC7.r9c2.value<1.2)
			{
				//warning_flag = true;
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r9c2.focus();
				return false;
			}		
	    }

	// row10
		if (document.WC7.r10c1 == null || document.WC7.r10c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r10c2.value=="" || document.WC7.r10c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r10c2.focus();
				return false;
			}		
	    }

	// row11
		if (document.WC7.r11c1 == null || document.WC7.r11c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r11c2.value=="" || document.WC7.r11c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r11c2.focus();
				return false;
			}		
	    }
	    
	// row12
		if (document.WC7.r12c1== null || document.WC7.r12c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r12c2.value=="" || document.WC7.r12c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r12c2.focus();
				return false;
			}		
	    }

	// row13
		if (document.WC7.r13c1== null || document.WC7.r13c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r13c2.value=="" || document.WC7.r13c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r13c2.focus();
				return false;
			}		
	    }
	// row14
		if (document.WC7.r14c1== null || document.WC7.r14c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r14c2.value=="" || document.WC7.r14c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r14c2.focus();
				return false;
			}		
	    }
	// row15
		if (document.WC7.r15c1== null || document.WC7.r15c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r15c2.value=="" || document.WC7.r15c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r15c2.focus();
				return false;
			}		
	    }
	// row16
		if (document.WC7.r16c1== null || document.WC7.r16c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r16c2.value=="" || document.WC7.r16c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r16c2.focus();
				return false;
			}		
	    }
	// row17
		if (document.WC7.r17c1== null || document.WC7.r17c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r17c2.value=="" || document.WC7.r17c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r17c2.focus();
				return false;
			}		
	    }
	// row18
		if (document.WC7.r18c1== null || document.WC7.r18c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r18c2.value=="" || document.WC7.r18c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r18c2.focus();
				return false;
			}		
	    }
	// row19
		if (document.WC7.r19c1== null || document.WC7.r19c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r19c2.value=="" || document.WC7.r19c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r19c2.focus();
				return false;
			}		
	    }
	// row20
		if (document.WC7.r20c1== null || document.WC7.r20c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r20c2.value=="" || document.WC7.r20c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r20c2.focus();
				return false;
			}		
	    }
	// row21
		if (document.WC7.r21c1== null || document.WC7.r21c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r21c2.value=="" || document.WC7.r21c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r21c2.focus();
				return false;
			}		
	    }
	// row22
		if (document.WC7.r22c1== null || document.WC7.r22c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r22c2.value=="" || document.WC7.r22c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r22c2.focus();
				return false;
			}		
	    }
	// row23
		if (document.WC7.r23c1== null || document.WC7.r23c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r23c2.value=="" || document.WC7.r23c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r23c2.focus();
				return false;
			}		
	    }
	// row24
		if (document.WC7.r24c1== null || document.WC7.r24c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r24c2.value=="" || document.WC7.r24c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r24c2.focus();
				return false;
			}		
	    }
	// row25
		if (document.WC7.r25c1== null || document.WC7.r25c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r25c2.value=="" || document.WC7.r25c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r25c2.focus();
				return false;
			}		
	    }
	// row26
		if (document.WC7.r26c1== null || document.WC7.r26c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r26c2.value=="" || document.WC7.r26c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r26c2.focus();
				return false;
			}		
	    }
	// row27
		if (document.WC7.r27c1== null || document.WC7.r27c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r27c2.value=="" || document.WC7.r27c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r27c2.focus();
				return false;
			}		
	    }
	// row28
		if (document.WC7.r28c1== null || document.WC7.r28c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r28c2.value=="" || document.WC7.r28c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r28c2.focus();
				return false;
			}		
	    }
	// row29
		if (document.WC7.r29c1== null || document.WC7.r29c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r29c2.value=="" || document.WC7.r29c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r29c2.focus();
				return false;
			}		
	    }
	// row30
		if (document.WC7.r30c1== null || document.WC7.r30c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r30c2.value=="" || document.WC7.r30c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r30c2.focus();
				return false;
			}		
	    }
	// row31
		if (document.WC7.r31c1== null || document.WC7.r31c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r31c2.value=="" || document.WC7.r31c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r31c2.focus();
				return false;
			}		
	    }
	// row32
		if (document.WC7.r32c1== null || document.WC7.r32c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r32c2.value=="" || document.WC7.r32c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r32c2.focus();
				return false;
			}		
	    }
	// row33
		if (document.WC7.r33c1== null || document.WC7.r33c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.r33c2.value=="" || document.WC7.r33c2.value<1.2)
			{
				alert("Current Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r33c2.focus();
				return false;
			}		
	    }
	// row7column 2
	if (document.WC7.r1c1.value!="")
	{
		if (document.WC7.r7c2.value=="" || document.WC7.r7c2.value<1.2)
		{
				alert("Current Pure Premium Multiplier should be greater than or equal to 1.2");
				document.WC7.r7c2.focus();
				return false;
		}		

	// row7column 3
		if (document.WC7.r7c3.value=="" || document.WC7.r7c3.value<1.3)
		{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.r7c3.focus();
				return false;
		}		
	}

	// row7column 4
	if (document.WC7.r7c4.value=="")// || document.WC7.r7c4.value>=10000000 )
	{
			alert("Prior Year Written Premium should be less than 10,000,000");
			document.WC7.r7c4.focus();
			return false;
	}
		
	if (document.WC7.WC1_oeff_Rate.value >= 10 || document.WC7.attachments.value == "True" || document.WC7.deviations.value == "True")
	{
 		if (document.WC7.WC1_oeff_Rate.value >= 10 || document.WC7.deviations.value == "True")
 		{
			//showModalDialog("fasttrack_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
			return true;
		}
		else
		{
			//showModalDialog("fasttrack_msg1.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
			return true;
		}
	}
	return true;
}

function wc2_validation()
{
	// row1
		if (document.frm_WC2.r1c1.value=="" )
		{
			alert("Please enter atleast one Class No");
			document.frm_WC2.r1c1.focus();
			return false;
		}		
		else
		{
			if (document.frm_WC2.r1c3.value=="" || document.frm_WC2.r1c3.value>=10000000 )
			{
				alert("The Current Rate should be less than 10,000,000");
				document.frm_WC2.r1c3.focus();
				return false;
			}		

			if (document.frm_WC2.r1c4.value=="" || document.frm_WC2.r1c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r1c4.focus();
				return false;
			}		

			if (document.frm_WC2.r1c5.value=="" || document.frm_WC2.r1c5.value>=10000000 )
			{
				alert("The New Rate should be less than 10,000,000");
				document.frm_WC2.r1c5.focus();
				return false;
			}		

			if (document.frm_WC2.r1c6.value=="" || document.frm_WC2.r1c6.value>=10000000 )
			{
				alert("The Current Rate should be less than 10,000,000");
				document.frm_WC2.r1c6.focus();
				return false;
			}		

			if (document.frm_WC2.r1c7.value=="") // || document.frm_WC2.r1c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r1c7.focus();
				return false;
			}		
	    }	

	// row2
		if (document.frm_WC2.r2c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r2c3.value=="" || document.frm_WC2.r2c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r2c3.focus();
				return false;
			}		

			if (document.frm_WC2.r2c4.value=="" || document.frm_WC2.r2c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r2c4.focus();
				return false;
			}		

			if (document.frm_WC2.r2c5.value=="" || document.frm_WC2.r2c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");				
				document.frm_WC2.r2c5.focus();
				return false;
			}		

			if (document.frm_WC2.r2c6.value=="" || document.frm_WC2.r2c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r2c6.focus();
				return false;
			}		
			if (document.frm_WC2.r2c7.value=="") // || document.frm_WC2.r2c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r2c7.focus();
				return false;
			}		
	    }

	// row3
		if (document.frm_WC2.r3c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r3c3.value=="" || document.frm_WC2.r3c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");				
				document.frm_WC2.r3c3.focus();
				document.frm_WC2.r3c3.focus();
				return false;
			}		

			if (document.frm_WC2.r3c4.value=="" || document.frm_WC2.r3c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");				
				document.frm_WC2.r3c4.focus();
				document.frm_WC2.r3c4.focus();
				return false;
			}		

			if (document.frm_WC2.r3c5.value=="" || document.frm_WC2.r3c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r3c5.focus();
				return false;
			}		
			if (document.frm_WC2.r3c6.value=="" || document.frm_WC2.r3c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r3c6.focus();
				return false;
			}		

			if (document.frm_WC2.r3c7.value=="") // || document.frm_WC2.r3c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r3c7.focus();
				return false;
			}		
	    }

	// row4
		if (document.frm_WC2.r4c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r4c3.value=="" || document.frm_WC2.r4c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r4c3.focus();
				return false;
			}		

			if (document.frm_WC2.r4c4.value=="" || document.frm_WC2.r4c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r4c4.focus();
				return false;
			}		

			if (document.frm_WC2.r4c5.value=="" || document.frm_WC2.r4c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r4c5.focus();
				return false;
			}		
			if (document.frm_WC2.r4c6.value=="" || document.frm_WC2.r4c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r4c6.focus();
				return false;
			}		

			if (document.frm_WC2.r4c7.value=="") // || document.frm_WC2.r4c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r4c7.focus();
				return false;
			}		
	    }

	// row5
		if (document.frm_WC2.r5c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r5c3.value=="" || document.frm_WC2.r5c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r5c3.focus();
				return false;
			}		

			if (document.frm_WC2.r5c4.value=="" || document.frm_WC2.r5c4.value<1.3 )
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");				
				document.frm_WC2.r5c4.focus();
				return false;
			}		

			if (document.frm_WC2.r5c5.value=="" || document.frm_WC2.r5c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r5c5.focus();
				return false;
			}		

			if (document.frm_WC2.r5c6.value=="" || document.frm_WC2.r5c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r5c6.focus();
				return false;
			}		

			if (document.frm_WC2.r5c7.value=="") // || document.frm_WC2.r5c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r5c7.focus();
				return false;
			}		
	    }


	// row6
		if (document.frm_WC2.r6c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r6c3.value=="" || document.frm_WC2.r6c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r6c3.focus();
				return false;
			}		
			if (document.frm_WC2.r6c4.value=="" || document.frm_WC2.r6c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r6c4.focus();
				return false;
			}		

			if (document.frm_WC2.r6c5.value=="" || document.frm_WC2.r6c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r6c5.focus();
				return false;
			}		

			if (document.frm_WC2.r6c6.value=="" || document.frm_WC2.r6c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r6c6.focus();
				return false;
			}		

			if (document.frm_WC2.r6c7.value=="") // || document.frm_WC2.r6c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r6c7.focus();
				return false;
			}		
	    }

	// row7
		if (document.frm_WC2.r7c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r7c3.value=="" || document.frm_WC2.r7c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r7c3.focus();
				return false;
			}		

			if (document.frm_WC2.r7c4.value=="" || document.frm_WC2.r7c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r7c4.focus();
				return false;
			}		

			if (document.frm_WC2.r7c5.value=="" || document.frm_WC2.r7c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r7c5.focus();
				return false;
			}		

			if (document.frm_WC2.r7c6.value=="" || document.frm_WC2.r7c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r7c6.focus();
				return false;
			}		

			if (document.frm_WC2.r7c7.value=="") // || document.frm_WC2.r7c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r7c7.focus();
				return false;
			}		
	    }

	// row8
		if (document.frm_WC2.r8c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r8c3.value=="" || document.frm_WC2.r8c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r8c3.focus();
				return false;
			}		
			if (document.frm_WC2.r8c4.value=="" || document.frm_WC2.r8c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r8c4.focus();
				return false;
			}		

			if (document.frm_WC2.r8c5.value=="" || document.frm_WC2.r8c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r8c5.focus();
				return false;
			}		

			if (document.frm_WC2.r8c6.value=="" || document.frm_WC2.r8c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r8c6.focus();
				return false;
			}		
			if (document.frm_WC2.r8c7.value=="") // || document.frm_WC2.r8c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r8c7.focus();
				return false;
			}		
	    }

	// row9
		if (document.frm_WC2.r9c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r9c3.value=="" || document.frm_WC2.r9c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r9c3.focus();
				return false;
			}		
			if (document.frm_WC2.r9c4.value=="" || document.frm_WC2.r9c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");				
				document.frm_WC2.r9c4.focus();
				return false;
			}		
			if (document.frm_WC2.r9c5.value=="" || document.frm_WC2.r9c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r9c5.focus();
				return false;
			}		

			if (document.frm_WC2.r9c6.value=="" || document.frm_WC2.r9c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r9c6.focus();
				return false;
			}		

			if (document.frm_WC2.r9c7.value=="") // || document.frm_WC2.r9c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r9c7.focus();
				return false;
			}		
	    }

	// row10
		if (document.frm_WC2.r10c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r10c3.value=="" || document.frm_WC2.r10c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r10c3.focus();
				return false;
			}		
			if (document.frm_WC2.r10c4.value=="" || document.frm_WC2.r10c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r10c4.focus();
				return false;
			}		

			if (document.frm_WC2.r10c5.value=="" || document.frm_WC2.r10c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r10c5.focus();
				return false;
			}		
			if (document.frm_WC2.r10c6.value=="" || document.frm_WC2.r10c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r10c6.focus();
				return false;
			}		
			if (document.frm_WC2.r10c7.value=="") // || document.frm_WC2.r10c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r10c7.focus();
				return false;
			}		
	    }
	// row11
		if (document.frm_WC2.r11c1== null || document.frm_WC2.r11c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r11c3.value=="" || document.frm_WC2.r11c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r11c3.focus();
				return false;
			}		
			if (document.frm_WC2.r11c4.value=="" || document.frm_WC2.r11c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r11c4.focus();
				return false;
			}		

			if (document.frm_WC2.r11c5.value=="" || document.frm_WC2.r11c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r11c5.focus();
				return false;
			}		
			if (document.frm_WC2.r11c6.value=="" || document.frm_WC2.r11c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r11c6.focus();
				return false;
			}		
			if (document.frm_WC2.r11c7.value=="") // || document.frm_WC2.r11c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r11c7.focus();
				return false;
			}		
	    }
	// row12
		if (document.frm_WC2.r12c1== null || document.frm_WC2.r12c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r12c3.value=="" || document.frm_WC2.r12c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r12c3.focus();
				return false;
			}		
			if (document.frm_WC2.r12c4.value=="" || document.frm_WC2.r12c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r12c4.focus();
				return false;
			}		

			if (document.frm_WC2.r12c5.value=="" || document.frm_WC2.r12c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r12c5.focus();
				return false;
			}		
			if (document.frm_WC2.r12c6.value=="" || document.frm_WC2.r12c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r12c6.focus();
				return false;
			}		
			if (document.frm_WC2.r12c7.value=="") // || document.frm_WC2.r12c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r12c7.focus();
				return false;
			}		
	    }
	// row13
		if (document.frm_WC2.r13c1== null || document.frm_WC2.r13c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r13c3.value=="" || document.frm_WC2.r13c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r13c3.focus();
				return false;
			}		
			if (document.frm_WC2.r13c4.value=="" || document.frm_WC2.r13c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r13c4.focus();
				return false;
			}		

			if (document.frm_WC2.r13c5.value=="" || document.frm_WC2.r13c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r13c5.focus();
				return false;
			}		
			if (document.frm_WC2.r13c6.value=="" || document.frm_WC2.r13c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r13c6.focus();
				return false;
			}		
			if (document.frm_WC2.r13c7.value=="") // || document.frm_WC2.r13c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r13c7.focus();
				return false;
			}		
	    }
	// row14
		if (document.frm_WC2.r14c1== null || document.frm_WC2.r14c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r14c3.value=="" || document.frm_WC2.r14c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r14c3.focus();
				return false;
			}		
			if (document.frm_WC2.r14c4.value=="" || document.frm_WC2.r14c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r14c4.focus();
				return false;
			}		

			if (document.frm_WC2.r14c5.value=="" || document.frm_WC2.r14c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r14c5.focus();
				return false;
			}		
			if (document.frm_WC2.r14c6.value=="" || document.frm_WC2.r14c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r14c6.focus();
				return false;
			}		
			if (document.frm_WC2.r14c7.value=="") // || document.frm_WC2.r14c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r14c7.focus();
				return false;
			}		
	    }
	// row15
		if (document.frm_WC2.r15c1== null || document.frm_WC2.r15c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r15c3.value=="" || document.frm_WC2.r15c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r15c3.focus();
				return false;
			}		
			if (document.frm_WC2.r15c4.value=="" || document.frm_WC2.r15c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r15c4.focus();
				return false;
			}		

			if (document.frm_WC2.r15c5.value=="" || document.frm_WC2.r15c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r15c5.focus();
				return false;
			}		
			if (document.frm_WC2.r15c6.value=="" || document.frm_WC2.r15c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r15c6.focus();
				return false;
			}		
			if (document.frm_WC2.r15c7.value=="") // || document.frm_WC2.r15c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r15c7.focus();
				return false;
			}		
	    }
	// row16
		if (document.frm_WC2.r16c1== null || document.frm_WC2.r16c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r16c3.value=="" || document.frm_WC2.r16c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r16c3.focus();
				return false;
			}		
			if (document.frm_WC2.r16c4.value=="" || document.frm_WC2.r16c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r16c4.focus();
				return false;
			}		

			if (document.frm_WC2.r16c5.value=="" || document.frm_WC2.r16c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r16c5.focus();
				return false;
			}		
			if (document.frm_WC2.r16c6.value=="" || document.frm_WC2.r16c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r16c6.focus();
				return false;
			}		
			if (document.frm_WC2.r16c7.value=="") // || document.frm_WC2.r16c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r16c7.focus();
				return false;
			}		
	    }
	// row17
		if (document.frm_WC2.r17c1== null || document.frm_WC2.r17c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r17c3.value=="" || document.frm_WC2.r17c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r17c3.focus();
				return false;
			}		
			if (document.frm_WC2.r17c4.value=="" || document.frm_WC2.r17c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r17c4.focus();
				return false;
			}		

			if (document.frm_WC2.r17c5.value=="" || document.frm_WC2.r17c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r17c5.focus();
				return false;
			}		
			if (document.frm_WC2.r17c6.value=="" || document.frm_WC2.r17c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r17c6.focus();
				return false;
			}		
			if (document.frm_WC2.r17c7.value=="") // || document.frm_WC2.r17c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r17c7.focus();
				return false;
			}		
	    }
	// row18
		if (document.frm_WC2.r18c1== null || document.frm_WC2.r18c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r18c3.value=="" || document.frm_WC2.r18c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r18c3.focus();
				return false;
			}		
			if (document.frm_WC2.r18c4.value=="" || document.frm_WC2.r18c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r18c4.focus();
				return false;
			}		

			if (document.frm_WC2.r18c5.value=="" || document.frm_WC2.r18c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r18c5.focus();
				return false;
			}		
			if (document.frm_WC2.r18c6.value=="" || document.frm_WC2.r18c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r18c6.focus();
				return false;
			}		
			if (document.frm_WC2.r18c7.value=="") // || document.frm_WC2.r18c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r18c7.focus();
				return false;
			}		
	    }
	// row19
		if (document.frm_WC2.r19c1== null || document.frm_WC2.r19c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r19c3.value=="" || document.frm_WC2.r19c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r19c3.focus();
				return false;
			}		
			if (document.frm_WC2.r19c4.value=="" || document.frm_WC2.r19c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r19c4.focus();
				return false;
			}		

			if (document.frm_WC2.r19c5.value=="" || document.frm_WC2.r19c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r19c5.focus();
				return false;
			}		
			if (document.frm_WC2.r19c6.value=="" || document.frm_WC2.r19c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r19c6.focus();
				return false;
			}		
			if (document.frm_WC2.r19c7.value=="") // || document.frm_WC2.r19c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r19c7.focus();
				return false;
			}		
	    }
	// row20
		if (document.frm_WC2.r20c1== null || document.frm_WC2.r20c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r20c3.value=="" || document.frm_WC2.r20c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r20c3.focus();
				return false;
			}		
			if (document.frm_WC2.r20c4.value=="" || document.frm_WC2.r20c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r20c4.focus();
				return false;
			}		

			if (document.frm_WC2.r20c5.value=="" || document.frm_WC2.r20c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r20c5.focus();
				return false;
			}		
			if (document.frm_WC2.r20c6.value=="" || document.frm_WC2.r20c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r20c6.focus();
				return false;
			}		
			if (document.frm_WC2.r20c7.value=="") // || document.frm_WC2.r20c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r20c7.focus();
				return false;
			}		
	    }
	// row21
		if (document.frm_WC2.r21c1== null || document.frm_WC2.r21c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r21c3.value=="" || document.frm_WC2.r21c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r21c3.focus();
				return false;
			}		
			if (document.frm_WC2.r21c4.value=="" || document.frm_WC2.r21c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r21c4.focus();
				return false;
			}		

			if (document.frm_WC2.r21c5.value=="" || document.frm_WC2.r21c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r21c5.focus();
				return false;
			}		
			if (document.frm_WC2.r21c6.value=="" || document.frm_WC2.r21c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r21c6.focus();
				return false;
			}		
			if (document.frm_WC2.r21c7.value=="") // || document.frm_WC2.r21c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r21c7.focus();
				return false;
			}		
	    }
	// row22
		if (document.frm_WC2.r22c1== null || document.frm_WC2.r22c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r22c3.value=="" || document.frm_WC2.r22c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r22c3.focus();
				return false;
			}		
			if (document.frm_WC2.r22c4.value=="" || document.frm_WC2.r22c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r22c4.focus();
				return false;
			}		

			if (document.frm_WC2.r22c5.value=="" || document.frm_WC2.r22c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r22c5.focus();
				return false;
			}		
			if (document.frm_WC2.r22c6.value=="" || document.frm_WC2.r22c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r22c6.focus();
				return false;
			}		
			if (document.frm_WC2.r22c7.value=="") // || document.frm_WC2.r22c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r22c7.focus();
				return false;
			}		
	    }
	// row23
		if (document.frm_WC2.r23c1== null || document.frm_WC2.r23c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r23c3.value=="" || document.frm_WC2.r23c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r23c3.focus();
				return false;
			}		
			if (document.frm_WC2.r23c4.value=="" || document.frm_WC2.r23c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r23c4.focus();
				return false;
			}		

			if (document.frm_WC2.r23c5.value=="" || document.frm_WC2.r23c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r23c5.focus();
				return false;
			}		
			if (document.frm_WC2.r23c6.value=="" || document.frm_WC2.r23c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r23c6.focus();
				return false;
			}		
			if (document.frm_WC2.r23c7.value=="") // || document.frm_WC2.r23c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r23c7.focus();
				return false;
			}		
	    }
	// row24
		if (document.frm_WC2.r24c1== null || document.frm_WC2.r24c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r24c3.value=="" || document.frm_WC2.r24c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r24c3.focus();
				return false;
			}		
			if (document.frm_WC2.r24c4.value=="" || document.frm_WC2.r24c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r24c4.focus();
				return false;
			}		

			if (document.frm_WC2.r24c5.value=="" || document.frm_WC2.r24c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r24c5.focus();
				return false;
			}		
			if (document.frm_WC2.r24c6.value=="" || document.frm_WC2.r24c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r24c6.focus();
				return false;
			}		
			if (document.frm_WC2.r24c7.value=="") // || document.frm_WC2.r24c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r24c7.focus();
				return false;
			}		
	    }
	// row25
		if (document.frm_WC2.r25c1== null || document.frm_WC2.r25c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r25c3.value=="" || document.frm_WC2.r25c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r25c3.focus();
				return false;
			}		
			if (document.frm_WC2.r25c4.value=="" || document.frm_WC2.r25c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r25c4.focus();
				return false;
			}		

			if (document.frm_WC2.r25c5.value=="" || document.frm_WC2.r25c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r25c5.focus();
				return false;
			}		
			if (document.frm_WC2.r25c6.value=="" || document.frm_WC2.r25c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r25c6.focus();
				return false;
			}		
			if (document.frm_WC2.r25c7.value=="") // || document.frm_WC2.r25c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r25c7.focus();
				return false;
			}		
	    }
	// row26
		if (document.frm_WC2.r26c1== null || document.frm_WC2.r26c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r26c3.value=="" || document.frm_WC2.r26c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r26c3.focus();
				return false;
			}		
			if (document.frm_WC2.r26c4.value=="" || document.frm_WC2.r26c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r26c4.focus();
				return false;
			}		

			if (document.frm_WC2.r26c5.value=="" || document.frm_WC2.r26c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r26c5.focus();
				return false;
			}		
			if (document.frm_WC2.r26c6.value=="" || document.frm_WC2.r26c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r26c6.focus();
				return false;
			}		
			if (document.frm_WC2.r26c7.value=="") // || document.frm_WC2.r26c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r26c7.focus();
				return false;
			}		
	    }
	// row27
		if (document.frm_WC2.r27c1== null || document.frm_WC2.r27c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r27c3.value=="" || document.frm_WC2.r27c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r27c3.focus();
				return false;
			}		
			if (document.frm_WC2.r27c4.value=="" || document.frm_WC2.r27c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r27c4.focus();
				return false;
			}		

			if (document.frm_WC2.r27c5.value=="" || document.frm_WC2.r27c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r27c5.focus();
				return false;
			}		
			if (document.frm_WC2.r27c6.value=="" || document.frm_WC2.r27c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r27c6.focus();
				return false;
			}		
			if (document.frm_WC2.r27c7.value=="") // || document.frm_WC2.r27c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r27c7.focus();
				return false;
			}		
	    }
	// row28
		if (document.frm_WC2.r28c1== null || document.frm_WC2.r28c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r28c3.value=="" || document.frm_WC2.r28c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r28c3.focus();
				return false;
			}		
			if (document.frm_WC2.r28c4.value=="" || document.frm_WC2.r28c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r28c4.focus();
				return false;
			}		

			if (document.frm_WC2.r28c5.value=="" || document.frm_WC2.r28c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r28c5.focus();
				return false;
			}		
			if (document.frm_WC2.r28c6.value=="" || document.frm_WC2.r28c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r28c6.focus();
				return false;
			}		
			if (document.frm_WC2.r28c7.value=="") // || document.frm_WC2.r28c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r28c7.focus();
				return false;
			}		
	    }
	// row29
		if (document.frm_WC2.r29c1== null || document.frm_WC2.r29c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r29c3.value=="" || document.frm_WC2.r29c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r29c3.focus();
				return false;
			}		
			if (document.frm_WC2.r29c4.value=="" || document.frm_WC2.r29c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r29c4.focus();
				return false;
			}		

			if (document.frm_WC2.r29c5.value=="" || document.frm_WC2.r29c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r29c5.focus();
				return false;
			}		
			if (document.frm_WC2.r29c6.value=="" || document.frm_WC2.r29c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r29c6.focus();
				return false;
			}		
			if (document.frm_WC2.r29c7.value=="") // || document.frm_WC2.r29c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r29c7.focus();
				return false;
			}		
	    }
	// row30
		if (document.frm_WC2.r30c1== null || document.frm_WC2.r30c1.value=="" )
		{
		}		
		else
		{
			if (document.frm_WC2.r30c3.value=="" || document.frm_WC2.r30c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.frm_WC2.r30c3.focus();
				return false;
			}		
			if (document.frm_WC2.r30c4.value=="" || document.frm_WC2.r30c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.frm_WC2.r30c4.focus();
				return false;
			}		

			if (document.frm_WC2.r30c5.value=="" || document.frm_WC2.r30c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.frm_WC2.r30c5.focus();
				return false;
			}		
			if (document.frm_WC2.r30c6.value=="" || document.frm_WC2.r30c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.frm_WC2.r30c6.focus();
				return false;
			}		
			if (document.frm_WC2.r30c7.value=="") // || document.frm_WC2.r30c7.value>=10000000 )
			{
				//alert("Prior Year Written Premium should be less than 10,000,000");
				alert("Prior Year Written Premium should be greater than 0.");
				document.frm_WC2.r30c7.focus();
				return false;
			}		
	    }

	return true;
}
// new check end

function WC6Validate(var1,obj)
{
	 if (obj=="Mfact")
	 {
		if(document.frm_WC6.Mfact.value>0)
		{
			document.frm_WC6.Mfact.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
		}
	  }
	 if (obj=="UDfact")
	 {
		if(document.frm_WC6.UDfact.value>0)
		{	
			document.frm_WC6.UDfact.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
		}
	 }	
	
	 if (obj=="Tfact")
	{
	 	if(document.frm_WC6.Tfact.value>0)
		{	
			document.frm_WC6.Tfact.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
		}
	}
	 if (obj=="LAE")
	{
	 	if(document.frm_WC6.LAE.value>0)
		{	
			document.frm_WC6.LAE.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
		}
	}
	
	 if (obj=="Comb")
	 {
	 	if(document.frm_WC6.Comb.value>0)
	 	{
			document.frm_WC6.Comb.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
		}
	 }	
	 if (obj=="OA")
	 {
	 	if(document.frm_WC6.OA.value>0)
	 	{
			document.frm_WC6.OA.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
		}
	 }
	 if (obj=="GE")
	 {
	 	if(document.frm_WC6.GE.value>0)
	 	{
			document.frm_WC6.GE.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
		}
	 }
	
	 if (obj=="PTax")
	 {
		if(document.frm_WC6.PTax.value>0)
		{	
		 	document.frm_WC6.PTax.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
		}
	
	 }
		
	 if (obj=="OTax")
	 {
	 	if(document.frm_WC6.OTax.value>0)
	 	{
			document.frm_WC6.OTax.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
		}
	 }
	  
	 if (obj=="PROF")
	 {
	 	if(document.frm_WC6.PROF.value>0)
	 	{
			document.frm_WC6.PROF.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
		}
	 }
	
	 if (obj=="CII")
	 {
	 	if(document.frm_WC6.CII.value>0)
	 	{
			document.frm_WC6.CII.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
		}
	 }
		
	 if (obj=="FLCMul")
	 {
	 	if(document.frm_WC6.FLCMul.value>0)
		{	
			document.frm_WC6.FLCMul.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	     }
	 }
	 if (obj=="SLCMul")
	 {
	 	if(document.frm_WC6.SLCMul.value>0)
		{	
			document.frm_WC6.SLCMul.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
		}
	 }








	return true;
}


// for wc2 validation
function RangeWrtPrmCheck(var1,obj)
   {
/*	 if (obj=="r1c7")
		document.frm_WC2.r1c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);*/
  
   if( var1 < 10000000 )
   {
	 if (obj=="r1c7")
		document.frm_WC2.r1c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r2c7")
		document.frm_WC2.r2c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r3c7")
		document.frm_WC2.r3c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r4c7")
		document.frm_WC2.r4c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r5c7")
		document.frm_WC2.r5c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
   	 if (obj=="r6c7")
		document.frm_WC2.r6c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r7c7")
		document.frm_WC2.r7c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r8c7")
		document.frm_WC2.r8c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r9c7")
		document.frm_WC2.r9c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r10c7")
		document.frm_WC2.r10c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r11c7" && obj != null)
		document.frm_WC2.r11c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r12c7" && obj != null)
		document.frm_WC2.r12c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r13c7" && obj != null)
		document.frm_WC2.r13c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r14c7" && obj != null)
		document.frm_WC2.r14c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r15c7" && obj != null)
		document.frm_WC2.r15c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
   	 if (obj=="r16c7" && obj != null)
		document.frm_WC2.r16c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r17c7" && obj != null)
		document.frm_WC2.r17c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r18c7" && obj != null)
		document.frm_WC2.r18c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r19c7" && obj != null)
		document.frm_WC2.r19c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r20c7" && obj != null)
		document.frm_WC2.r20c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r21c7" && obj != null)
		document.frm_WC2.r21c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r22c7" && obj != null)
		document.frm_WC2.r22c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r23c7" && obj != null)
		document.frm_WC2.r23c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r24c7" && obj != null)
		document.frm_WC2.r24c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r25c7" && obj != null)
		document.frm_WC2.r25c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
   	 if (obj=="r26c7" && obj != null)
		document.frm_WC2.r26c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r27c7" && obj != null)
		document.frm_WC2.r27c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r28c7" && obj != null)
		document.frm_WC2.r28c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r29c7" && obj != null)
		document.frm_WC2.r29c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r30c7" && obj != null)
		document.frm_WC2.r30c7.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
   }
/*   else
   {
	 alert("The written premium value must be numeric and between 0 and 10,000,000");
     return false;
   }*/
   
   }
   
   
function RangeCurRatCheck(var1,obj)
   {
  
   if(var1 >= 0 && var1 <= 10000000 )
   {
	 if (obj=="r1c3")
		document.frm_WC2.r1c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r2c3")
		document.frm_WC2.r2c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r3c3")
		document.frm_WC2.r3c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r4c3")
		document.frm_WC2.r4c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r5c3")
		document.frm_WC2.r5c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r6c3")
		document.frm_WC2.r6c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r7c3")
		document.frm_WC2.r7c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r8c3")
		document.frm_WC2.r8c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r9c3")
		document.frm_WC2.r9c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r10c3")
		document.frm_WC2.r10c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r11c3" && obj != null)
		document.frm_WC2.r11c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r12c3" && obj != null)
		document.frm_WC2.r12c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r13c3" && obj != null)
		document.frm_WC2.r13c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r14c3" && obj != null)
		document.frm_WC2.r14c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r15c3" && obj != null)
		document.frm_WC2.r15c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r16c3" && obj != null)
		document.frm_WC2.r16c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r17c3" && obj != null)
		document.frm_WC2.r17c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r18c3" && obj != null)
		document.frm_WC2.r18c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r19c3" && obj != null)
		document.frm_WC2.r19c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r20c3" && obj != null)
		document.frm_WC2.r20c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r21c3" && obj != null)
		document.frm_WC2.r21c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r22c3" && obj != null)
		document.frm_WC2.r22c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r23c3" && obj != null)
		document.frm_WC2.r23c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r24c3" && obj != null)
		document.frm_WC2.r24c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r25c3" && obj != null)
		document.frm_WC2.r25c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r26c3" && obj != null)
		document.frm_WC2.r26c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r27c3" && obj != null)
		document.frm_WC2.r27c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r28c3" && obj != null)
		document.frm_WC2.r28c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r29c3" && obj != null)
		document.frm_WC2.r29c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r30c3" && obj != null)
		document.frm_WC2.r30c3.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
   }
   else
   {
	 alert("The current rate value must be numeric and  between 0 and 10,000,000");
     return false;
   }
   
   }

function RangeNewRatCheck(var1,obj)
   {
  
   if(var1 < 10000000 )
   {
	 if (obj=="r1c5")
		document.frm_WC2.r1c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r2c5")
		document.frm_WC2.r2c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r3c5")
		document.frm_WC2.r3c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r4c5")
		document.frm_WC2.r4c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r5c5")
		document.frm_WC2.r5c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r6c5")
		document.frm_WC2.r6c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r7c5")
		document.frm_WC2.r7c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r8c5")
		document.frm_WC2.r8c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r9c5")
		document.frm_WC2.r9c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r10c5")
		document.frm_WC2.r10c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r11c5" && obj != null)
		document.frm_WC2.r11c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r12c5" && obj != null)
		document.frm_WC2.r12c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r13c5" && obj != null)
		document.frm_WC2.r13c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r14c5" && obj != null)
		document.frm_WC2.r14c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r15c5" && obj != null)
		document.frm_WC2.r15c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r16c5" && obj != null)
		document.frm_WC2.r16c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r17c5" && obj != null)
		document.frm_WC2.r17c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r18c5" && obj != null)
		document.frm_WC2.r18c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r19c5" && obj != null)
		document.frm_WC2.r19c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r20c5" && obj != null)
		document.frm_WC2.r20c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r21c5" && obj != null)
		document.frm_WC2.r21c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r22c5" && obj != null)
		document.frm_WC2.r22c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r23c5" && obj != null)
		document.frm_WC2.r23c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r24c5" && obj != null)
		document.frm_WC2.r24c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r25c5" && obj != null)
		document.frm_WC2.r25c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r26c5" && obj != null)
		document.frm_WC2.r26c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r27c5" && obj != null)
		document.frm_WC2.r27c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r28c5" && obj != null)
		document.frm_WC2.r28c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r29c5" && obj != null)
		document.frm_WC2.r29c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
	 if (obj=="r30c5" && obj != null)
		document.frm_WC2.r30c5.value= Math.round(var1*Math.pow(10,2))/Math.pow(10,2);
   }
   /*else
   {
	 alert("The new rate value must be numeric and between 0 and 10,000,000");
     return false;
   }*/
   
   }


function RangePEPRCheck(var1,obj)
   {
  
   if(var1 < 10000000 )
   {
	 if (obj=="r1c6")
		document.frm_WC2.r1c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r2c6")
		document.frm_WC2.r2c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r3c6")
		document.frm_WC2.r3c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r4c6")
		document.frm_WC2.r4c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r5c6")
		document.frm_WC2.r5c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r6c6")
		document.frm_WC2.r6c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r7c6")
		document.frm_WC2.r7c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r8c6")
		document.frm_WC2.r8c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r9c6")
		document.frm_WC2.r9c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r10c6")
		document.frm_WC2.r10c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r11c6" && obj != null)
		document.frm_WC2.r11c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r12c6" && obj != null)
		document.frm_WC2.r12c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r13c6" && obj != null)
		document.frm_WC2.r13c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r14c6" && obj != null)
		document.frm_WC2.r14c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r15c6" && obj != null)
		document.frm_WC2.r15c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r16c6" && obj != null)
		document.frm_WC2.r16c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r17c6" && obj != null)
		document.frm_WC2.r17c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r18c6" && obj != null)
		document.frm_WC2.r18c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r19c6" && obj != null)
		document.frm_WC2.r19c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r20c6" && obj != null)
		document.frm_WC2.r20c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r21c6" && obj != null)
		document.frm_WC2.r21c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r22c6" && obj != null)
		document.frm_WC2.r22c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r23c6" && obj != null)
		document.frm_WC2.r23c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r24c6" && obj != null)
		document.frm_WC2.r24c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r25c6" && obj != null)
		document.frm_WC2.r25c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r26c6" && obj != null)
		document.frm_WC2.r26c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r27c6" && obj != null)
		document.frm_WC2.r27c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r28c6" && obj != null)
		document.frm_WC2.r28c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r29c6" && obj != null)
		document.frm_WC2.r29c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r30c6" && obj != null)
		document.frm_WC2.r30c6.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
   }
   /*else
   {
	 alert("The prior year percent rate change value must be numeric and less than 10,000,000");
     return false;
   }*/
   
   }
   ///
   
   function PropPre(var1,obj)
   {
    if(var1 >0)
    {

	 if (obj=="r1c4")
		document.frm_WC2.r1c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r2c4")
		document.frm_WC2.r2c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r3c4")
		document.frm_WC2.r3c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r4c4")
		document.frm_WC2.r4c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r5c4")
		document.frm_WC2.r5c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r6c4")
		document.frm_WC2.r6c4.value=Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r7c4")
		document.frm_WC2.r7c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r8c4")
		document.frm_WC2.r8c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r9c4")
		document.frm_WC2.r9c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r10c4")
		document.frm_WC2.r10c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);

	 if (obj=="r11c4" && obj != null)
		document.frm_WC2.r11c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r12c4" && obj != null)
		document.frm_WC2.r12c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r13c4" && obj != null)
		document.frm_WC2.r13c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r14c4" && obj != null)
		document.frm_WC2.r14c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r15c4" && obj != null)
		document.frm_WC2.r15c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r16c4" && obj != null)
		document.frm_WC2.r16c4.value=Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r17c4" && obj != null)
		document.frm_WC2.r17c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r18c4" && obj != null)
		document.frm_WC2.r18c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r19c4" && obj != null)
		document.frm_WC2.r19c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r20c4" && obj != null)
		document.frm_WC2.r20c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 
	 if (obj=="r21c4" && obj != null)
		document.frm_WC2.r21c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r22c4" && obj != null)
		document.frm_WC2.r22c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r23c4" && obj != null)
		document.frm_WC2.r23c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r24c4" && obj != null)
		document.frm_WC2.r24c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r25c4" && obj != null)
		document.frm_WC2.r25c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r26c4" && obj != null)
		document.frm_WC2.r26c4.value=Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r27c4" && obj != null)
		document.frm_WC2.r27c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r28c4" && obj != null)
		document.frm_WC2.r28c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r29c4" && obj != null)
		document.frm_WC2.r29c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
	 if (obj=="r30c4" && obj != null)
		document.frm_WC2.r30c4.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
		return true;
   }
/*	else
      {
      var3="Proposed Pure Premium Multiplier must have the value between 1.2 and 2.7";
      alert(var3);
	 if (obj=="r1c4")
		document.frm_WC2.r1c4.focus();
	 if (obj=="r2c4")
		document.frm_WC2.r2c4.focus();
	 if (obj=="r3c4")
		document.frm_WC2.r3c4.focus();
	 if (obj=="r4c4")
		document.frm_WC2.r4c4.focus();
	 if (obj=="r5c4")
		document.frm_WC2.r5c4.focus();
	 if (obj=="r6c4")
		document.frm_WC2.r6c4.focus();
	 if (obj=="r7c4")
		document.frm_WC2.r7c4.focus();
	 if (obj=="r8c4")
		document.frm_WC2.r8c4.focus();
	 if (obj=="r9c4")
		document.frm_WC2.r9c4.focus();
	 if (obj=="r10c4")
		document.frm_WC2.r10c4.focus();
	}
   return false;*/
   }

   //
function movBakPage()
{
	history.back();
}
//added by -------- -------- end

function RangeCheck(var1)
   {
  
   if(var1 >= 1.3 ) {
   
   //&& var1 <= 2.7){
  
   return true;
      }
      else
      {
      alert("The value must be numeric and must be equal or greater than 1.3");
      return false;
      }
   
   
   }

//*************************** Forms Validation Function *******************************
//called from main JS function validate_submit
//**********************************************************************************

//-------- calling from WC1 form -----------
function wc1_validation()
{

		/*var alertcol="";
		var alert_msg = "\nAlert \n----------------------------------------------------------------------------------\nRequired fields on Forms are either empty or have an invalid format.\n\n";
		var warning_flag=false;
		var alert_flag=false;

		if (document.frm_WC1.company_no.value=="")
		{
			alertcol = " NAIC Company Number \n";
			alert_flag = true;
		}
	
		if (document.frm_WC1.company_name.value=="")
		{
			alertcol = alertcol + " Company Name \n";
			alert_flag = true;
		}

		if (document.frm_WC1.eff_date.value=="")
		{
			alertcol = alertcol + " Proposed Effective Date \n";
			alert_flag = true;
		}
		else
		{
			if (isDate(document.frm_WC1.eff_date.value)==false)
			{ 	
			 alertcol=alertcol + " Proposed Effective Date format is (mm/dd/yyyy)\n";
		     alert_flag=true;
			}
			else
			{
				//----- checking for 60 days period	
				var given_date=document.frm_WC1.eff_date.value;
				var pos1=given_date.indexOf(dtCh);
				var pos2=given_date.indexOf(dtCh,pos1+1);
				var strMonth=given_date.substring(0,pos1);
				var strDay=given_date.substring(pos1+1,pos2)
				var strYear=given_date.substring(pos2+1);
				var num=1;
				if (DaysDifferenc(strYear,strMonth,strDay,num)==false)
				{
				//alert("Proposed Effective Date should be a minimum of 60 days from today's date");				
				
				return false;
				}
			}			
		}

		if (document.frm_WC1.year.value =="")
		{
			alertcol = alertcol + " Filing is based on ???? Minnesota Ratemaking Report\n ";
			alert_flag = true;
		}
		
		//------- displaying alert msg for required columns--------------	
		if (alert_flag == true){
			alert(alert_msg + alertcol);		
			return false;
		}

		//---------- checking for valid numbers
		
		if(!document.frm_WC1.ClassDev2.checked)
		{
			if (IsNumber(document.frm_WC1.oeff_Rate.value)==false||isInteger(document.frm_WC1.year.value)==false ||
				IsNumber(document.frm_WC1.mul.value)==false||IsNumber(document.frm_WC1.xconst.value)==false||
				IsNumber(document.frm_WC1.lrginc.value)==false||IsNumber(document.frm_WC1.smch.value)==false) 
			{
				alert_msg = alert_msg + "\nAll of the following fields require numeric values.\n-----------------------------------------------------------\nOverall Effect of Rate Change \nMinnesota Ratemaking Report (4 Digit year) \n";
				alert_msg= alert_msg+"Multiplier \nExpense constant\nLargest Rate Increase\nSmallest Rate Change";
				alert(alert_msg);
				return false;
			}
		}
		//------- displaying alert msg for over all rate change --------------	
		//-------- if it falls outside the range then function will return false. ---------
		// if (document.form1.wc1checkOver_rate_chan.value!=""&&(document.form1.wc1checkOver_rate_chan.value>10||document.form1.wc1checkOver_rate_chan.value<=0))*/
		
// Commented out by MK to allow negative numbers in rate of change field on WC-1 form.	
//		if (document.frm_WC1.oeff_Rate.value== "" || document.frm_WC1.oeff_Rate.value>10 || document.frm_WC1.oeff_Rate.value<0)
		if (document.frm_WC1.oeff_Rate.value== "")
		{
			alert("Please enter Overall Effect of Rate change.");
			document.frm_WC1.oeff_Rate.focus();
			return false;
		}
		if (document.frm_WC1.oeff_Rate.value>10)
		{
			showModalDialog("actuarial_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:425px");
			return true;
		}

//



		//
//return false;
//
		if(!document.frm_WC1.ClassDev2.checked)
		{
			if (document.frm_WC1.mul.value=="" || document.frm_WC1.mul.value<1.3)
			{
	//|| document.frm_WC1.mul.value>2.7) 
		
				alert("The Multiplier should be greater than or equal to 1.3");
				document.frm_WC1.mul.focus();
				return false;
			}
    		
			if (document.frm_WC1.xconst.value!="" && document.frm_WC1.xconst.value >= 10000000)
			{
				alert("The expense constant should be less than 10,000,000");
				document.frm_WC1.xconst.focus();
				return false;
			}
	 
			if (document.frm_WC1.lrginc.value!="" && document.frm_WC1.lrginc.value >= 10000000)
			{
				alert("The largest rate increase should be less than 10,000,000");
				document.frm_WC1.lrginc.focus();
				return false;
			}
			if (document.frm_WC1.smch.value!="" && document.frm_WC1.smch.value >= 10000000)
			{
				alert("The smallest rate change should be less than 10,000,000");
				document.frm_WC1.smch.focus();
				return false;
			}

			//18-08-2004 remediate by sajid
			/*if (document.frm_WC1.xconst.value=="") 
			{
				alert("Enter expense constant.");
				document.frm_WC1.xconst.focus();
				return false;
			}
			if (document.frm_WC1.lrginc.value=="") 
			{
				alert("Enter largest rate increase for any class.");
				document.frm_WC1.lrginc.focus();
				return false;
			}
			if (document.frm_WC1.smch.value=="") 
			{
				alert("Enter smallest rate change for any class with NO deviations expense constant.");
				document.frm_WC1.smch.focus();
				return false;
			}*/

		}
		else
		{
			document.frm_WC1.avmul.value = roundnum3(document.frm_WC1.avmul.value);
			
			if (document.frm_WC1.lmul.value=="" || document.frm_WC1.lmul.value < 1.3)
			// || document.frm_WC1.lmul.value >2.7) 
			{
				alert("The lowest multiplier should be greater than or equal to 1.3");
				document.frm_WC1.lmul.focus();
				return false;
			}
			if (document.frm_WC1.hmul.value=="" || document.frm_WC1.hmul.value <1.3)
			// || document.frm_WC1.hmul.value >2.7 ) 
			{
				alert("The highest multiplier should be greater than or equal to 1.3");
				document.frm_WC1.hmul.focus();
				return false;
			}
			if (document.frm_WC1.avmul.value=="" || document.frm_WC1.avmul.value<1.3)
			//  || document.frm_WC1.avmul.value>2.7) 
			{
				alert("The effective multiplier should be greater than or equal to 1.3");
				document.frm_WC1.avmul.focus();
				return false;
			}
			//18-08-2004 remediate by sajid
			/*if (document.frm_WC1.exconst.value=="") 
			{
				alert("Enter expense constant.");
				document.frm_WC1.exconst.focus();
				return false;
			}
			if (document.frm_WC1.dev_largest_rate_increase.value=="") 
			{
				alert("Enter largest rate increase for any class.");
				document.frm_WC1.dev_largest_rate_increase.focus();
				return false;
			}
			if (document.frm_WC1.dev_smallest_rate_increase.value=="") 
			{
				alert("Enter smallest rate change for any class.");
				document.frm_WC1.dev_smallest_rate_increase.focus();
				return false;
			}
			
*/
			if (document.frm_WC1.exconst.value!="" && document.frm_WC1.exconst.value >= 10000000)
			{
				alert("The expense constant should be less than 10,000,000");
				document.frm_WC1.exconst.focus();
				return false;
			}
	 
			if (document.frm_WC1.dev_largest_rate_increase.value!="" && document.frm_WC1.dev_largest_rate_increase.value >= 10000000)
			{
				alert("The largest rate increase should be less than 10,000,000");
				document.frm_WC1.dev_largest_rate_increase.focus();
				return false;
			}
			if (document.frm_WC1.dev_smallest_rate_increase.value!="" && document.frm_WC1.dev_smallest_rate_increase.value >= 10000000)
			{
				alert("The smallest rate change should be less than 10,000,000");
				document.frm_WC1.dev_smallest_rate_increase.focus();
				return false;
			}
		}

	return true;
/*		if (document.frm_WC1.mul.value!="" && ((document.frm_WC1.mul.value<1)||(document.frm_WC1.mul.value>3))) 
		{
			warning_flag = true;
		}

		if (document.frm_WC1.xconst.value!="" && document.frm_WC1.xconst.value>500) 
		{
			warning_flag = true;
		}
		}
		else
		{	
			if(RangeCheck(document.frm_WC1.lmul.value)){
				if(RangeCheck(document.frm_WC1.hmul.value)){
					if(RangeCheck(document.frm_WC1.avmul.value)){
						if(IsNumeric(document.frm_WC1.exconst.value)){
						warning_flag = false;
						}
						else
						{
						warning_flag = true;
						}
					}
					else
					{
					warning_flag = true;
					}
				}
				else
				{
				warning_flag = true;
				}  
				
			}
			else
			{
			warning_flag = true;
			}
		}	
		
	
		//------- displaying kicked out msg --------------
		if (warning_flag == true)
		{
			showModalDialog("rejected_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
			return false;
		}*/
		/*return true;*/
}
	
	
// ---------------- callingfrom WC6 form -------------
function wc2_validationfrm()
{
//	alert("sajid");
	if (document.frm_WC2.r1c1.value=="" || document.frm_WC2.r2c1.value=="" || document.frm_WC2.r3c1.value=="" || document.frm_WC2.r4c1.value=="" || document.frm_WC2.r5c1.value=="" || document.frm_WC2.r6c1.value=="" || document.frm_WC2.r7c1.value=="" || document.frm_WC2.r8c1.value=="" || document.frm_WC2.r9c1.value=="" || document.frm_WC2.r10c1.value=="")
	{
		alert("Please enter at least one Class code");
		return false;
	}
	else
	{
	return true;
	}
}

function wc6_validation()
{

	var warning_flag=false;
		
	calculateA5();
	calculateB10();
	calculateB13();
	calculateB14();
	calculateC();

		if (IsNumber(document.frm_WC6.Mfact.value)==false||IsNumber(document.frm_WC6.UDfact.value)==false||
			IsNumber(document.frm_WC6.Tfact.value)==false||IsNumber(document.frm_WC6.LAE.value)==false||
			IsNumber(document.frm_WC6.Comb.value)==false||IsNumber(document.frm_WC6.OA.value)==false||
			IsNumber(document.frm_WC6.GE.value)==false||IsNumber(document.frm_WC6.PTax.value)==false||
			IsNumber(document.frm_WC6.OTax.value)==false||IsNumber(document.frm_WC6.PROF.value)==false||
			IsNumber(document.frm_WC6.CII.value)==false||IsNumber(document.frm_WC6.SLCMul.value)==false)

		{				
			alert("All fields in this WC-6 form require numeric values or zero.  \n\nPlease check the values you have entered");
			return false;
		}

		document.frm_WC6.expedited.value = "no";
		
		if (document.frm_WC6.Mfact.value=="" || (document.frm_WC6.Mfact.value<0.5||document.frm_WC6.Mfact.value>2))
		{
			showModalDialog("rejected_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
			document.frm_WC6.Mfact.focus();
			document.frm_WC6.expedited.value="yes";
			return true;
		}		

		if (document.frm_WC6.UDfact.value=="" || (document.frm_WC6.UDfact.value<1||document.frm_WC6.UDfact.value>1.5))
		{
			showModalDialog("rejected_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
			document.frm_WC6.UDfact.focus();
			document.frm_WC6.expedited.value="yes";
			return true;
		}		
		if (document.frm_WC6.Tfact.value=="" || (document.frm_WC6.Tfact.value<1||document.frm_WC6.Tfact.value>1.5))
		{
			showModalDialog("rejected_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
			document.frm_WC6.Tfact.focus();
			document.frm_WC6.expedited.value="yes";
			return true;
		}
		
		if (document.frm_WC6.LAE.value=="" || document.frm_WC6.LAE.value>=10000000)
		{
			showModalDialog("rejected_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
			document.frm_WC6.LAE.focus();
			document.frm_WC6.expedited.value="yes";
			return true;
		}				
		
		if (document.frm_WC6.Comb.value=="" || document.frm_WC6.Comb.value>=10000000)
		{
			showModalDialog("rejected_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
			document.frm_WC6.Comb.focus();
			document.frm_WC6.expedited.value="yes";
			return true;
		}				
		if (document.frm_WC6.OA.value=="" || document.frm_WC6.OA.value>=10000000)
		{
			showModalDialog("rejected_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
			document.frm_WC6.OA.focus();
			document.frm_WC6.expedited.value="yes";
			return true;
		}				
		if (document.frm_WC6.GE.value=="" || document.frm_WC6.GE.value>=10000000)
		{
			showModalDialog("rejected_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
			document.frm_WC6.GE.focus();
			document.frm_WC6.expedited.value="yes";
			return true;
		}				

		if (document.frm_WC6.PTax.value=="" || (document.frm_WC6.PTax.value>2.5))
		{
			showModalDialog("rejected_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
			document.frm_WC6.PTax.focus();
			document.frm_WC6.expedited.value="yes";
			return true;
		}
		if (document.frm_WC6.OTax.value=="" || document.frm_WC6.OTax.value>=10000000)
		{
			showModalDialog("rejected_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
			document.frm_WC6.OTax.focus();
			document.frm_WC6.expedited.value="yes";
			return true;
		}				
		if (document.frm_WC6.PROF.value=="" || document.frm_WC6.PROF.value>=10000000)
		{
			showModalDialog("rejected_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
			document.frm_WC6.PROF.focus();
			document.frm_WC6.expedited.value="yes";
			return true;
		}				
		if (document.frm_WC6.CII.value=="" || document.frm_WC6.CII.value>=10000000)
		{
			showModalDialog("rejected_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
			document.frm_WC6.CII.focus();
			document.frm_WC6.expedited.value="yes";
			return true;
		}				
		if (document.frm_WC6.FLCMul.value=="" || document.frm_WC6.FLCMul.value<1.3 || document.frm_WC6.FLCMul.value>2.7)
		{
			showModalDialog("rejected_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
			document.frm_WC6.FLCMul.focus();
			document.frm_WC6.expedited.value="yes";
			return true;
		}		
		
		if (document.frm_WC6.SLCMul.value=="" ||document.frm_WC6.SLCMul.value<1.3)
		// ||  document.frm_WC6.SLCMul.value>2.7)
		{
			alert("The SELECTED LOSS COST MULTIPLIER should be greater than or equal to 1.3");
			document.frm_WC6.SLCMul.focus();
			return false;
		}		

 		if (document.frm_WC6.WC1_oeff_Rate.value > 10 || document.frm_WC6.attachments.value == "True" || document.frm_WC6.deviations.value > 10)
		{
 			if (document.frm_WC6.WC1_oeff_Rate.value > 10 || document.frm_WC6.deviations.value > 10)
 			{
				//showModalDialog("fasttrack_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
				return true;
			}
			else
			{
				//showModalDialog("fasttrack_msg1.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
				return true;
			}
		}
	//------- displaying kicked out msg --------------
/*	if (warning_flag == true)
	{
		showModalDialog("rejected_msg.htm",window,"status:no;center:yes;help:no;dialogWidth:550px;dialogHeight:320px");
		return false;
	}*/


	return true;
}

//*************************** 60 days date validation*******************************
//Proposed effective date should be not be greater than 60 days
//**********************************************************************************
function DaysDifferenc(yr,m,d,num) {
	var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");

	var today=new Date();
	var todayy=today.getYear();
	var todaym=today.getMonth();
	var todayd=today.getDate();

	var todaystring=montharray[todaym]+" "+todayd+", "+todayy;
	var paststring=montharray[m-1]+" "+d+", "+yr;
	var difference=(Math.round((Date.parse(paststring)-Date.parse(todaystring))/(24*60*60*1000))*1);
	
	//if (difference>60||difference<0)
	// TOMG  9/23/03:  made change per rule misinterpretation from Tammy@ DOC
	// Must be at least 60 days out (sysdate +60) or it raises error. 
	// (change >60 to <60 and a text change in the alert.
	//
	if (difference<60||difference<0)  
	{		
		if(num==1)
		{
		alert("Proposed Effective Date should be within 60 days from the filing date");
		return false;
		}
		else if(num==2)
		{
		alert("New Effective Date should be a minimum of 60 days from today's date");				
		return false;	
		}
	}
	else
	{	
		return true;
	}
}

//*************************** Number validation *******************************
//validates even decimal numbers
//*****************************************************************************
function IsNumber(x) {
	//var anum=/(^\d+$)|(^\d+\.\d+$)/;
	var anum=/(\d+$)|(\d+\.\d+$)|(-\d+\.\d+$)|(-\d+$)/;
	if (anum.test(x))
	{
	return true;
	}
	else{
	
	return false;
	}
}

//*************************** Date validation *******************************

// Declaring valid date character, minimum year and maximum year
var dtCh= "/";
var minYear=1900;
var maxYear=2100;


//--------- validates only integers
function isInteger(s){
	var i;
    for (i = 0; i < s.length; i++){   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag){
	var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++){   
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function daysInFebruary (year){
	// February has 29 days in any year evenly divisible by four,
    // EXCEPT for centurial years which are not also divisible by 400.
    return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );
}
function DaysArray(n) {
	for (var i = 1; i <= n; i++) {
		this[i] = 31
		if (i==4 || i==6 || i==9 || i==11) {this[i] = 30}
		if (i==2) {this[i] = 29}
   } 
   return this
}

function isDate(dtStr){
	var daysInMonth = DaysArray(12)
	var pos1=dtStr.indexOf(dtCh)
	var pos2=dtStr.indexOf(dtCh,pos1+1)
	var strMonth=dtStr.substring(0,pos1)
	var strDay=dtStr.substring(pos1+1,pos2)
	var strYear=dtStr.substring(pos2+1)
	strYr=strYear
	if (strDay.charAt(0)=="0" && strDay.length>1 && strDay.length<3 ) strDay=strDay.substring(1)
	if (strMonth.charAt(0)=="0" && strMonth.length>1 && strMonth.length<3) strMonth=strMonth.substring(1)
	for (var i = 1; i <= 3; i++) {
		if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1)
	}
	month=parseInt(strMonth)
	day=parseInt(strDay)
	year=parseInt(strYr)
	if (pos1==-1 || pos2==-1){
//		alert("The date format should be : mm/dd/yyyy")
		return false
	}
	if (strMonth.length<1 || strMonth.length>2 || month<1 || month>12){
//		alert("Please enter a valid month")
		return false
	}
	
	if (strDay.length<1 || strDay.length>2 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
//		alert("Please enter a valid day ")
		return false
	}
	if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){
//		alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear)
		return false
	}
	if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
//		alert("Please enter a valid date")
		return false
	}
return true
}

function IsNumeric(strString)
   //  check for valid numeric strings	
   {
   //alert("in is numeric");
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return true;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         alert("Please enter the valid numeric values ( 0 - 9 )");
         blnResult = false;
         }
      }
   return blnResult;
   }
   
   function EffPurePremium(){
   
   /**/
   var val1,val2;
   if(document.WC7.r7c5.value.length >0)
	{
		if(isNaN(parseFloat(document.WC7.r7c5.value)))
		{
			val1=0;
		}
		else
		{
			val1=parseFloat(document.WC7.r7c5.value);
		}
	}/**/
   if(document.WC7.r7c6.value.length >0)
	{
		if(isNaN(parseFloat(document.WC7.r7c6.value)))
		{
			val2=0;
		}
		else
		{
			val2=parseFloat(document.WC7.r7c6.value);
		}
	}/**/

   
   var row5;
   row5 = Number(document.WC7.r1c5.value) +val1;

   if (document.WC7.r2c5!= null)
	row5 += Number(document.WC7.r2c5.value);

   if (document.WC7.r3c5!= null)
	row5 += Number(document.WC7.r3c5.value);

   if (document.WC7.r4c5!= null)
	row5 += Number(document.WC7.r4c5.value);

   if (document.WC7.r5c5!= null)
	row5 += Number(document.WC7.r5c5.value);

   if (document.WC7.r9c5!= null)
	row5 += Number(document.WC7.r9c5.value);

   if (document.WC7.r10c5!= null)
	row5 += Number(document.WC7.r10c5.value);

   if (document.WC7.r11c5!= null)
	row5 += Number(document.WC7.r11c5.value);

   if (document.WC7.r12c5!= null)
	row5 += Number(document.WC7.r12c5.value);

   if (document.WC7.r13c5!= null)
	row5 += Number(document.WC7.r13c5.value);
   if (document.WC7.r14c5!= null)
	row5 += Number(document.WC7.r14c5.value);
   if (document.WC7.r15c5!= null)
	row5 += Number(document.WC7.r15c5.value);
   if (document.WC7.r16c5!= null)
	row5 += Number(document.WC7.r16c5.value);
   if (document.WC7.r17c5!= null)
	row5 += Number(document.WC7.r17c5.value);
   if (document.WC7.r18c5!= null)
	row5 += Number(document.WC7.r18c5.value);
   if (document.WC7.r19c5!= null)
	row5 += Number(document.WC7.r19c5.value);
   if (document.WC7.r20c5!= null)
	row5 += Number(document.WC7.r20c5.value);
   if (document.WC7.r21c5!= null)
	row5 += Number(document.WC7.r21c5.value);
   if (document.WC7.r22c5!= null)
	row5 += Number(document.WC7.r22c5.value);
   if (document.WC7.r23c5!= null)
	row5 += Number(document.WC7.r23c5.value);
   if (document.WC7.r24c5!= null)
	row5 += Number(document.WC7.r24c5.value);
   if (document.WC7.r25c5!= null)
	row5 += Number(document.WC7.r25c5.value);
   if (document.WC7.r26c5!= null)
	row5 += Number(document.WC7.r26c5.value);
   if (document.WC7.r27c5!= null)
	row5 += Number(document.WC7.r27c5.value);
   if (document.WC7.r28c5!= null)
	row5 += Number(document.WC7.r28c5.value);
   if (document.WC7.r29c5!= null)
	row5 += Number(document.WC7.r29c5.value);
   if (document.WC7.r30c5!= null)
	row5 += Number(document.WC7.r30c5.value);
   if (document.WC7.r31c5!= null)
	row5 += Number(document.WC7.r31c5.value);
   if (document.WC7.r32c5!= null)
	row5 += Number(document.WC7.r32c5.value);
   if (document.WC7.r33c5 != null)
	row5 += Number(document.WC7.r33c5.value);

   var row6 ;
   row6 = Number(document.WC7.r1c6.value)+val2;

   if (document.WC7.r2c6!= null)
	row6 += Number(document.WC7.r2c6.value);

   if (document.WC7.r3c6!= null)
	row6 += Number(document.WC7.r3c6.value);

   if (document.WC7.r4c6!= null)
	row6 += Number(document.WC7.r4c6.value);

   if (document.WC7.r5c6!= null)
	row6 += Number(document.WC7.r5c6.value);

   if (document.WC7.r9c6!= null)
	row6 += Number(document.WC7.r9c6.value);

   if (document.WC7.r10c6!= null)
	row6 += Number(document.WC7.r10c6.value);

   if (document.WC7.r11c6!= null)
	row6 += Number(document.WC7.r11c6.value);

   if (document.WC7.r12c6!= null)
	row6 += Number(document.WC7.r12c6.value);

   if (document.WC7.r13c6!= null)
	row6 += Number(document.WC7.r13c6.value);

   if (document.WC7.r14c6!= null)
	row6 += Number(document.WC7.r14c6.value);
   if (document.WC7.r15c6!= null)
	row6 += Number(document.WC7.r15c6.value);
   if (document.WC7.r16c6!= null)
	row6 += Number(document.WC7.r16c6.value);
   if (document.WC7.r17c6!= null)
	row6 += Number(document.WC7.r17c6.value);
   if (document.WC7.r18c6!= null)
	row6 += Number(document.WC7.r18c6.value);
   if (document.WC7.r19c6!= null)
	row6 += Number(document.WC7.r19c6.value);
   if (document.WC7.r20c6!= null)
	row6 += Number(document.WC7.r20c6.value);
   if (document.WC7.r21c6!= null)
	row6 += Number(document.WC7.r21c6.value);
   if (document.WC7.r22c6!= null)
	row6 += Number(document.WC7.r22c6.value);
   if (document.WC7.r23c6!= null)
	row6 += Number(document.WC7.r23c6.value);
   if (document.WC7.r24c6!= null)
	row6 += Number(document.WC7.r24c6.value);
   if (document.WC7.r25c6!= null)
	row6 += Number(document.WC7.r25c6.value);
   if (document.WC7.r26c6!= null)
	row6 += Number(document.WC7.r26c6.value);
   if (document.WC7.r27c6!= null)
	row6 += Number(document.WC7.r27c6.value);
   if (document.WC7.r28c6!= null)
	row6 += Number(document.WC7.r28c6.value);
   if (document.WC7.r29c6!= null)
	row6 += Number(document.WC7.r29c6.value);
   if (document.WC7.r30c6!= null)
	row6 += Number(document.WC7.r30c6.value);
   if (document.WC7.r31c6!= null)
	row6 += Number(document.WC7.r31c6.value);
   if (document.WC7.r32c6!= null)
	row6 += Number(document.WC7.r32c6.value);
   if (document.WC7.r33c6 != null)
	row6 += Number(document.WC7.r33c6.value);

//   alert(row6);
//   alert(row5);
		if(isNaN(roundnum( Number(row6)/Number(row5))))
		{
			document.WC7.EffPremium.value=0;
		}
		else
		{
//		   document.WC7.EffPremium.value = roundnum( Number(row6)/Number(row5));

		   //document.WC7.EffPremium.value = Math.round((row6/row5)*Math.pow(10,2))/Math.pow(10,2);
		   document.WC7.EffPremium.value = (row6/row5)*Math.pow(10,2)/Math.pow(10,2);
		   document.WC7.EffPremium.value = roundnum3(document.WC7.EffPremium.value);
		}

   }

   function roundnum3(val)
   {
   var strval  = "" +  val;
   var pos = strval.indexOf(".");
   if(pos < 0)
   {
return val + ".000";
   }
   else
   {
   var strleft = strval.substring(0,pos);
   var strright = strval.substring(pos+1,strval.length);
   //alert("strleft : " + strleft);
   //alert("strright : " + strright);
   //alert("strright.length : " + strright.length);
   if (strright.length > 3)
   {
	var strchk = strright.substring(3,4);	
	var strchk2 = strright.substring(0,3);	
	
	if (strchk > 5)
	{
		strright = Math.abs(strchk2) + 1;
	}
	else
	{
		strright = strchk2;
	}
   }
   else if (strright.length == 3)
   {
		strright = strright;	
   }
   else if (strright.length < 3)
   {
	if (strright.length == 2)
	{
		strright = strright + "0" ;
	}
	else
	{
		strright = strright + "00" ;
	}
   }
   return strleft + "." + strright;
   }
   }
//   
   function roundnum(val )
   {
   var strval  = "" +  val;
   var pos = strval.indexOf(".");
   if(pos < 0)
   {
return val + ".00";
   }
   else
   {
	var strleft = strval.substring(0,pos);
	var strright = strval.substring(pos+1,strval.length);
	if (strright.length > 2)
	{	
		var strchk = strright.substring(2,3);	
		var strchk2 = strright.substring(0,2);	
		if (strchk > 5)
		{
			strright = Math.abs(strchk2) + 1;
		}
		else
		{
			strright = strchk2;
		}
	}
	else if (strright.length == 2)
	{
		strright = strright;	
	}
	else if (strright.length < 2)
	{
		strright = strright + "0" ;
	}
	return strleft + "." + strright;
   }
   }
//
   function roundnum1(val )
   {
   var strval  = "" +  val;
   var pos = strval.indexOf(".");
   if(pos < 0)
   {
return val;
   }
   else
   {
   var strleft = strval.substring(0,pos);
   var strright = strval.substring(pos+1,strval.length);
   strright = strright.substring(0,2);
   return strleft + "." + strright;
   }
   }


//
   
   
   function ColCalculation(var1,var2,var3,obj5,obj6)
   {
  // alert("sajid");
  
   	if(var1 >= 1.2){
		obj5.value = roundnum(var2/var1);
		obj6.value =  roundnum(obj5.value*var3) ;
		//obj5.value = roundnum(var2/var1);
		return true;
      }
    /*  else
      {
      alert("Current Pure Premium Multiplier value must be numeric and between 1.2 and 2.7");
      return false;
      }*/  
     
   }
   
   function ColCalculation1(var1,var2,var3,obj5,obj6)
   {
   //alert("sajid");
  
  if (var1.length==0) return false;

   	if(var1 >= 1.2){
		obj5.value = roundnum(var2/var1);
		obj6.value =  roundnum(obj5.value*var3) ;
		//obj5.value = roundnum(var2/var1);
		return true;
      }
      else
      {
      //alert("Current Pure Premium Multipler value must be numeric and between 1.2 and 2.7");
      return false;
      }  
     
   }
    
   function ColCalculation2(var1,var2,var3,obj5,obj6)
   {
  // alert("sajid");
	if (IsNumeric(var1)) 
	{
	}
	else
	{
		return false;
	}
   	if(var1 >= 1.2){
//		obj5.value = roundnum1(var2/var1);
//		obj6.value =  roundnum1(obj5.value*var3) ;
		obj5.value = Math.round((var2/var1)*Math.pow(10,3))/Math.pow(10,3);
		obj6.value =  Math.round((obj5.value*var3)*Math.pow(10,3))/Math.pow(10,3);

		//obj5.value = roundnum(var2/var1);
		return true;
      }
     /* else
      {
      alert("Current Pure Premium Multiplier value must be numeric and between 1.2 and 2.7");
      return false;
      }*/  
     
   }
   
   function PCTD_validation()
   
   {   
      
  if(document.frm_PCDT.Company_TrackingNo.value ==""){
	alert("Please enter the Company Tracking#");
	document.frm_PCDT.Company_TrackingNo.focus();
	return false;   
   }
   if(document.frm_PCDT.Conatct_Title.value ==""){
	alert("Please enter the Title.");
	document.frm_PCDT.Conatct_Title.focus();
	return false;   
   }
   /*if(document.frm_PCDT.company_name.value ==""){
	alert("Please enter the Company Name");
	document.frm_PCDT.company_name.focus();
	return false;   
   }
   
   if(document.frm_PCDT.NAIC.value ==""){
	alert("Please enter the NAIC#");
	document.frm_PCDT.NAIC.focus();
	return false;   
   }*/
   
   
   if(document.frm_PCDT.Filer_Name.value ==""){
	alert("Please enter the Name of authorized Filer  ");
	document.frm_PCDT.Filer_Name.focus();
	return false;   
   } 
   
   if(document.frm_PCDT.Insurnce_Type.value ==""){
	alert("Please enter Type of Insurance(TOI)");
	document.frm_PCDT.Insurnce_Type.focus();
	return false;   
   } 
   
   if (document.frm_PCDT.Insurnce_SubType1.value == ""){
	alert("Please select Sub-Type of Insurance(Sub-TOI)");
	document.frm_PCDT.Insurnce_SubType1.focus();
	return false;   
   } 
    /*if(document.frm_PCDT.Insurnce_SubType.value ==""){
	alert("Please enter the Sub Type of Insurance");
	document.frm_PCDT.Insurnce_SubType.focus();
	return false;   
	}*/
	  

var flag=0;  
if(document.frm_PCDT.RL_Cost.checked)
{
flag=1;
}
if(document.frm_PCDT.Rules.checked)
{
flag=1;
}

if(document.frm_PCDT.Ra_Rl.checked)
{
flag=1;
}
if(document.frm_PCDT.Ra_Rl_Forms.checked)
{
flag=1;
}
if(document.frm_PCDT.Combination.checked)
{
flag=1;
}


if(document.frm_PCDT.Forms.checked)

{
flag=1;
}
if(document.frm_PCDT.Withdrawal.checked)
{
flag=1;
}
if(flag==0)
	{
	alert("Please Select Filing Type");
	document.frm_PCDT.RL_Cost.focus();
	return false;   
	}
	
	
	if(document.frm_PCDT.Eff_Date_New.value ==""){
	alert("Please enter the New Effective Date ");
	document.frm_PCDT.Eff_Date_New.focus();
	return false;   
	}  
	
	 if(document.frm_PCDT.Eff_Date_Renewal.value ==""){
	alert("Please enter the effactive date for renewal");
	document.frm_PCDT.Eff_Date_Renewal.focus();
	return false;   
	}

	if (document.frm_PCDT.Eff_Date_New.value=="")
		{
			alert("Please Enter the New Effective Date");
			document.frm_PCDT.Eff_Date_New.focus();
			return false;  			
		}
		else
		{
			if (isDate(document.frm_PCDT.Eff_Date_New.value)==false)
			{ 	
			alert("Please Enter the Valid New Effective Date");
			document.frm_PCDT.Eff_Date_New.focus();
			return false;
			}
			else
			{
				//----- checking for 60 days period	
				var given_date=document.frm_PCDT.Eff_Date_New.value;
				var pos1=given_date.indexOf(dtCh);
				var pos2=given_date.indexOf(dtCh,pos1+1);
				var strMonth=given_date.substring(0,pos1);
				var strDay=given_date.substring(pos1+1,pos2)
				var strYear=given_date.substring(pos2+1);
				var num=2;
				if (DaysDifferenc(strYear,strMonth,strDay,num)==false)
				{
				//alert("Proposed Effective Date should be a minimum of 60 days from today's date");				
					document.frm_PCDT.Eff_Date_New.focus();
					return false;
				}
			}			
		}
				
		if (document.frm_PCDT.Filling_Date.value=="")
		{
			alert("Please Enter the Filing Date");
			document.frm_PCDT.Filling_Date.focus();
			return false;
			//document.frm_PCDT.Filling_Date.focus();
			
		}
		else
		{
			if (isDate(document.frm_PCDT.Filling_Date.value)==false)
			{ 	
			 alert("Please Enter the valid Filing Date");
			document.frm_PCDT.Filling_Date.focus();
			return false;
		     //document.frm_PCDT.Filling_Date.focus();
			}
			else
			{
				//----- checking for 60 days period	
				var given_date=document.frm_PCDT.Filling_Date.value;
				var pos1=given_date.indexOf(dtCh);
				var pos2=given_date.indexOf(dtCh,pos1+1);
				var strMonth=given_date.substring(0,pos1);
				var strDay=given_date.substring(pos1+1,pos2)
				var strYear=given_date.substring(pos2+1);
				if (!document.frm_PCDT.Filling_Date.disabled && OneDaysDifferenc(strYear,strMonth,strDay)==false)
				{
					if (!document.frm_PCDT.Filling_Date.disabled)
					{
						document.frm_PCDT.Filling_Date.focus();
						return false;
					}
				}
			}			
		}
if(document.frm_PCDT.OPTIN_Carrier.checked==false && document.frm_PCDT.OPTIN_MWCIA.checked==false)
{
		alert("Please select a payment method (OPT IN).");
		document.frm_PCDT.OPTIN_MWCIA.focus();
		return false;

}


		if(document.frm_PCDT.OPTIN_Carrier.checked)
		{		
			
			if(document.frm_PCDT.Check.value=="")
				{
					alert("Please enter the Check Number.");
					document.frm_PCDT.Check.focus();
					return false;
				}
			
			if(document.frm_PCDT.Check_Amount.value=="")
				{
				alert("Please enter the Check Amount.");
				document.frm_PCDT.Check_Amount.focus();
				return false;
				}
				else if(document.frm_PCDT.Check_Amount.value<=0)
				
				{
				alert("Please enter the valid Amount.");
				document.frm_PCDT.Check_Amount.focus();
				return false;				
				}
		return true;
		}	
		
		
		
	return true;	
   }
  function WC10_validation()
    {  
  
   if(document.WC10.namee.value ==""){
	alert("Please enter the Name of the Insured Employer");
	document.WC10.namee.focus();
	return false;   
   }
   
   if(document.WC10.InsurerAddress0.value ==""){
	alert("Please enter the Address of the Insurer");
	document.WC10.InsurerAddress0.focus();
	return false;   
   }
   if(document.WC10.eff_date.value ==""){
	alert("Please enter the Effective Date");
	document.WC10.eff_date.focus();
	return false;   
   }
   
   if(document.WC10.xp_date.value ==""){
	alert("Please enter the Expiration Date");
	document.WC10.xp_date.focus();
	return false;   
   }
   
    //
    //date validation
//    alert(document.WC10.eff_date.value);
 //   alert(document.WC10.xp_date.value);
   if(!validate(document.WC10.eff_date.value,document.WC10.xp_date.value))
   {
		alert("Expiration Date should be greater than Effective Date.");
		document.WC10.xp_date.focus();
		return false;
	
   }
 //   alert("After validation");
//    return false;
    //

   
   if(document.WC10.name_ro.value ==""){
	alert("Please enter the name of Responsible Officer");
	document.WC10.name_ro.focus();
	return false;   
   } 
   
    return true;      
   }
      
   function emailCheck(emailStr) {
	// checks if the e-mail address is valid
	if(emailStr.length==0)
	{
		alert("Please enter Email Address");
		return false;
	}
	//var emailPat = /^(\".*\"|[A-Za-z]\w*)@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z]\w*(\.[A-Za-z]\w*)+)$/;
	//var emailPat = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
	var emailPat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
	var matchArray = emailStr.match(emailPat);
	if (matchArray == null) {
	alert("Your Email Address seems incorrect. Please try again (check the '@' and '.'s in the email address)");
	return false;
	}
	return true;
}

function Fillsignature()
{
document.frm_PCDT.Filer_Sig.value = document.frm_PCDT.Filer_Name.value;

}

function Fillsignature1()
{
document.WC10.sign.value = document.WC10.name_ro.value;

}

function ColumnSum()
{

var val1,val2,val3,val4,val5,val6,val9,val10,val11,val12,val13;
var val14,val5,val6,val7,val8,val9,va20,val21,val22,val23,val24;
var val25,val26,val27,val28,val29,val30,val_31,val_32,val_33;
//COLUMN 2 SUM
if(document.WC7.r1c2.value.length >0)
{
	if(isNaN(parseFloat(document.WC7.r1c2.value)))
	{
		val1=0;
	}
	else
	{
		val1=parseFloat(document.WC7.r1c2.value);
	}
}
//
if(document.WC7.r2c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r2c2.value)))
	{
		val2=0;
	}
	else
	{
		val2=parseFloat(document.WC7.r2c2.value);
	}
}
else
	val2=0;
//
if(document.WC7.r3c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r3c2.value)))
	{
		val3=0;
	}
	else
	{
		val3=parseFloat(document.WC7.r3c2.value);
	}
}
else
	val3=0;
//
if(document.WC7.r4c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r4c2.value)))
	{
		val4=0;
	}
	else
	{
		val4=parseFloat(document.WC7.r4c2.value);
	}
}
else
	val4=0;
//
if(document.WC7.r5c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r5c2.value)))
	{
		val5=0;
	}
	else
	{
		val5=parseFloat(document.WC7.r5c2.value);
	}
}
else
	val5=0;
//
if(document.WC7.r7c2.value.length >0)
{
	if(isNaN(parseFloat(document.WC7.r7c2.value)))
	{
		val6=0;
	}
	else
	{
		val6=parseFloat(document.WC7.r7c2.value);
	}
}
else
	val6=0;
//new class code start
if(document.WC7.r9c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r9c2.value)))
	{
		val9=0;
	}
	else
	{
		val9=parseFloat(document.WC7.r9c2.value);
	}
}
else
	val9=0;
if(document.WC7.r10c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r10c2.value)))
	{
		val10=0;
	}
	else
	{
		val10=parseFloat(document.WC7.r10c2.value);
	}
}
else
	val10=0;
if(document.WC7.r11c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r11c2.value)))
	{
		val11=0;
	}
	else
	{
		val11=parseFloat(document.WC7.r11c2.value);
	}
}
else
	val11=0;
if(document.WC7.r12c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r12c2.value)))
	{
		val12=0;
	}
	else
	{
		val12=parseFloat(document.WC7.r12c2.value);
	}
}
else
	val12=0;
if(document.WC7.r13c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r13c2.value)))
	{
		val13=0;
	}
	else
	{
		val13=parseFloat(document.WC7.r13c2.value);
	}
}
else
	val13=0;

if(document.WC7.r14c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r14c2.value)))
	{
		val14=0;
	}
	else
	{
		val14=parseFloat(document.WC7.r14c2.value);
	}
}
else
	val14=0;

if(document.WC7.r15c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r15c2.value)))
	{
		val15=0;
	}
	else
	{
		val15=parseFloat(document.WC7.r15c2.value);
	}
}
else
	val15=0;
if(document.WC7.r16c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r16c2.value)))
	{
		val16=0;
	}
	else
	{
		val16=parseFloat(document.WC7.r16c2.value);
	}
}
else
	val16=0;
if(document.WC7.r17c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r17c2.value)))
	{
		val17=0;
	}
	else
	{
		val17=parseFloat(document.WC7.r17c2.value);
	}
}
else
	val17=0;
if(document.WC7.r18c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r18c2.value)))
	{
		val18=0;
	}
	else
	{
		val18=parseFloat(document.WC7.r18c2.value);
	}
}
else
	val18=0;
if(document.WC7.r19c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r19c2.value)))
	{
		val19=0;
	}
	else
	{
		val19=parseFloat(document.WC7.r19c2.value);
	}
}
else
	val19=0;
if(document.WC7.r20c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r20c2.value)))
	{
		val20=0;
	}
	else
	{
		val20=parseFloat(document.WC7.r20c2.value);
	}
}
else
	val20=0;
if(document.WC7.r21c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r21c2.value)))
	{
		val21=0;
	}
	else
	{
		val21=parseFloat(document.WC7.r21c2.value);
	}
}
else
	val21=0;
if(document.WC7.r22c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r22c2.value)))
	{
		val22=0;
	}
	else
	{
		val22=parseFloat(document.WC7.r22c2.value);
	}
}
else
	val22=0;
if(document.WC7.r23c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r23c2.value)))
	{
		val23=0;
	}
	else
	{
		val23=parseFloat(document.WC7.r23c2.value);
	}
}
else
	val23=0;
if(document.WC7.r24c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r24c2.value)))
	{
		val24=0;
	}
	else
	{
		val24=parseFloat(document.WC7.r24c2.value);
	}
}
else
	val24=0;
if(document.WC7.r25c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r25c2.value)))
	{
		val25=0;
	}
	else
	{
		val25=parseFloat(document.WC7.r25c2.value);
	}
}
else
	val25=0;
if(document.WC7.r26c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r26c2.value)))
	{
		val26=0;
	}
	else
	{
		val26=parseFloat(document.WC7.r26c2.value);
	}
}
else
	val26=0;
if(document.WC7.r27c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r27c2.value)))
	{
		val27=0;
	}
	else
	{
		val27=parseFloat(document.WC7.r27c2.value);
	}
}
else
	val27=0;
if(document.WC7.r28c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r28c2.value)))
	{
		val28=0;
	}
	else
	{
		val28=parseFloat(document.WC7.r28c2.value);
	}
}
else
	val28=0;
if(document.WC7.r29c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r29c2.value)))
	{
		val29=0;
	}
	else
	{
		val29=parseFloat(document.WC7.r29c2.value);
	}
}
else
	val29=0;
if(document.WC7.r30c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r30c2.value)))
	{
		val30=0;
	}
	else
	{
		val30=parseFloat(document.WC7.r30c2.value);
	}
}
else
	val30=0;
if(document.WC7.r31c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r31c2.value)))
	{
		val_31=0;
	}
	else
	{
		val_31=parseFloat(document.WC7.r31c2.value);
	}
}
else
	val_31=0;
if(document.WC7.r32c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r32c2.value)))
	{
		val_32=0;
	}
	else
	{
		val_32=parseFloat(document.WC7.r32c2.value);
	}
}
else
	val_32=0;
if(document.WC7.r33c2 != null)
{
	if(isNaN(parseFloat(document.WC7.r33c2.value)))
	{
		val_33=0;
	}
	else
	{
		val_33=parseFloat(document.WC7.r33c2.value);
	}
}
else
	val_33=0;
//new class code end
//COLUM 3 SUM
var val31,val32,val33,val34,val35,val36,val39,val310,val311,val312,val313;
var val314,val315,val316,val317,val318,val319,val320,val321,val321,val322,val323;
var val324,val325,val326,val327,val328,val329,val330,val331,val332,val333;

if(document.WC7.r1c3.value.length >0)
{
	if(isNaN(parseFloat(document.WC7.r1c3.value)))
	{
		val31=0;
	}
	else
	{
		val31=parseFloat(document.WC7.r1c3.value);
	}
}
else
	val31=0;
//
if(document.WC7.r2c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r2c3.value)))
	{
		val32=0;
	}
	else
	{
		val32=parseFloat(document.WC7.r2c3.value);
	}
}
else
	val32=0;
//
if(document.WC7.r3c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r3c3.value)))
	{
		val33=0;
	}
	else
	{
		val33=parseFloat(document.WC7.r3c3.value);
	}
}
else
	val33=0;

if(document.WC7.r4c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r4c3.value)))
	{
		val34=0;
	}

	else
	{
		val34=parseFloat(document.WC7.r4c3.value);
	}
}
else
	val34=0;
//
if(document.WC7.r5c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r5c3.value)))
	{
		val35=0;
	}
	else
	{
		val35=parseFloat(document.WC7.r5c3.value);
	}
}
else
	val35=0;
if(document.WC7.r7c3.value.length >0)
{
	if(isNaN(parseFloat(document.WC7.r7c3.value)))
	{
		val36=0;
	}
	else
	{
		val36=parseFloat(document.WC7.r7c3.value);
	}
}
else
	val36=0;
//new class code start 
if(document.WC7.r9c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r9c3.value)))
	{
		val39=0;
	}
	else
	{
		val39=parseFloat(document.WC7.r9c3.value);
	}
}
else
	val39=0;
if(document.WC7.r10c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r10c3.value)))
	{
		val310=0;
	}
	else
	{
		val310=parseFloat(document.WC7.r10c3.value);
	}
}
else
	val310=0;
if(document.WC7.r11c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r11c3.value)))
	{
		val311=0;
	}
	else
	{
		val311=parseFloat(document.WC7.r11c3.value);
	}
}
else
	val311=0;
if(document.WC7.r12c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r12c3.value)))
	{
		val312=0;
	}
	else
	{
		val312=parseFloat(document.WC7.r12c3.value);
	}
}
else
	val312=0;
if(document.WC7.r13c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r13c3.value)))
	{
		val313=0;
	}
	else
	{
		val313=parseFloat(document.WC7.r13c3.value);
	}
}
else
	val313=0;
if(document.WC7.r14c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r14c3.value)))
	{
		val314=0;
	}
	else
	{
		val314=parseFloat(document.WC7.r14c3.value);
	}
}
else
	val314=0;
if(document.WC7.r15c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r15c3.value)))
	{
		val315=0;
	}
	else
	{
		val315=parseFloat(document.WC7.r15c3.value);
	}
}
else
	val315=0;
if(document.WC7.r16c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r16c3.value)))
	{
		val316=0;
	}
	else
	{
		val316=parseFloat(document.WC7.r16c3.value);
	}
}
else
	val316=0;
if(document.WC7.r17c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r17c3.value)))
	{
		val317=0;
	}
	else
	{
		val317=parseFloat(document.WC7.r17c3.value);
	}
}
else
	val317=0;
if(document.WC7.r18c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r18c3.value)))
	{
		val318=0;
	}
	else
	{
		val318=parseFloat(document.WC7.r18c3.value);
	}
}
else
	val318=0;
if(document.WC7.r19c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r19c3.value)))
	{
		val319=0;
	}
	else
	{
		val319=parseFloat(document.WC7.r19c3.value);
	}
}
else
	val319=0;
if(document.WC7.r20c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r20c3.value)))
	{
		val320=0;
	}
	else
	{
		val320=parseFloat(document.WC7.r20c3.value);
	}
}
else
	val320=0;
if(document.WC7.r21c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r21c3.value)))
	{
		val321=0;
	}
	else
	{
		val321=parseFloat(document.WC7.r21c3.value);
	}
}
else
	val321=0;
if(document.WC7.r22c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r22c3.value)))
	{
		val322=0;
	}
	else
	{
		val322=parseFloat(document.WC7.r22c3.value);
	}
}
else
	val322=0;
if(document.WC7.r23c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r23c3.value)))
	{
		val323=0;
	}
	else
	{
		val323=parseFloat(document.WC7.r23c3.value);
	}
}
else
	val323=0;
if(document.WC7.r24c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r24c3.value)))
	{
		val324=0;
	}
	else
	{
		val324=parseFloat(document.WC7.r24c3.value);
	}
}
else
	val324=0;
if(document.WC7.r25c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r25c3.value)))
	{
		val325=0;
	}
	else
	{
		val325=parseFloat(document.WC7.r25c3.value);
	}
}
else
	val325=0;
if(document.WC7.r26c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r26c3.value)))
	{
		val326=0;
	}
	else
	{
		val326=parseFloat(document.WC7.r26c3.value);
	}
}
else
	val326=0;
if(document.WC7.r27c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r27c3.value)))
	{
		val327=0;
	}
	else
	{
		val327=parseFloat(document.WC7.r27c3.value);
	}
}
else
	val327=0;
if(document.WC7.r28c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r28c3.value)))
	{
		val328=0;
	}
	else
	{
		val328=parseFloat(document.WC7.r28c3.value);
	}
}
else
	val328=0;
if(document.WC7.r29c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r29c3.value)))
	{
		val329=0;
	}
	else
	{
		val329=parseFloat(document.WC7.r29c3.value);
	}
}
else
	val329=0;
if(document.WC7.r30c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r30c3.value)))
	{
		val330=0;
	}
	else
	{
		val330=parseFloat(document.WC7.r30c3.value);
	}
}
else
	val330=0;
if(document.WC7.r31c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r31c3.value)))
	{
		val331=0;
	}
	else
	{
		val331=parseFloat(document.WC7.r31c3.value);
	}
}
else
	val331=0;
if(document.WC7.r32c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r32c3.value)))
	{
		val332=0;
	}
	else
	{
		val332=parseFloat(document.WC7.r32c3.value);
	}
}
else
	val332=0;
if(document.WC7.r33c3 != null)
{
	if(isNaN(parseFloat(document.WC7.r33c3.value)))
	{
		val333=0;
	}
	else
	{
		val333=parseFloat(document.WC7.r33c3.value);
	}
}
else
	val333=0;
//new classs code end
//COLUMN 4 SUM

var val41,val42,val43,val44,val45,val49,val410,val411,val412,val413;
var val414,val415,val416,val417,val418,val419,val420,val421,val422,val423;
var val424,val425,val426,val427,val428,val429,val430,val431,val432,val433;

if(document.WC7.r1c4.value.length >0)
{
	if(isNaN(parseFloat(document.WC7.r1c4.value)))
	{
		val41	=0;
	}
	else
	{
		val41=parseFloat(document.WC7.r1c4.value);
	}
}
else
	val41=0;
//
if(document.WC7.r2c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r2c4.value)))
	{
		val42=0;
	}
	else
	{

		val42=parseFloat(document.WC7.r2c4.value);
	}
}
else
	val42=0;
//
if(document.WC7.r3c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r3c4.value)))
	{
		val43=0;
	}
	else
	{
		val43=parseFloat(document.WC7.r3c4.value);
	}
}
else
	val43=0;
//
if(document.WC7.r4c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r4c4.value)))
	{
		val44=0;
	}

	else
	{
		val44=parseFloat(document.WC7.r4c4.value);

	}
}
else
	val44=0;
//
if(document.WC7.r5c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r5c4.value)))
	{
		val45=0;
	}
	else
	{
		val45=parseFloat(document.WC7.r5c4.value);
	}
}
else
	val45=0;
//new class code start
if(document.WC7.r9c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r9c4.value)))
	{
		val49=0;	
	}
	else
	{
		val49=parseFloat(document.WC7.r9c4.value);
	}
}
else
	val49=0;
if(document.WC7.r10c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r10c4.value)))
	{
		val410=0;	
	}
	else
	{
		val410=parseFloat(document.WC7.r10c4.value);
	}
}
else
	val410=0;
if(document.WC7.r11c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r11c4.value)))
	{
		val411=0;	
	}
	else
	{
		val411=parseFloat(document.WC7.r11c4.value);
	}
}
else
	val411=0;
if(document.WC7.r12c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r12c4.value)))
	{
		val412=0;	
	}
	else
	{
		val412=parseFloat(document.WC7.r12c4.value);
	}
}
else
	val412=0;
if(document.WC7.r13c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r13c4.value)))
	{
		val413=0;	
	}
	else
	{
		val413=parseFloat(document.WC7.r13c4.value);
	}
}
else
	val413=0;
if(document.WC7.r14c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r14c4.value)))
	{
		val414=0;	
	}
	else
	{
		val414=parseFloat(document.WC7.r14c4.value);
	}
}
else
	val414=0;
if(document.WC7.r15c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r15c4.value)))
	{
		val415=0;	
	}
	else
	{
		val415=parseFloat(document.WC7.r15c4.value);
	}
}
else
	val415=0;
if(document.WC7.r16c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r16c4.value)))
	{
		val416=0;	
	}
	else
	{
		val416=parseFloat(document.WC7.r16c4.value);
	}
}
else
	val416=0;
if(document.WC7.r17c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r17c4.value)))
	{
		val417=0;	
	}
	else
	{
		val417=parseFloat(document.WC7.r17c4.value);
	}
}
else
	val417=0;
if(document.WC7.r18c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r18c4.value)))
	{
		val418=0;	
	}
	else
	{
		val418=parseFloat(document.WC7.r18c4.value);
	}
}
else
	val418=0;
if(document.WC7.r19c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r19c4.value)))
	{
		val419=0;	
	}
	else
	{
		val419=parseFloat(document.WC7.r19c4.value);
	}
}
else
	val419=0;
if(document.WC7.r20c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r20c4.value)))
	{
		val420=0;	
	}
	else
	{
		val420=parseFloat(document.WC7.r20c4.value);
	}
}
else
	val420=0;
if(document.WC7.r21c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r21c4.value)))
	{
		val421=0;	
	}
	else
	{
		val421=parseFloat(document.WC7.r21c4.value);
	}
}
else
	val421=0;
if(document.WC7.r22c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r22c4.value)))
	{
		val422=0;	
	}
	else
	{
		val422=parseFloat(document.WC7.r22c4.value);
	}
}
else
	val422=0;
if(document.WC7.r23c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r23c4.value)))
	{
		val423=0;	
	}
	else
	{
		val423=parseFloat(document.WC7.r23c4.value);
	}
}
else
	val423=0;
if(document.WC7.r24c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r24c4.value)))
	{
		val424=0;	
	}
	else
	{
		val424=parseFloat(document.WC7.r24c4.value);
	}
}
else
	val424=0;
if(document.WC7.r25c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r25c4.value)))
	{
		val425=0;	
	}
	else
	{
		val425=parseFloat(document.WC7.r25c4.value);
	}
}
else
	val425=0;
if(document.WC7.r26c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r26c4.value)))
	{
		val426=0;	
	}
	else
	{
		val426=parseFloat(document.WC7.r26c4.value);
	}
}
else
	val426=0;
if(document.WC7.r27c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r27c4.value)))
	{
		val427=0;	
	}
	else
	{
		val427=parseFloat(document.WC7.r27c4.value);
	}
}
else
	val427=0;
if(document.WC7.r28c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r28c4.value)))
	{
		val428=0;	
	}
	else
	{
		val428=parseFloat(document.WC7.r28c4.value);
	}
}
else
	val428=0;
if(document.WC7.r29c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r29c4.value)))
	{
		val429=0;	
	}
	else
	{
		val429=parseFloat(document.WC7.r29c4.value);
	}
}
else
	val429=0;
if(document.WC7.r30c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r30c4.value)))
	{
		val430=0;	
	}
	else
	{
		val430=parseFloat(document.WC7.r30c4.value);
	}
}
else
	val430=0;
if(document.WC7.r31c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r31c4.value)))
	{
		val431=0;	
	}
	else
	{
		val431=parseFloat(document.WC7.r31c4.value);
	}
}
else
	val431=0;
if(document.WC7.r32c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r32c4.value)))
	{
		val432=0;	
	}
	else
	{
		val432=parseFloat(document.WC7.r32c4.value);
	}
}
else
	val432=0;
if(document.WC7.r33c4 != null)
{
	if(isNaN(parseFloat(document.WC7.r33c4.value)))
	{
		val433=0;	
	}
	else
	{
		val433=parseFloat(document.WC7.r33c4.value);
	}
}
else
	val433=0;
//new class code end
//COLUM 5 SUM
var val51,val52,val53,val54,val55,val57,val59,val510,val511,val512,val513;
var val514,val515,val516,val517,val518,val519,val520,val521,val522,val523,val524;
var val525,val526,val527,val528,val529,val530,val531,val532,val533;

if(document.WC7.r1c5.value.length >0)
{
	if(isNaN(parseFloat(document.WC7.r1c5.value)))
	{
		val51=0;
	}
	else
	{
		val51=parseFloat(document.WC7.r1c5.value);
	}
}
else
	val51=0;
//
if(document.WC7.r2c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r2c5.value)))
	{
		val52=0;
	}
	else
	{
		val52=parseFloat(document.WC7.r2c5.value);
	}
}
else
	val52=0;
//
if(document.WC7.r3c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r3c5.value)))
	{
		val53=0;
	}
	else
	{
		val53=parseFloat(document.WC7.r3c5.value);
	}
}
else
	val53=0;
//
if(document.WC7.r4c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r4c5.value)))
	{
		val54=0;
	}

	else
	{
		val54=parseFloat(document.WC7.r4c5.value);
	}
}
else
	val54=0;
//
if(document.WC7.r5c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r5c5.value)))
	{
		val55=0;
	}
	else
	{
		val55=parseFloat(document.WC7.r5c5.value);
	}
}
else
	val55=0;
//new class code start
if(document.WC7.r9c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r9c5.value)))
	{
		val59=0;
	}
	else
	{
		val59=parseFloat(document.WC7.r9c5.value);
	}
}
else
	val59=0;
if(document.WC7.r10c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r10c5.value)))
	{
		val510=0;
	}
	else
	{
		val510=parseFloat(document.WC7.r10c5.value);
	}
}
else
	val510=0;
if(document.WC7.r11c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r11c5.value)))
	{
		val511=0;
	}
	else
	{
		val511=parseFloat(document.WC7.r11c5.value);
	}
}
else
	val511=0;
if(document.WC7.r12c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r12c5.value)))
	{
		val512=0;
	}
	else
	{
		val512=parseFloat(document.WC7.r12c5.value);
	}
}
else
	val512=0;
if(document.WC7.r13c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r13c5.value)))
	{
		val513=0;
	}
	else
	{
		val513=parseFloat(document.WC7.r13c5.value);
	}
}
else
	val513=0;
if(document.WC7.r14c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r14c5.value)))
	{
		val514=0;
	}
	else
	{
		val514=parseFloat(document.WC7.r14c5.value);
	}
}
else
	val514=0;
if(document.WC7.r15c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r15c5.value)))
	{
		val515=0;
	}
	else
	{
		val515=parseFloat(document.WC7.r15c5.value);
	}
}
else
	val515=0;
if(document.WC7.r16c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r16c5.value)))
	{
		val516=0;
	}
	else
	{
		val516=parseFloat(document.WC7.r16c5.value);
	}
}
else
	val516=0;
if(document.WC7.r17c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r17c5.value)))
	{
		val517=0;
	}
	else
	{
		val517=parseFloat(document.WC7.r17c5.value);
	}
}
else
	val517=0;
if(document.WC7.r18c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r18c5.value)))
	{
		val518=0;
	}
	else
	{
		val518=parseFloat(document.WC7.r18c5.value);
	}
}
else
	val518=0;
if(document.WC7.r19c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r19c5.value)))
	{
		val519=0;
	}
	else
	{
		val519=parseFloat(document.WC7.r19c5.value);
	}
}
else
	val519=0;
if(document.WC7.r20c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r20c5.value)))
	{
		val520=0;
	}
	else
	{
		val520=parseFloat(document.WC7.r20c5.value);
	}
}
else
	val520=0;
if(document.WC7.r21c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r21c5.value)))
	{
		val521=0;
	}
	else
	{
		val521=parseFloat(document.WC7.r21c5.value);
	}
}
else
	val521=0;
if(document.WC7.r22c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r22c5.value)))
	{
		val522=0;
	}
	else
	{
		val522=parseFloat(document.WC7.r22c5.value);
	}
}
else
	val522=0;
if(document.WC7.r23c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r23c5.value)))
	{
		val523=0;
	}
	else
	{
		val523=parseFloat(document.WC7.r23c5.value);
	}
}
else
	val523=0;
if(document.WC7.r24c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r24c5.value)))
	{
		val524=0;
	}
	else
	{
		val524=parseFloat(document.WC7.r24c5.value);
	}
}
else
	val524=0;
if(document.WC7.r25c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r25c5.value)))
	{
		val525=0;
	}
	else
	{
		val525=parseFloat(document.WC7.r25c5.value);
	}
}
else
	val525=0;
if(document.WC7.r26c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r26c5.value)))
	{
		val526=0;
	}
	else
	{
		val526=parseFloat(document.WC7.r26c5.value);
	}
}
else
	val526=0;
if(document.WC7.r27c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r27c5.value)))
	{
		val527=0;
	}
	else
	{
		val527=parseFloat(document.WC7.r27c5.value);
	}
}
else
	val527=0;
if(document.WC7.r28c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r28c5.value)))
	{
		val528=0;
	}
	else
	{
		val528=parseFloat(document.WC7.r28c5.value);
	}
}
else
	val528=0;
if(document.WC7.r29c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r29c5.value)))
	{
		val529=0;
	}
	else
	{
		val529=parseFloat(document.WC7.r29c5.value);
	}
}
else
	val529=0;
if(document.WC7.r30c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r30c5.value)))
	{
		val530=0;
	}
	else
	{
		val530=parseFloat(document.WC7.r30c5.value);
	}
}
else
	val530=0;
if(document.WC7.r31c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r31c5.value)))
	{
		val531=0;
	}
	else
	{
		val531=parseFloat(document.WC7.r31c5.value);
	}
}
else
	val531=0;
if(document.WC7.r32c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r32c5.value)))
	{
		val532=0;
	}
	else
	{
		val532=parseFloat(document.WC7.r32c5.value);
	}
}
else
	val532=0;
if(document.WC7.r33c5 != null)
{
	if(isNaN(parseFloat(document.WC7.r33c5.value)))
	{
		val533=0;
	}
	else
	{
		val533=parseFloat(document.WC7.r33c5.value);
	}
}
else
	val533=0;
//new class code end
//COLUMN 6 SUM

var val61,val62,val63,val64,val65,val69,val610,val611,val612,val613;
var val614,val615,val616,val617,val618,val619,val620,val621,val622,val623;
var val624,val625,val626,val627,val628,val629,val630,val631,val632,val633;

if(document.WC7.r1c6.value.length >0)
{
	if(isNaN(parseFloat(document.WC7.r1c6.value)))
	{
		document.WC7.r1c6.value=0;
	}
	else
	{
		val61=parseFloat(document.WC7.r1c6.value);

	}
}
else
	val61=0;

if(document.WC7.r2c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r2c6.value)))
	{
		document.WC7.r2c6.value=0;
	}
	else
	{

		val62=parseFloat(document.WC7.r2c6.value);

	}
}
else
	val62=0;

if(document.WC7.r3c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r3c6.value)))
	{
		document.WC7.r3c6.value=0;
	}
	else
	{
		val63=parseFloat(document.WC7.r3c6.value);
	}
}
else
	val63=0;

if(document.WC7.r4c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r4c6.value)))
	{
		document.WC7.r4c6.value=0;
	}

	else
	{
		val64=parseFloat(document.WC7.r4c6.value);

	}
}
else
	val64=0;

if(document.WC7.r5c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r5c6.value)))
	{
		document.WC7.r5c6.value=0;
	}
	else
	{
		val65=parseFloat(document.WC7.r5c6.value);

	}
}
else
	val65=0;
//new class code start
if(document.WC7.r9c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r9c6.value)))
	{
		document.WC7.r9c6.value=0;
	}
	else
	{
		val69=parseFloat(document.WC7.r9c6.value);

	}
}
else
	val69=0;
if(document.WC7.r10c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r10c6.value)))
	{
		document.WC7.r10c6.value=0;
	}
	else
	{
		val610=parseFloat(document.WC7.r10c6.value);

	}
}
else
	val610=0;
if(document.WC7.r11c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r11c6.value)))
	{
		document.WC7.r11c6.value=0;
	}
	else
	{
		val611=parseFloat(document.WC7.r11c6.value);

	}
}
else
	val611=0;
if(document.WC7.r12c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r12c6.value)))
	{
		document.WC7.r12c6.value=0;
	}
	else
	{
		val612=parseFloat(document.WC7.r12c6.value);

	}
}
else
	val612=0;
if(document.WC7.r13c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r13c6.value)))
	{
		document.WC7.r13c6.value=0;
	}
	else
	{
		val613=parseFloat(document.WC7.r13c6.value);

	}
}
else
	val613=0;
if(document.WC7.r14c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r14c6.value)))
	{
		val614=0;
	}
	else
	{
		val614=parseFloat(document.WC7.r14c6.value);

	}
}
else
	val614=0;
if(document.WC7.r15c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r15c6.value)))
	{
		val615=0;
	}
	else
	{
		val615=parseFloat(document.WC7.r15c6.value);

	}
}
else
	val615=0;
if(document.WC7.r16c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r16c6.value)))
	{
		val616=0;
	}
	else
	{
		val616=parseFloat(document.WC7.r16c6.value);

	}
}
else
	val616=0;
if(document.WC7.r17c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r17c6.value)))
	{
		val617=0;
	}
	else
	{
		val617=parseFloat(document.WC7.r17c6.value);

	}
}
else
	val617=0;
if(document.WC7.r18c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r18c6.value)))
	{
		val618=0;
	}
	else
	{
		val618=parseFloat(document.WC7.r18c6.value);

	}
}
else
	val618=0;
if(document.WC7.r19c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r19c6.value)))
	{
		val619=0;
	}
	else
	{
		val619=parseFloat(document.WC7.r19c6.value);

	}
}
else
	val619=0;
if(document.WC7.r20c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r20c6.value)))
	{
		val620=0;
	}
	else
	{
		val620=parseFloat(document.WC7.r20c6.value);

	}
}
else
	val620=0;
if(document.WC7.r21c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r21c6.value)))
	{
		val621=0;
	}
	else
	{
		val621=parseFloat(document.WC7.r21c6.value);

	}
}
else
	val621=0;
if(document.WC7.r22c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r22c6.value)))
	{
		val622=0;
	}
	else
	{
		val622=parseFloat(document.WC7.r22c6.value);

	}
}
else
	val622=0;
if(document.WC7.r23c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r23c6.value)))
	{
		val623=0;
	}
	else
	{
		val623=parseFloat(document.WC7.r23c6.value);

	}
}
else
	val623=0;
if(document.WC7.r24c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r24c6.value)))
	{
		val624=0;
	}
	else
	{
		val624=parseFloat(document.WC7.r24c6.value);

	}
}
else
	val624=0;
if(document.WC7.r25c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r25c6.value)))
	{
		val625=0;
	}
	else
	{
		val625=parseFloat(document.WC7.r25c6.value);

	}
}
else
	val625=0;
if(document.WC7.r26c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r26c6.value)))
	{
		val626=0;
	}
	else
	{
		val626=parseFloat(document.WC7.r26c6.value);

	}
}
else
	val626=0;
if(document.WC7.r27c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r27c6.value)))
	{
		val627=0;
	}
	else
	{
		val627=parseFloat(document.WC7.r27c6.value);

	}
}
else
	val627=0;
if(document.WC7.r28c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r28c6.value)))
	{
		val628=0;
	}
	else
	{
		val628=parseFloat(document.WC7.r28c6.value);

	}
}
else
	val628=0;
if(document.WC7.r29c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r29c6.value)))
	{
		val629=0;
	}
	else
	{
		val629=parseFloat(document.WC7.r29c6.value);

	}
}
else
	val629=0;
if(document.WC7.r30c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r30c6.value)))
	{
		val630=0;
	}
	else
	{
		val630=parseFloat(document.WC7.r30c6.value);

	}
}
else
	val630=0;
if(document.WC7.r31c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r31c6.value)))
	{
		val631=0;
	}
	else
	{
		val631=parseFloat(document.WC7.r31c6.value);

	}
}
else
	val631=0;
if(document.WC7.r32c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r32c6.value)))
	{
		val632=0;
	}
	else
	{
		val632=parseFloat(document.WC7.r32c6.value);

	}
}
else
	val632=0;
if(document.WC7.r33c6 != null)
{
	if(isNaN(parseFloat(document.WC7.r33c6.value)))
	{
		val633=0;
	}
	else
	{
		val633=parseFloat(document.WC7.r33c6.value);

	}
}
else
	val633=0;

//new class code end


var temp1,temp2,temp3;

 if(document.WC7.r7c4.value.length >0)
{
	if(isNaN(parseFloat(document.WC7.r7c4.value)))
	{
		document.WC7.r7c4.value=0;
	}
	else
	{
		temp1=document.WC7.r7c4.value;

	}
}

if(document.WC7.r7c2.value.length >0)
{
	if(isNaN(parseFloat(document.WC7.r7c2.value)))
	{
		document.WC7.r7c2.value=0;
	}
	else
	{
		temp2=document.WC7.r7c2.value;
	}
}
 
 temp3=temp1/temp2;

 if(isNaN(temp3))
 {
	document.WC7.r7c5.value=0;
 }
 else
 {
	document.WC7.r7c5.value=roundnum(temp3);
 }

 if(document.WC7.r7c5.value.length >0)
{
	if(isNaN(parseFloat(document.WC7.r7c5.value)))
	{
		document.WC7.r7c5.value=0;
	}
	else
	{
		temp1=document.WC7.r7c5.value;
	}
}

if(document.WC7.r7c3.value.length >0)
{
	if(isNaN(parseFloat(document.WC7.r7c3.value)))
	{
		document.WC7.r7c3.value=0;
	}
	else
	{
		temp2=document.WC7.r7c3.value;
	}
}
 
 temp3=temp1*temp2;
if(isNaN(temp3))
{
	document.WC7.r7c6.value=0;
}
else
{
	document.WC7.r7c6.value=roundnum(temp3);
}

var val46;
if(document.WC7.r7c4.value.length >0)
{
	if(isNaN(parseFloat(document.WC7.r7c4.value)))
	{
		val46=0;
	}
	else
	{
		val46=parseFloat(document.WC7.r7c4.value);
	}
}
var val66;
if(document.WC7.r7c6.value.length >0)
{
	if(isNaN(parseFloat(document.WC7.r7c6.value)))
	{
		val66=0;
	}
	else
	{

		val66=parseFloat(document.WC7.r7c6.value);
	}
}

if(isNaN(val66))
{

	var sum6=val61+val62+val63+val64+val65+val69+val610+val611+val612+val613+val614+val615+val616+val617+val618+val619+val620+val621+val622+val623+val624+val625+val626+val627+val628+val629+val630+val631+val632+val633;
	document.WC7.r8c6.value=roundnum(sum6);
}
else
{
	var sum6=val61+val62+val63+val64+val65+val66+val69+val610+val611+val612+val613+val614+val615+val616+val617+val618+val619+val620+val621+val622+val623+val624+val625+val626+val627+val628+val629+val630+val631+val632+val633;
	document.WC7.r8c6.value=roundnum(sum6);

}

var val57;
if(document.WC7.r7c5.value.length >0)
{
	if(isNaN(parseFloat(document.WC7.r7c5.value)))
	{
		val57=0;
	}
	else
	{
		val57=parseFloat(document.WC7.r7c5.value);
	}
}


if(isNaN(val57))
{
	var sum5;
	sum5=val51+val52+val53+val54+val55+val57+val59+val510+val511+val512+val513+val514+val515+val516+val517+val518+val519+val520+val521+val522+val523+val524+val525+val526+val527+val528+val529+val530+val531+val532+val533;
	document.WC7.r8c5.value=roundnum(sum5);

}
else
{
	document.WC7.r8c5.value=roundnum(val51+val52+val53+val54+val55+val57+val59+val510+val511+val512+val513+val514+val515+val516+val517+val518+val519+val520+val521+val522+val523+val524+val525+val526+val527+val528+val529+val530+val531+val532+val533);
}
if(isNaN(sum6/sum5))
{
	document.WC7.EffPremium.value=0;
}
else
{
	var xValue = sum6/sum5;
//	document.WC7.EffPremium.value = roundnum(xValue);

	document.WC7.EffPremium.value =Math.round(xValue*Math.pow(10,2))/Math.pow(10,2);
}

}  
//***********************Calculater for Form 7*************************************//


function caculateCol5()
{
 var V1,V2,V3;
 
	//row1
	if(document.WC7.r1c4.value.length >0)
	{
		if(isNaN(parseFloat(document.WC7.r1c4.value)))
			document.WC7.r1c4.value=0;
		else
			V1=document.WC7.r1c4.value;
	}

	if(document.WC7.r1c2.value.length >0)
	{
		if(isNaN(parseFloat(document.WC7.r1c2.value)))
			document.WC7.r1c2.value=0;
		else
			V2=document.WC7.r1c2.value;
	}
	V3=V1/V2;
	if(isNaN(V3))
		document.WC7.r1c5.value=0;
	else
		document.WC7.r1c5.value=roundnum(V3);

	//row1

	if(document.WC7.r2c1 != null)
	{
		if(document.WC7.r2c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r2c4.value)))
				document.WC7.r2c4.value=0;
			else
				V1=document.WC7.r2c4.value;
		}
		if(document.WC7.r2c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r2c2.value)))
				document.WC7.r2c2.value=0;
			else
				V2=document.WC7.r2c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r2c5.value=0;
		else
			document.WC7.r2c5.value=roundnum(V3);
	}
	//row1
	if(document.WC7.r3c1 != null)
	{
		if(document.WC7.r3c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r3c4.value)))
				document.WC7.r3c4.value=0;
			else
				V1=document.WC7.r3c4.value;
		}
		if(document.WC7.r3c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r3c2.value)))
				document.WC7.r3c2.value=0;
			else
				V2=document.WC7.r3c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r3c5.value=0;
		else
			document.WC7.r3c5.value=roundnum(V3);
	}
	//row1
	if(document.WC7.r4c1 != null)
	{
		if(document.WC7.r4c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r4c4.value)))
				document.WC7.r4c4.value=0;
			else
				V1=document.WC7.r4c4.value;
		}
		if(document.WC7.r4c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r4c2.value)))
				document.WC7.r4c2.value=0;
			else
				V2=document.WC7.r4c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r4c5.value=0;
		else
			document.WC7.r4c5.value=roundnum(V3);
	}
	//row1
	if(document.WC7.r5c1 != null)
	{
		if(document.WC7.r5c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r5c4.value)))
				document.WC7.r5c4.value=0;
			else
				V1=document.WC7.r5c4.value;
		}
		if(document.WC7.r5c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r5c2.value)))
				document.WC7.r5c2.value=0;
			else
				V2=document.WC7.r5c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r5c5.value=0;
		else
			document.WC7.r5c5.value=roundnum(V3);
	}
	//row1
	/*if(document.WC7.r6c4.value.length >0)
	{
		if(isNaN(parseFloat(document.WC7.r6c4.value)))
			document.WC7.r6c4.value=0;
		else
			V1=document.WC7.r6c4.value;
	}
	if(document.WC7.r6c2.value.length >0)
	{
		if(isNaN(parseFloat(document.WC7.r6c2.value)))
			document.WC7.r6c2.value=0;
		else
			V2=document.WC7.r6c2.value;
	}
	V3=V1/V2;
	if(isNaN(V3))
		document.WC7.r6c5.value=0;
	else
		document.WC7.r6c5.value=roundnum(V3);*/

	//row1
	if(document.WC7.r9c1 != null)
	{
		if(document.WC7.r9c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r9c4.value)))
				document.WC7.r9c4.value=0;
			else
				V1=document.WC7.r9c4.value;
		}
		if(document.WC7.r9c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r9c2.value)))
				document.WC7.r9c2.value=0;
			else
				V2=document.WC7.r9c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r9c5.value=0;
		else
			document.WC7.r9c5.value=roundnum(V3);
	}
	//row10
	if(document.WC7.r10c1 != null)
	{
		if(document.WC7.r10c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r10c4.value)))
				document.WC7.r10c4.value=0;
			else
				V1=document.WC7.r10c4.value;
		}
		if(document.WC7.r10c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r10c2.value)))
				document.WC7.r10c2.value=0;
			else
				V2=document.WC7.r10c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r10c5.value=0;
		else
			document.WC7.r10c5.value=roundnum(V3);
	}
	//row10
	if(document.WC7.r11c1 != null)
	{
		if(document.WC7.r11c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r11c4.value)))
				document.WC7.r11c4.value=0;
			else
				V1=document.WC7.r11c4.value;
		}
		if(document.WC7.r11c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r11c2.value)))
				document.WC7.r11c2.value=0;
			else
				V2=document.WC7.r11c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r11c5.value=0;
		else
			document.WC7.r11c5.value=roundnum(V3);
	}
	//row10
	if(document.WC7.r12c1 != null)
	{
		if(document.WC7.r12c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r12c4.value)))
				document.WC7.r12c4.value=0;
			else
				V1=document.WC7.r12c4.value;
		}
		if(document.WC7.r12c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r12c2.value)))
				document.WC7.r12c2.value=0;
			else
				V2=document.WC7.r12c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r12c5.value=0;
		else
			document.WC7.r12c5.value=roundnum(V3);
	}
	//row10
	if(document.WC7.r13c1 != null)
	{
		if(document.WC7.r13c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r13c4.value)))
				document.WC7.r13c4.value=0;
			else
				V1=document.WC7.r13c4.value;
		}
		if(document.WC7.r13c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r13c2.value)))
				document.WC7.r13c2.value=0;
			else
				V2=document.WC7.r13c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r13c5.value=0;
		else
			document.WC7.r13c5.value=roundnum(V3);
	}
	//row10
	if(document.WC7.r14c1 != null)
	{
		if(document.WC7.r14c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r14c4.value)))
				document.WC7.r14c4.value=0;
			else
				V1=document.WC7.r14c4.value;
		}
		if(document.WC7.r14c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r14c2.value)))
				document.WC7.r14c2.value=0;
			else
				V2=document.WC7.r14c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r14c5.value=0;
		else
			document.WC7.r14c5.value=roundnum(V3);
	}
	//row10
	if(document.WC7.r15c1 != null)
	{
		if(document.WC7.r15c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r15c4.value)))
				document.WC7.r15c4.value=0;
			else
				V1=document.WC7.r15c4.value;
		}
		if(document.WC7.r15c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r15c2.value)))
				document.WC7.r15c2.value=0;
			else
				V2=document.WC7.r15c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r15c5.value=0;
		else
			document.WC7.r15c5.value=roundnum(V3);
	}
	//row10
	if(document.WC7.r16c1 != null)
	{
		if(document.WC7.r16c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r16c4.value)))
				document.WC7.r16c4.value=0;
			else
				V1=document.WC7.r16c4.value;
		}
		if(document.WC7.r16c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r16c2.value)))
				document.WC7.r16c2.value=0;
			else
				V2=document.WC7.r16c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r16c5.value=0;
		else
			document.WC7.r16c5.value=roundnum(V3);
	}
	//row10
	if(document.WC7.r17c1 != null)
	{
		if(document.WC7.r17c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r17c4.value)))
				document.WC7.r17c4.value=0;
			else
				V1=document.WC7.r17c4.value;
		}
		if(document.WC7.r17c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r17c2.value)))
				document.WC7.r17c2.value=0;
			else
				V2=document.WC7.r17c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r17c5.value=0;
		else
			document.WC7.r17c5.value=roundnum(V3);
	}

	//row10
	if(document.WC7.r18c1 != null)
	{
		if(document.WC7.r18c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r18c4.value)))
				document.WC7.r18c4.value=0;
			else
				V1=document.WC7.r18c4.value;
		}
		if(document.WC7.r18c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r18c2.value)))
				document.WC7.r18c2.value=0;
			else
				V2=document.WC7.r18c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r18c5.value=0;
		else
			document.WC7.r18c5.value=roundnum(V3);
	}
	//row10
	if(document.WC7.r19c1 != null)
	{
		if(document.WC7.r19c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r19c4.value)))
				document.WC7.r19c4.value=0;
			else
				V1=document.WC7.r19c4.value;
		}
		if(document.WC7.r19c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r19c2.value)))
				document.WC7.r19c2.value=0;
			else
				V2=document.WC7.r19c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r19c5.value=0;
		else
			document.WC7.r19c5.value=roundnum(V3);
	}
	//row20
	if(document.WC7.r20c1 != null)
	{
		if(document.WC7.r20c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r20c4.value)))
				document.WC7.r20c4.value=0;
			else
				V1=document.WC7.r20c4.value;
		}
		if(document.WC7.r20c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r20c2.value)))
				document.WC7.r20c2.value=0;
			else
				V2=document.WC7.r20c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r20c5.value=0;
		else
			document.WC7.r20c5.value=roundnum(V3);
	}
	//row20
	if(document.WC7.r21c1 != null)
	{
		if(document.WC7.r21c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r21c4.value)))
				document.WC7.r21c4.value=0;
			else
				V1=document.WC7.r21c4.value;
		}
		if(document.WC7.r21c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r21c2.value)))
				document.WC7.r21c2.value=0;
			else
				V2=document.WC7.r21c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r21c5.value=0;
		else
			document.WC7.r21c5.value=roundnum(V3);
	}
	//row20
	if(document.WC7.r22c1 != null)
	{
		if(document.WC7.r22c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r22c4.value)))
				document.WC7.r22c4.value=0;
			else
				V1=document.WC7.r22c4.value;
		}
		if(document.WC7.r22c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r22c2.value)))
				document.WC7.r22c2.value=0;
			else
				V2=document.WC7.r22c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r22c5.value=0;
		else
			document.WC7.r22c5.value=roundnum(V3);
	}
	//row20
	if(document.WC7.r23c1 != null)
	{
		if(document.WC7.r23c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r23c4.value)))
				document.WC7.r23c4.value=0;
			else
				V1=document.WC7.r23c4.value;
		}
		if(document.WC7.r23c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r23c2.value)))
				document.WC7.r23c2.value=0;
			else
				V2=document.WC7.r23c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r23c5.value=0;
		else
			document.WC7.r23c5.value=roundnum(V3);
	}
	//row20
	if(document.WC7.r24c1 != null)
	{
		if(document.WC7.r24c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r24c4.value)))
				document.WC7.r24c4.value=0;
			else
				V1=document.WC7.r24c4.value;
		}
		if(document.WC7.r24c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r24c2.value)))
				document.WC7.r24c2.value=0;
			else
				V2=document.WC7.r24c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r24c5.value=0;
		else
			document.WC7.r24c5.value=roundnum(V3);
	}
	//row20
	if(document.WC7.r25c1 != null)
	{
		if(document.WC7.r25c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r25c4.value)))
				document.WC7.r25c4.value=0;
			else
				V1=document.WC7.r25c4.value;
		}
		if(document.WC7.r25c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r25c2.value)))
				document.WC7.r25c2.value=0;
			else
				V2=document.WC7.r25c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r25c5.value=0;
		else
			document.WC7.r25c5.value=roundnum(V3);
	}
	//row20
	if(document.WC7.r26c1 != null)
	{
		if(document.WC7.r26c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r26c4.value)))
				document.WC7.r26c4.value=0;
			else
				V1=document.WC7.r26c4.value;
		}
		if(document.WC7.r26c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r26c2.value)))
				document.WC7.r26c2.value=0;
			else
				V2=document.WC7.r26c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r26c5.value=0;
		else
			document.WC7.r26c5.value=roundnum(V3);
	}
	//row20
	if(document.WC7.r27c1 != null)
	{
		if(document.WC7.r27c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r27c4.value)))
				document.WC7.r27c4.value=0;
			else
				V1=document.WC7.r27c4.value;
		}
		if(document.WC7.r27c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r27c2.value)))
				document.WC7.r27c2.value=0;
			else
				V2=document.WC7.r27c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r27c5.value=0;
		else
			document.WC7.r27c5.value=roundnum(V3);
	}
	//row20
	if(document.WC7.r28c1 != null)
	{
		if(document.WC7.r28c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r28c4.value)))
				document.WC7.r28c4.value=0;
			else
				V1=document.WC7.r28c4.value;
		}
		if(document.WC7.r28c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r28c2.value)))
				document.WC7.r28c2.value=0;
			else
				V2=document.WC7.r28c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r28c5.value=0;
		else
			document.WC7.r28c5.value=roundnum(V3);
	}
	//row20
	if(document.WC7.r29c1 != null)
	{
		if(document.WC7.r29c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r29c4.value)))
				document.WC7.r29c4.value=0;
			else
				V1=document.WC7.r29c4.value;
		}
		if(document.WC7.r29c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r29c2.value)))
				document.WC7.r29c2.value=0;
			else
				V2=document.WC7.r29c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r29c5.value=0;
		else
			document.WC7.r29c5.value=roundnum(V3);
	}
	//row30
	if(document.WC7.r30c1 != null)
	{
		if(document.WC7.r30c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r30c4.value)))
				document.WC7.r30c4.value=0;
			else
				V1=document.WC7.r30c4.value;
		}
		if(document.WC7.r30c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r30c2.value)))
				document.WC7.r30c2.value=0;
			else
				V2=document.WC7.r30c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r30c5.value=0;
		else
			document.WC7.r30c5.value=roundnum(V3);
	}
	//row30
	if(document.WC7.r31c1 != null)
	{
		if(document.WC7.r31c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r31c4.value)))
				document.WC7.r31c4.value=0;
			else
				V1=document.WC7.r31c4.value;
		}
		if(document.WC7.r31c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r31c2.value)))
				document.WC7.r31c2.value=0;
			else
				V2=document.WC7.r31c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r31c5.value=0;
		else
			document.WC7.r31c5.value=roundnum(V3);
	}		
	//row30
	if(document.WC7.r32c1 != null)
	{
		if(document.WC7.r32c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r32c4.value)))
				document.WC7.r32c4.value=0;
			else
				V1=document.WC7.r32c4.value;
		}
		if(document.WC7.r32c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r32c2.value)))
				document.WC7.r32c2.value=0;
			else
				V2=document.WC7.r32c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r32c5.value=0;
		else
			document.WC7.r32c5.value=roundnum(V3);
	}
	//row30
	if(document.WC7.r33c1 != null)
	{
		if(document.WC7.r33c4.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r33c4.value)))
				document.WC7.r33c4.value=0;
			else
				V1=document.WC7.r33c4.value;
		}
		if(document.WC7.r33c2.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r33c2.value)))
				document.WC7.r33c2.value=0;
			else
				V2=document.WC7.r33c2.value;
		}
		V3=V1/V2;
		if(isNaN(V3))
			document.WC7.r33c5.value=0;
		else
			document.WC7.r33c5.value=roundnum(V3);
	}
 }

function calcformw7()
{ 
	caculateCol5();
	var val1,val2,val3;
 
	//row1
	if(document.WC7.r1c3.value.length >0)
	{
		if(isNaN(parseFloat(document.WC7.r1c3.value)))
			document.WC7.r1c3.value=0;
		else
			val1=document.WC7.r1c3.value;
	}
	if(document.WC7.r1c5.value.length >0)
	{
		if(isNaN(parseFloat(document.WC7.r1c5.value)))
			document.WC7.r1c5.value=0;
		else
			val2=document.WC7.r1c5.value;
	}
	val3=val1*val2;
	if(isNaN(val3))
		document.WC7.r1c6.value=0;
	else
		document.WC7.r1c6.value=roundnum(val3);

	//row1
	if(document.WC7.r2c1 != null)
	{
		if(document.WC7.r2c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r2c3.value)))
				document.WC7.r2c3.value=0;
			else
				val1=document.WC7.r2c3.value;
		}
		if(document.WC7.r2c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r2c5.value)))
				document.WC7.r2c5.value=0;
			else
				val2=document.WC7.r2c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r2c6.value=0;
		else
			document.WC7.r2c6.value=roundnum(val3);
	}
	
	//row1
	if(document.WC7.r3c1 != null)
	{
		if(document.WC7.r3c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r3c3.value)))
				document.WC7.r3c3.value=0;
			else
				val1=document.WC7.r3c3.value;
		}
		if(document.WC7.r3c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r3c5.value)))
				document.WC7.r3c5.value=0;
			else
				val2=document.WC7.r3c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r3c6.value=0;
		else
			document.WC7.r3c6.value=roundnum(val3);
	}

	//row1
	if(document.WC7.r4c1 != null)
	{
		if(document.WC7.r4c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r4c3.value)))
				document.WC7.r4c3.value=0;
			else
				val1=document.WC7.r4c3.value;
		}
		if(document.WC7.r4c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r4c5.value)))
				document.WC7.r4c5.value=0;
			else
				val2=document.WC7.r4c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r4c6.value=0;
		else
			document.WC7.r4c6.value=roundnum(val3);
	}

	//row1
	if(document.WC7.r5c1 != null)
	{
		if(document.WC7.r5c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r5c3.value)))
				document.WC7.r5c3.value=0;
			else
				val1=document.WC7.r5c3.value;
		}
		if(document.WC7.r5c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r5c5.value)))
				document.WC7.r5c5.value=0;
			else
				val2=document.WC7.r5c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r5c6.value=0;
		else
			document.WC7.r5c6.value=roundnum(val3);
	}

	//row1
	if(document.WC7.r9c1 != null)
	{
		if(document.WC7.r9c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r9c3.value)))
				document.WC7.r9c3.value=0;
			else
				val1=document.WC7.r9c3.value;
		}
		if(document.WC7.r9c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r9c5.value)))
				document.WC7.r9c5.value=0;
			else
				val2=document.WC7.r9c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r9c6.value=0;
		else
			document.WC7.r9c6.value=roundnum(val3);
	}

	//row10
	if(document.WC7.r10c1 != null)
	{
		if(document.WC7.r10c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r10c3.value)))
				document.WC7.r10c3.value=0;
			else
				val1=document.WC7.r10c3.value;
		}
		if(document.WC7.r10c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r10c5.value)))
				document.WC7.r10c5.value=0;
			else
				val2=document.WC7.r10c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r10c6.value=0;
		else
			document.WC7.r10c6.value=roundnum(val3);
	}

	//row10
	if(document.WC7.r11c1 != null)
	{
		if(document.WC7.r11c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r11c3.value)))
				document.WC7.r11c3.value=0;
			else
				val1=document.WC7.r11c3.value;
		}
		if(document.WC7.r11c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r11c5.value)))
				document.WC7.r11c5.value=0;
			else
				val2=document.WC7.r11c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r11c6.value=0;
		else
			document.WC7.r11c6.value=roundnum(val3);
	}
	
		//row10
	if(document.WC7.r12c1 != null)
	{
		if(document.WC7.r12c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r12c3.value)))
				document.WC7.r12c3.value=0;
			else
				val1=document.WC7.r12c3.value;
		}
		if(document.WC7.r12c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r12c5.value)))
				document.WC7.r12c5.value=0;
			else
				val2=document.WC7.r12c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r12c6.value=0;
		else
			document.WC7.r12c6.value=roundnum(val3);
	}

	//row10
	if(document.WC7.r13c1 != null)
	{
		if(document.WC7.r13c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r13c3.value)))
				document.WC7.r13c3.value=0;
			else
				val1=document.WC7.r13c3.value;
		}
		if(document.WC7.r13c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r13c5.value)))
				document.WC7.r13c5.value=0;
			else
				val2=document.WC7.r13c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r13c6.value=0;
		else
			document.WC7.r13c6.value=roundnum(val3);
	}

	//row10
	if(document.WC7.r14c1 != null)
	{
		if(document.WC7.r14c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r14c3.value)))
				document.WC7.r14c3.value=0;
			else
				val1=document.WC7.r14c3.value;
		}
		if(document.WC7.r14c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r14c5.value)))
				document.WC7.r14c5.value=0;
			else
				val2=document.WC7.r14c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r14c6.value=0;
		else
			document.WC7.r14c6.value=roundnum(val3);
	}

	//row10
	if(document.WC7.r15c1 != null)
	{
		if(document.WC7.r15c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r15c3.value)))
				document.WC7.r15c3.value=0;
			else
				val1=document.WC7.r15c3.value;
		}
		if(document.WC7.r15c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r15c5.value)))
				document.WC7.r15c5.value=0;
			else
				val2=document.WC7.r15c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r15c6.value=0;
		else
			document.WC7.r15c6.value=roundnum(val3);
	}

	//row10
	if(document.WC7.r16c1 != null)
	{
		if(document.WC7.r16c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r16c3.value)))
				document.WC7.r16c3.value=0;
			else
				val1=document.WC7.r16c3.value;
		}
		if(document.WC7.r16c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r16c5.value)))
				document.WC7.r16c5.value=0;
			else
				val2=document.WC7.r16c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r16c6.value=0;
		else
			document.WC7.r16c6.value=roundnum(val3);
	}
	
	//row10
	if(document.WC7.r17c1 != null)
	{
		if(document.WC7.r17c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r17c3.value)))
				document.WC7.r17c3.value=0;
			else
				val1=document.WC7.r17c3.value;
		}
		if(document.WC7.r17c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r17c5.value)))
				document.WC7.r17c5.value=0;
			else
				val2=document.WC7.r17c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r17c6.value=0;
		else
			document.WC7.r17c6.value=roundnum(val3);
	}	

	//row10
	if(document.WC7.r18c1 != null)
	{
		if(document.WC7.r18c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r18c3.value)))
				document.WC7.r18c3.value=0;
			else
				val1=document.WC7.r18c3.value;
		}
		if(document.WC7.r18c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r18c5.value)))
				document.WC7.r18c5.value=0;
			else
				val2=document.WC7.r18c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r18c6.value=0;
		else
			document.WC7.r18c6.value=roundnum(val3);
	}	
	
		//row10
	if(document.WC7.r19c1 != null)
	{
		if(document.WC7.r19c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r19c3.value)))
				document.WC7.r19c3.value=0;
			else
				val1=document.WC7.r19c3.value;
		}
		if(document.WC7.r19c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r19c5.value)))
				document.WC7.r19c5.value=0;
			else
				val2=document.WC7.r19c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r19c6.value=0;
		else
			document.WC7.r19c6.value=roundnum(val3);
	}
	
		//row20
	if(document.WC7.r20c1 != null)
	{
		if(document.WC7.r20c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r20c3.value)))
				document.WC7.r20c3.value=0;
			else
				val1=document.WC7.r20c3.value;
		}
		if(document.WC7.r20c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r20c5.value)))
				document.WC7.r20c5.value=0;
			else
				val2=document.WC7.r20c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r20c6.value=0;
		else
			document.WC7.r20c6.value=roundnum(val3);
	}

		//row20
	if(document.WC7.r21c1 != null)
	{
		if(document.WC7.r21c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r21c3.value)))
				document.WC7.r21c3.value=0;
			else
				val1=document.WC7.r21c3.value;
		}
		if(document.WC7.r21c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r21c5.value)))
				document.WC7.r21c5.value=0;
			else
				val2=document.WC7.r21c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r21c6.value=0;
		else
			document.WC7.r21c6.value=roundnum(val3);
	}

		//row20
	if(document.WC7.r22c1 != null)
	{
		if(document.WC7.r22c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r22c3.value)))
				document.WC7.r22c3.value=0;
			else
				val1=document.WC7.r22c3.value;
		}
		if(document.WC7.r22c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r22c5.value)))
				document.WC7.r22c5.value=0;
			else
				val2=document.WC7.r22c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r22c6.value=0;
		else
			document.WC7.r22c6.value=roundnum(val3);
	}

		//row20
	if(document.WC7.r23c1 != null)
	{
		if(document.WC7.r23c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r23c3.value)))
				document.WC7.r23c3.value=0;
			else
				val1=document.WC7.r23c3.value;
		}
		if(document.WC7.r23c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r23c5.value)))
				document.WC7.r23c5.value=0;
			else
				val2=document.WC7.r23c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r23c6.value=0;
		else
			document.WC7.r23c6.value=roundnum(val3);
	}

		//row20
	if(document.WC7.r24c1 != null)
	{
		if(document.WC7.r24c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r24c3.value)))
				document.WC7.r24c3.value=0;
			else
				val1=document.WC7.r24c3.value;
		}
		if(document.WC7.r24c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r24c5.value)))
				document.WC7.r24c5.value=0;
			else
				val2=document.WC7.r24c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r24c6.value=0;
		else
			document.WC7.r24c6.value=roundnum(val3);
	}

		//row20
	if(document.WC7.r25c1 != null)
	{
		if(document.WC7.r25c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r25c3.value)))
				document.WC7.r25c3.value=0;
			else
				val1=document.WC7.r25c3.value;
		}
		if(document.WC7.r25c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r25c5.value)))
				document.WC7.r25c5.value=0;
			else
				val2=document.WC7.r25c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r25c6.value=0;
		else
			document.WC7.r25c6.value=roundnum(val3);
	}

		//row20
	if(document.WC7.r26c1 != null)
	{
		if(document.WC7.r26c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r26c3.value)))
				document.WC7.r26c3.value=0;
			else
				val1=document.WC7.r26c3.value;
		}
		if(document.WC7.r26c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r26c5.value)))
				document.WC7.r26c5.value=0;
			else
				val2=document.WC7.r26c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r26c6.value=0;
		else
			document.WC7.r26c6.value=roundnum(val3);
	}

		//row20
	if(document.WC7.r27c1 != null)
	{
		if(document.WC7.r27c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r27c3.value)))
				document.WC7.r27c3.value=0;
			else
				val1=document.WC7.r27c3.value;
		}
		if(document.WC7.r27c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r27c5.value)))
				document.WC7.r27c5.value=0;
			else
				val2=document.WC7.r27c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r27c6.value=0;
		else
			document.WC7.r27c6.value=roundnum(val3);
	}

		//row20
	if(document.WC7.r28c1 != null)
	{
		if(document.WC7.r28c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r28c3.value)))
				document.WC7.r28c3.value=0;
			else
				val1=document.WC7.r28c3.value;
		}
		if(document.WC7.r20c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r28c5.value)))
				document.WC7.r28c5.value=0;
			else
				val2=document.WC7.r28c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r28c6.value=0;
		else
			document.WC7.r28c6.value=roundnum(val3);
	}

		//row20
	if(document.WC7.r29c1 != null)
	{
		if(document.WC7.r29c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r29c3.value)))
				document.WC7.r29c3.value=0;
			else
				val1=document.WC7.r29c3.value;
		}
		if(document.WC7.r29c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r29c5.value)))
				document.WC7.r29c5.value=0;
			else
				val2=document.WC7.r29c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r29c6.value=0;
		else
			document.WC7.r29c6.value=roundnum(val3);
	}

		//row30
	if(document.WC7.r30c1 != null)
	{
		if(document.WC7.r30c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r30c3.value)))
				document.WC7.r30c3.value=0;
			else
				val1=document.WC7.r30c3.value;
		}
		if(document.WC7.r30c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r30c5.value)))
				document.WC7.r30c5.value=0;
			else
				val2=document.WC7.r30c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r30c6.value=0;
		else
			document.WC7.r30c6.value=roundnum(val3);
	}

		//row30
	if(document.WC7.r31c1 != null)
	{
		if(document.WC7.r31c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r31c3.value)))
				document.WC7.r31c3.value=0;
			else
				val1=document.WC7.r31c3.value;
		}
		if(document.WC7.r31c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r31c5.value)))
				document.WC7.r31c5.value=0;
			else
				val2=document.WC7.r31c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r31c6.value=0;
		else
			document.WC7.r31c6.value=roundnum(val3);
	}

		//row30
	if(document.WC7.r32c1 != null)
	{
		if(document.WC7.r32c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r32c3.value)))
				document.WC7.r32c3.value=0;
			else
				val1=document.WC7.r32c3.value;
		}
		if(document.WC7.r32c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r32c5.value)))
				document.WC7.r32c5.value=0;
			else
				val2=document.WC7.r32c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r32c6.value=0;
		else
			document.WC7.r32c6.value=roundnum(val3);
	}

		//row30
	if(document.WC7.r33c1 != null)
	{
		if(document.WC7.r33c3.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r33c3.value)))
				document.WC7.r33c3.value=0;
			else
				val1=document.WC7.r33c3.value;
		}
		if(document.WC7.r33c5.value.length >0)
		{
			if(isNaN(parseFloat(document.WC7.r33c5.value)))
				document.WC7.r33c5.value=0;
			else
				val2=document.WC7.r33c5.value;
		}
		val3=val1*val2;
		if(isNaN(val3))
			document.WC7.r33c6.value=0;
		else
			document.WC7.r33c6.value=roundnum(val3);
	}

}

  function Logout_Clicked()
			{
				//debugger
				if ( confirm("Are you sure you want to logout?\nClick OK to logout (All unsaved data will be lost).\nClick Cancel to return to the application.") )
				{
					
				}
				else				
				{
					window.event.returnValue = false;
				}
			}
//**********************************************************8888888




function CheckRadio()
  {
	
		if(document.frm_OPTIN.rad1.checked == false && document.frm_OPTIN.rad2.checked == false)
		{
			
			window.event.returnValue = false;	
			return;
		}
		else if(document.frm_OPTIN.rad1.checked == true)
		{
			if (! confirm("You have selected the option 'MWCIA will Advance the Filing fee'. Are u sure you want to select this option"))			
			{
				window.event.returnValue = false;				
				return;
			}
			
		}
		else if(document.frm_OPTIN.rad2.checked == true)
		{
			if (! confirm("You have selected the option 'Carrier will Mail the Filing fee'. \nAre u sure you want to select this option"))			
			{
				window.event.returnValue = false;	  			
				return;
			}
		}
		


  }
  
  
  function CheckRadio2()
  {
		if(document.frm_OPTIN.rad1.checked == false && document.frm_OPTIN.rad2.checked == false)
		{
			
			window.event.returnValue = false;	
			
		}
		else if(document.frm_OPTIN.rad1.checked == true)
		{
			if (! confirm("You have selected the option 'MWCIA will Advance the Filing fee'. Are u sure you want to select this option"))			
			{
				window.event.returnValue = false;				
			
			}
			
		}
		else if(document.frm_OPTIN.rad2.checked == true)
		{
			if (! confirm("You have selected the option 'Carrier will Mail the Filing fee'. \nAre u sure you want to select this option"))			
			{
				window.event.returnValue = false;	  			
				//return false;
			}
		}
		
 }
 
 
 function CheckedFirst()
 {
 document.frm_OPTIN.rad2.checked=false;  
 }
 function CheckedSecond()
 {
 document.frm_OPTIN.rad1.checked=false;  
 }
 
 
 function DisableDave()
 {
 document.WC1.lmul.value=0;  
 document.WC1.hmul.value=0; 
 document.WC1.avmul.value=0; 
 document.WC1.exconst.value=0;    
 }
 
 function DisableNoDave()
 { 
 document.WC1.mul.value=0;  
 document.WC1.smch.value=0; 
 document.WC1.lrginc.value=0; 
 document.WC1.xconst.value=0;  
 }


//*************************** 60 days date validation*******************************
//Proposed effective date should be not be greater than 60 days
//**********************************************************************************
function OneDaysDifferenc(yr,m,d) {
	var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");

	var today=new Date();
	var todayy=today.getYear();
	var todaym=today.getMonth();
	var todayd=today.getDate();

	var todaystring=montharray[todaym]+" "+todayd+", "+todayy;
	var paststring=montharray[m-1]+" "+d+", "+yr;
	var difference=(Math.round((Date.parse(paststring)-Date.parse(todaystring))/(24*60*60*1000))*1);
	
	 if (difference<0) 
	{			
		alert("Filing Date cannot be less than today's date");				
		return false;			
	}
	else
	{	
		return true;
	}
}



function isDate1(dtStr){
document.frm_PCDT.Eff_Date_Renewal.value = document.frm_PCDT.Eff_Date_New.value;
	//alert('hello');
	var daysInMonth = DaysArray(12)
	var pos1=dtStr.indexOf(dtCh)
	var pos2=dtStr.indexOf(dtCh,pos1+1)
	var strMonth=dtStr.substring(0,pos1)
	var strDay=dtStr.substring(pos1+1,pos2)
	var strYear=dtStr.substring(pos2+1)
	strYr=strYear
	if (strDay.charAt(0)=="0" && strDay.length>1 && strDay.length<3 ) strDay=strDay.substring(1)
	if (strMonth.charAt(0)=="0" && strMonth.length>1 && strMonth.length<3) strMonth=strMonth.substring(1)
	for (var i = 1; i <= 3; i++) {
		if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1)
	}
	month=parseInt(strMonth)
	day=parseInt(strDay)
	year=parseInt(strYr)
	
	if (pos1==-1 || pos2==-1){
//		alert("The date format should be : mm/dd/yyyy")
		return false
		
	}
	if (strMonth.length<1 || strMonth.length>2 || month<1 || month>12){
//		alert("Please enter a valid month")
		return false
	}
	
	if (strDay.length<1 || strDay.length>2 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
//		alert("Please enter a valid day ")
		return false
	}
	if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){
//		alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear)
		return false
	}
	if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
		alert("Please enter a valid date")
		return false
	}
	
FillDate();	
return true
}

function FillDate()
{
if(document.frm_PCDT.Eff_Date_New.value!="")
{
document.frm_PCDT.Eff_Date_Renewal.value=document.frm_PCDT.Eff_Date_New.value;
}
else if(document.frm_PCDT.Eff_Date_Renewal.value!="")
{
document.frm_PCDT.Eff_Date_New.value=document.frm_PCDT.Eff_Date_Renewal.value;
}
}



function DocProcValidation()
{

/*if(document.DOCProcess.UserComments.value ==""){
	document.DOCProcess.UserComments.focus();
	alert("The Comments are compulsory");
	
	return false;   
 }*/
   if(document.DOCProcess.DropDownList1.selectedIndex == 0){
   document.DOCProcess.DropDownList1.focus();
	alert("Select an item from Disposition drop down list");
	
	return false;   
   }
   
return true;
}


function RangeCheckWithMsg(var1,obj1)
   {
  
   if(var1 >0)
   {
  		//document.frm_WC2.obj1.value= Math.round(var1*Math.pow(10,3))/Math.pow(10,3);
  	   return true;
      }
      else
      {
      var3=obj1 + " must have the value equal or greater than 1.2";
      alert(var3);
      return false;
      }
   }
   
      
 function WMCIAChecked()
 {
 alert("WMCIA");
 if (document.frm_PCDT.OPTIN_Carrier.checked==true)
 {
		//document.frm_PCDT.OPTIN_Carrier.checked=false;  

		document.frm_PCDT.Check_Amount.disabled =true;
		document.frm_PCDT.Check.disabled =true;			
	}
	
		
 }
  function WMCIAChecked1()
 {
 //alert("WMCIA1");
 //alert(document.frm_PCDT.OPTIN_Carrier.checked);
 //alert(document.frm_PCDT.OPTIN_MWCIA.checked);
 
//added by -------- -------- start
if (document.frm_PCDT.Company_TrackingNo.value != "")
//added by -------- ------- end
{
 if (document.frm_PCDT.OPTIN_Carrier.checked==false)
 {
		//alert("in");
		document.frm_PCDT.Check_Amount.disabled =true;
		document.frm_PCDT.Check.disabled =true;	
		document.frm_PCDT.OPTIN_MWCIA.checked=true;
		document.frm_PCDT.OPTIN_Carrier.checked=false;			
		document.frm_PCDT.Check.value ="";
		document.frm_PCDT.Check_Amount.value="";

	}
	else
	{
	//alert("out");
		document.frm_PCDT.Check_Amount.disabled =false;
		document.frm_PCDT.Check.disabled =false;			
		document.frm_PCDT.OPTIN_MWCIA.checked=true;
		document.frm_PCDT.OPTIN_Carrier.checked=true;			

	}
//added by -------- ------- start
}		
//added by ------- ------- end
 }
 
 function DelVer()
 {
	if(confirm("This action will delete the filing?\nClick OK to delete or Cancel to return to the application."))
	{
	}
	else
	{
		return false;
	}
 }
 
 function CARRIERChecked()
 {
  document.frm_PCDT.OPTIN_MWCIA.checked=false;
  document.frm_PCDT.Check_Amount.disabled =false;
	document.frm_PCDT.Check.disabled =false;		
    
 }
 
 

 //08-12-2004
 function WC7_Submit()
 {
 	if (document.WC7.r1c1.value=="" )
	{
		alert("Please fill the required fields of DOC-WC-2.");
		return false;
	}		

 //WC7 Validateion
	if (wc7_validation()==false)
	{
		return false;
	}
 //WC1 Validation
	if(!WC1Submit())
		{
			return false;
		}
 //WC6 Validation
	if(!WC6Submit())
		{
			return false;
		}
 
 //WC2 Validation
	if(!WC2Submit())
	{
		return false;
	}
	
	
	if (roundnum3(document.WC7.EffPremium.value)!=roundnum3(document.WC7.WC1_avmul.value))
	{
		alert("DOC-WC-7 Average Effective Multiplier should match with DOC-WC-1 Average Effective Multiplier.");
		return false;
	}
	return true;
 }
function WC1Submit()
{
// commented out by MK to allow negative numbers for the overall effect of rate change. 
// 	if (document.WC7.WC1_oeff_Rate.value=="" || document.WC7.WC1_oeff_Rate.value > 10 || document.WC7.WC1_oeff_Rate.value <0 )
 	if (document.WC7.WC1_oeff_Rate.value=="")
	{
		alert("Please fill the required fields of DOC-WC-1 form.");
		return false;
	}


	if (document.WC7.WC1_ClassDev.value=="False")
	{
		if (document.WC7.WC1_mul.value=="" ||document.WC7.WC1_mul.value<1.3)
		{
			alert("Please fill the required fields of DOC-WC-1 form.");
			return false;
		}
		
			if (document.WC7.WC1_xconst.value!="" && document.WC7.WC1_xconst.value >= 10000000)
			{
				alert("Please fill the required fields of DOC-WC-1 form.");
				return false;
			}
	 
			if (document.WC7.WC1_lrginc.value!="" && document.WC7.WC1_lrginc.value >= 10000000)
			{
					alert("Please fill the required fields of DOC-WC-1 form.");
					return false;
			}
			if (document.WC7.WC1_smch.value!="" && document.WC7.WC1_smch.value >= 10000000)
			{
						alert("Please fill the required fields of DOC-WC-1 form.");

				return false;
			}
	}
	else
	{
			if (document.WC7.WC1_lmul.value=="" || document.WC7.WC1_lmul.value<1.3)
			{
				alert("Please fill the required fields of DOC-WC-1 form.");
				return false;
			}

			if (document.WC7.WC1_hmul.value=="" || document.WC7.WC1_hmul.value<1.3)
			{
				alert("Please fill the required fields of DOC-WC-1 form.");
				return false;
			}
			
			if (document.WC7.WC1_avmul.value=="" || document.WC7.WC1_avmul.value<1.3)
			{
				alert("Please fill the required fields of DOC-WC-1 form.");
				return false;
			}

			
			if (document.WC7.WC1_exconst.value!="" && document.WC7.WC1_exconst.value >= 10000000)
			{
				alert("Please fill the required fields of DOC-WC-1 form.");
				return false;
			}
	 
			if (document.WC7.WC1_DEVLARINS.value!="" && document.WC7.WC1_DEVLARINS.value >= 10000000)
			{
				alert("Please fill the required fields of DOC-WC-1 form.");
				return false;
			}
			if (document.WC7.WC1_DEVSMLINS.value!="" && document.WC7.WC1_DEVSMLINS.value >= 10000000)
			{
				alert("Please fill the required fields of DOC-WC-1 form.");
				return false;
			}
		}
 
return true;
}
function WC6Submit()
{
	var warning_flag=false;
	
		if (IsNumber(document.WC7.WC6_Mfact.value)==false||IsNumber(document.WC7.WC6_UDfact.value)==false||
			IsNumber(document.WC7.WC6_Tfact.value)==false||IsNumber(document.WC7.WC6_LAE.value)==false||
			IsNumber(document.WC7.WC6_Comb.value)==false||IsNumber(document.WC7.WC6_OA.value)==false||
			IsNumber(document.WC7.WC6_GE.value)==false||IsNumber(document.WC7.WC6_PTax.value)==false||
			IsNumber(document.WC7.WC6_OTax.value)==false||IsNumber(document.WC7.WC6_PROF.value)==false||
			IsNumber(document.WC7.WC6_CII.value)==false||IsNumber(document.WC7.WC6_SLCMul.value)==false)

		{				
			alert("Please fill the required fileds of DOC-WC-6 form.");
			return false;
		}
		
		
		if (document.WC7.WC6_Mfact.value=="" || (document.WC7.WC6_Mfact.value<0.5 || document.WC7.WC6_Mfact.value>2))
		{
			alert("Please fill the required fileds of DOC-WC-6 form.");
			return false;
		}		

		if (document.WC7.WC6_UDfact.value=="" || (document.WC7.WC6_UDfact.value<1 || document.WC7.WC6_UDfact.value>1.5))
		{
			alert("Please fill the required fileds of DOC-WC-6 form.");
			return false;
		}		
		if (document.WC7.WC6_Tfact.value=="" || (document.WC7.WC6_Tfact.value<1 || document.WC7.WC6_Tfact.value>1.5))
		{
			alert("Please fill the required fileds of DOC-WC-6 form.");
			return false;
		}
		
		if (document.WC7.WC6_LAE.value=="" || document.WC7.WC6_LAE.value>=10000000)
		{
			alert("Please fill the required fileds of DOC-WC-6 form.");
			return false;
		}				
		
		if (document.WC7.WC6_Comb.value=="" || document.WC7.WC6_Comb.value>=10000000)
		{
			alert("Please fill the required fileds of DOC-WC-6 form.");
			return false;
		}				
		if (document.WC7.WC6_OA.value=="" || document.WC7.WC6_OA.value>=10000000)
		{
			alert("Please fill the required fileds of DOC-WC-6 form.");
			return false;
		}				
		if (document.WC7.WC6_GE.value=="" || document.WC7.WC6_GE.value>=10000000)
		{
			alert("Please fill the required fileds of DOC-WC-6 form.");
			return false;
		}				

		if (document.WC7.WC6_PTax.value=="" || (document.WC7.WC6_PTax.value>2.5))
		{
			alert("Please fill the required fileds of DOC-WC-6 form.");
			return false;
		}
		if (document.WC7.WC6_OTax.value=="" || document.WC7.WC6_OTax.value>=10000000)
		{
			alert("Please fill the required fileds of DOC-WC-6 form.");
			return false;
		}				
		if (document.WC7.WC6_PROF.value=="" || document.WC7.WC6_PROF.value>=10000000)
		{
			alert("Please fill the required fileds of DOC-WC-6 form.");
			return false;
		}				
		if (document.WC7.WC6_CII.value=="" || document.WC7.WC6_CII.value>=10000000)
		{
			alert("Please fill the required fileds of DOC-WC-6 form.");
			return false;
		}				
		if (document.WC7.WC6_FLCMul.value=="" || document.WC7.WC6_FLCMul.value<1.3 || document.WC7.WC6_FLCMul.value>2.7)
		{
			alert("Please fill the required fileds of DOC-WC-6 form.");
			return false;
		}		
		if (document.WC7.WC6_SLCMul.value=="" ||document.WC7.WC6_SLCMul.value<1.3)
		{
			alert("Please fill the required fileds of DOC-WC-6 form.");
			return false;
		}		
	return true;

}
function WC2Submit()
{

	// row1
		if (document.WC7.WC2_r1c1.value=="" )
		{
			alert("Please fill the required fields of DOC-WC-2 form.");
			return false;
		}		
		else
		{
			if (document.WC7.WC2_r1c3.value=="" || document.WC7.WC2_r1c3.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r1c4.value=="" || document.WC7.WC2_r1c4.value<1.3)
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r1c5.value=="" || document.WC7.WC2_r1c5.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r1c6.value=="" || document.WC7.WC2_r1c6.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r1c7.value=="")// || document.WC7.WC2_r1c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
	    }

	// row2
		if (document.WC7.WC2_r2c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r2c3.value=="" || document.WC7.WC2_r2c3.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r2c4.value=="" || document.WC7.WC2_r2c4.value<1.3)
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r2c5.value=="" || document.WC7.WC2_r2c5.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r2c6.value=="" || document.WC7.WC2_r2c6.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
			if (document.WC7.WC2_r2c7.value=="")// || document.WC7.WC2_r2c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
	    }

	// row3
		if (document.WC7.WC2_r3c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r3c3.value=="" || document.WC7.WC2_r3c3.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r3c4.value=="" || document.WC7.WC2_r3c4.value<1.3)
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r3c5.value=="" || document.WC7.WC2_r3c5.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
			if (document.WC7.WC2_r3c6.value=="" || document.WC7.WC2_r3c6.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r3c7.value=="")// || document.WC7.WC2_r3c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
	    }

	// row4
		if (document.WC7.WC2_r4c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r4c3.value=="" || document.WC7.WC2_r4c3.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r4c4.value=="" || document.WC7.WC2_r4c4.value<1.3)
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r4c5.value=="" || document.WC7.WC2_r4c5.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
			if (document.WC7.WC2_r4c6.value=="" || document.WC7.WC2_r4c6.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r4c7.value=="")// || document.WC7.WC2_r4c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
	    }

	// row5
		if (document.WC7.WC2_r5c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r5c3.value=="" || document.WC7.WC2_r5c3.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r5c4.value=="" || document.WC7.WC2_r5c4.value<1.3 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r5c5.value=="" || document.WC7.WC2_r5c5.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r5c6.value=="" || document.WC7.WC2_r5c6.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r5c7.value=="")// || document.WC7.WC2_r5c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
	    }


	// row6
		if (document.WC7.WC2_r6c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r6c3.value=="" || document.WC7.WC2_r6c3.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
			if (document.WC7.WC2_r6c4.value=="" || document.WC7.WC2_r6c4.value<1.3)
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r6c5.value=="" || document.WC7.WC2_r6c5.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r6c6.value=="" || document.WC7.WC2_r6c6.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r6c7.value=="")// || document.WC7.WC2_r6c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
	    }

	// row7
		if (document.WC7.WC2_r7c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r7c3.value=="" || document.WC7.WC2_r7c3.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r7c4.value=="" || document.WC7.WC2_r7c4.value<1.3)
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r7c5.value=="" || document.WC7.WC2_r7c5.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r7c6.value=="" || document.WC7.WC2_r7c6.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r7c7.value=="")// || document.WC7.WC2_r7c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
	    }

	// row8
		if (document.WC7.WC2_r8c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r8c3.value=="" || document.WC7.WC2_r8c3.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
			if (document.WC7.WC2_r8c4.value=="" || document.WC7.WC2_r8c4.value<1.3)
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r8c5.value=="" || document.WC7.WC2_r8c5.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r8c6.value=="" || document.WC7.WC2_r8c6.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
			if (document.WC7.WC2_r8c7.value=="")// || document.WC7.WC2_r8c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
	    }

	// row9
		if (document.WC7.WC2_r9c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r9c3.value=="" || document.WC7.WC2_r9c3.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
			if (document.WC7.WC2_r9c4.value=="" || document.WC7.WC2_r9c4.value<1.3)
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
			if (document.WC7.WC2_r9c5.value=="" || document.WC7.WC2_r9c5.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r9c6.value=="" || document.WC7.WC2_r9c6.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r9c7.value=="")// || document.WC7.WC2_r9c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
	    }

	// row10
		if (document.WC7.WC2_r10c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r10c3.value=="" || document.WC7.WC2_r10c3.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
			if (document.WC7.WC2_r10c4.value=="" || document.WC7.WC2_r10c4.value<1.3)
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		

			if (document.WC7.WC2_r10c5.value=="" || document.WC7.WC2_r10c5.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
			if (document.WC7.WC2_r10c6.value=="" || document.WC7.WC2_r10c6.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
			if (document.WC7.WC2_r10c7.value=="")// || document.WC7.WC2_r10c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				return false;
			}		
	    }

	// row11
		if (document.WC7.WC2_r11c1 == null || document.WC7.WC2_r11c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r11c3.value=="" || document.WC7.WC2_r11c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r11c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r11c4.value=="" || document.WC7.WC2_r11c4.value<1.3)
			// ||  document.WC7.WC2_r11c4.value>2.7)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r11c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r11c5.value=="" || document.WC7.WC2_r11c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r11c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r11c6.value=="" || document.WC7.WC2_r11c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r11c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r11c7.value=="")// || document.WC7.WC2_r11c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r11c7.focus();
				return false;
			}		
	    }
	// row12
		if (document.WC7.WC2_r12c1 == null || document.WC7.WC2_r12c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r12c3.value=="" || document.WC7.WC2_r12c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r12c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r12c4.value=="" || document.WC7.WC2_r12c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r12c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r12c5.value=="" || document.WC7.WC2_r12c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r12c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r12c6.value=="" || document.WC7.WC2_r12c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r12c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r12c7.value=="")// || document.WC7.WC2_r12c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r12c7.focus();
				return false;
			}		
	    }
	// row13
		if (document.WC7.WC2_r13c1 == null || document.WC7.WC2_r13c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r13c3.value=="" || document.WC7.WC2_r13c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r13c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r13c4.value=="" || document.WC7.WC2_r13c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r13c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r13c5.value=="" || document.WC7.WC2_r13c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r13c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r13c6.value=="" || document.WC7.WC2_r13c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r13c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r13c7.value=="")// || document.WC7.WC2_r13c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r13c7.focus();
				return false;
			}		
	    }
	// row14
		if (document.WC7.WC2_r14c1 == null || document.WC7.WC2_r14c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r14c3.value=="" || document.WC7.WC2_r14c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r14c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r14c4.value=="" || document.WC7.WC2_r14c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r14c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r14c5.value=="" || document.WC7.WC2_r14c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r14c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r14c6.value=="" || document.WC7.WC2_r14c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r14c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r14c7.value=="")// || document.WC7.WC2_r14c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r14c7.focus();
				return false;
			}		
	    }
	// row15
		if (document.WC7.WC2_r15c1 == null || document.WC7.WC2_r15c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r15c3.value=="" || document.WC7.WC2_r15c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r15c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r15c4.value=="" || document.WC7.WC2_r15c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r15c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r15c5.value=="" || document.WC7.WC2_r15c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r15c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r15c6.value=="" || document.WC7.WC2_r15c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r15c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r15c7.value=="")// || document.WC7.WC2_r15c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r15c7.focus();
				return false;
			}		
	    }
	// row16
		if (document.WC7.WC2_r16c1 == null || document.WC7.WC2_r16c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r16c3.value=="" || document.WC7.WC2_r16c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r16c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r16c4.value=="" || document.WC7.WC2_r16c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r16c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r16c5.value=="" || document.WC7.WC2_r16c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r16c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r16c6.value=="" || document.WC7.WC2_r16c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r16c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r16c7.value=="")// || document.WC7.WC2_r16c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r16c7.focus();
				return false;
			}		
	    }
	// row17
		if (document.WC7.WC2_r17c1 == null || document.WC7.WC2_r17c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r17c3.value=="" || document.WC7.WC2_r17c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r17c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r17c4.value=="" || document.WC7.WC2_r17c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r17c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r17c5.value=="" || document.WC7.WC2_r17c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r17c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r17c6.value=="" || document.WC7.WC2_r17c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r17c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r17c7.value=="")// || document.WC7.WC2_r17c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r17c7.focus();
				return false;
			}		
	    }
	// row18
		if (document.WC7.WC2_r18c1 == null || document.WC7.WC2_r18c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r18c3.value=="" || document.WC7.WC2_r18c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r18c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r18c4.value=="" || document.WC7.WC2_r18c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r18c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r18c5.value=="" || document.WC7.WC2_r18c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r18c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r18c6.value=="" || document.WC7.WC2_r18c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r18c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r18c7.value=="")// || document.WC7.WC2_r18c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r18c7.focus();
				return false;
			}		
	    }
	// row19
		if (document.WC7.WC2_r19c1 == null || document.WC7.WC2_r19c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r19c3.value=="" || document.WC7.WC2_r19c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r19c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r19c4.value=="" || document.WC7.WC2_r19c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r19c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r19c5.value=="" || document.WC7.WC2_r19c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r19c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r19c6.value=="" || document.WC7.WC2_r19c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r19c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r19c7.value=="")// || document.WC7.WC2_r19c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r19c7.focus();
				return false;
			}		
	    }
	// row20
		if (document.WC7.WC2_r20c1 == null || document.WC7.WC2_r20c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r20c3.value=="" || document.WC7.WC2_r20c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r20c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r20c4.value=="" || document.WC7.WC2_r20c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r20c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r20c5.value=="" || document.WC7.WC2_r20c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r20c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r20c6.value=="" || document.WC7.WC2_r20c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r20c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r20c7.value=="")// || document.WC7.WC2_r20c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r20c7.focus();
				return false;
			}		
	    }
	// row21
		if (document.WC7.WC2_r21c1 == null || document.WC7.WC2_r21c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r21c3.value=="" || document.WC7.WC2_r21c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r21c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r21c4.value=="" || document.WC7.WC2_r21c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r21c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r21c5.value=="" || document.WC7.WC2_r21c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r21c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r21c6.value=="" || document.WC7.WC2_r21c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r21c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r21c7.value=="")// || document.WC7.WC2_r21c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r21c7.focus();
				return false;
			}		
	    }
	// row22
		if (document.WC7.WC2_r22c1 == null || document.WC7.WC2_r22c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r22c3.value=="" || document.WC7.WC2_r22c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r22c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r22c4.value=="" || document.WC7.WC2_r22c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r22c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r22c5.value=="" || document.WC7.WC2_r22c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r22c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r22c6.value=="" || document.WC7.WC2_r22c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r22c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r22c7.value=="")// || document.WC7.WC2_r22c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r22c7.focus();
				return false;
			}		
	    }
	// row23
		if (document.WC7.WC2_r23c1 == null || document.WC7.WC2_r23c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r23c3.value=="" || document.WC7.WC2_r23c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r23c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r23c4.value=="" || document.WC7.WC2_r23c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r23c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r23c5.value=="" || document.WC7.WC2_r23c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r23c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r23c6.value=="" || document.WC7.WC2_r23c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r23c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r23c7.value=="")// || document.WC7.WC2_r23c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r23c7.focus();
				return false;
			}		
	    }
	// row24
		if (document.WC7.WC2_r24c1 == null || document.WC7.WC2_r24c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r24c3.value=="" || document.WC7.WC2_r24c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r24c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r24c4.value=="" || document.WC7.WC2_r24c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r24c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r24c5.value=="" || document.WC7.WC2_r24c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r24c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r24c6.value=="" || document.WC7.WC2_r24c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r24c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r24c7.value=="")// || document.WC7.WC2_r24c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r24c7.focus();
				return false;
			}		
	    }
	// row25
		if (document.WC7.WC2_r25c1 == null || document.WC7.WC2_r25c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r25c3.value=="" || document.WC7.WC2_r25c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r25c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r25c4.value=="" || document.WC7.WC2_r25c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r25c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r25c5.value=="" || document.WC7.WC2_r25c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r25c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r25c6.value=="" || document.WC7.WC2_r25c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r25c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r25c7.value=="")// || document.WC7.WC2_r25c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r25c7.focus();
				return false;
			}		
	    }
	// row26
		if (document.WC7.WC2_r26c1 == null || document.WC7.WC2_r26c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r26c3.value=="" || document.WC7.WC2_r26c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r26c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r26c4.value=="" || document.WC7.WC2_r26c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r26c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r26c5.value=="" || document.WC7.WC2_r26c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r26c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r26c6.value=="" || document.WC7.WC2_r26c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r26c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r26c7.value=="")// || document.WC7.WC2_r26c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r26c7.focus();
				return false;
			}		
	    }
	// row27
		if (document.WC7.WC2_r27c1 == null || document.WC7.WC2_r27c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r27c3.value=="" || document.WC7.WC2_r27c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r27c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r27c4.value=="" || document.WC7.WC2_r27c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r27c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r27c5.value=="" || document.WC7.WC2_r27c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r27c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r27c6.value=="" || document.WC7.WC2_r27c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r27c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r27c7.value=="")// || document.WC7.WC2_r27c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r27c7.focus();
				return false;
			}		
	    }
	// row28
		if (document.WC7.WC2_r28c1 == null || document.WC7.WC2_r28c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r28c3.value=="" || document.WC7.WC2_r28c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r28c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r28c4.value=="" || document.WC7.WC2_r28c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r28c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r28c5.value=="" || document.WC7.WC2_r28c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r28c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r28c6.value=="" || document.WC7.WC2_r28c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r28c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r28c7.value=="")// || document.WC7.WC2_r28c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r28c7.focus();
				return false;
			}		
	    }
	// row29
		if (document.WC7.WC2_r29c1 == null || document.WC7.WC2_r29c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r29c3.value=="" || document.WC7.WC2_r29c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r29c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r29c4.value=="" || document.WC7.WC2_r29c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r29c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r29c5.value=="" || document.WC7.WC2_r29c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r29c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r29c6.value=="" || document.WC7.WC2_r29c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r29c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r29c7.value=="")// || document.WC7.WC2_r29c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r29c7.focus();
				return false;
			}		
	    }
	// row30
		if (document.WC7.WC2_r30c1 == null || document.WC7.WC2_r30c1.value=="" )
		{
		}		
		else
		{
			if (document.WC7.WC2_r30c3.value=="" || document.WC7.WC2_r30c3.value>=10000000 )
			{
				alert("Current rate should be less than 10,000,000");
				document.WC7.WC2_r30c3.focus();
				return false;
			}		
			if (document.WC7.WC2_r30c4.value=="" || document.WC7.WC2_r30c4.value<1.3)
			{
				alert("Proposed Pure Premium Multiplier should be greater than or equal to 1.3");
				document.WC7.WC2_r30c4.focus();
				return false;
			}		

			if (document.WC7.WC2_r30c5.value=="" || document.WC7.WC2_r30c5.value>=10000000 )
			{
				alert("New rate should be less than 10,000,000");
				document.WC7.WC2_r30c5.focus();
				return false;
			}		
			if (document.WC7.WC2_r30c6.value=="" || document.WC7.WC2_r30c6.value>=10000000 )
			{
				alert("Percent Rate Change should be less than 10,000,000");
				document.WC7.WC2_r30c6.focus();
				return false;
			}		
			if (document.WC7.WC2_r30c7.value=="")// || document.WC7.WC2_r30c7.value>=10000000 )
			{
				alert("Please fill the required fields of DOC-WC-2 form.");
				document.WC7.WC2_r30c7.focus();
				return false;
			}		
	    }
return true;
}

function wc6_submit()
{

	calculateA5();
	calculateB10();
	calculateB13();
	calculateB14();
	calculateC();

	if(!wc6_validation())
	
	{
		return false;	
	}
//	if (document.frm_WC6.WC1_oeff_Rate.value=="" || document.frm_WC6.WC1_oeff_Rate.value > 10 || document.frm_WC6.WC1_oeff_Rate.value <0 )
	if (document.frm_WC6.WC1_oeff_Rate.value=="")
	{
		alert("Please fill the required fields of DOC-WC-1 form.");
		return false;
	}

	if (document.frm_WC6.WC1_ClassDev.value=="False")
	{
		if (document.frm_WC6.WC1_mul.value=="" ||document.frm_WC6.WC1_mul.value<1.3)
		{
			alert("Please fill the required fields of DOC-WC-1 form.");
			return false;
		}
		
			if (document.frm_WC6.WC1_xconst.value!="" && document.frm_WC6.WC1_xconst.value >= 10000000)
			{
				alert("Please fill the required fields of DOC-WC-1 form.");
				return false;
			}
	 
			if (document.frm_WC6.WC1_lrginc.value!="" && document.frm_WC6.WC1_lrginc.value >= 10000000)
			{
					alert("Please fill the required fields of DOC-WC-1 form.");
					return false;
			}
			if (document.frm_WC6.WC1_smch.value!="" && document.frm_WC6.WC1_smch.value >= 10000000)
			{
						alert("Please fill the required fields of DOC-WC-1 form.");

				return false;
			}
	}
	else
	{
			if (document.frm_WC6.WC1_lmul.value=="" || document.frm_WC6.WC1_lmul.value<1.3)
			{
				alert("Please fill the required fields of DOC-WC-1 form.");
				return false;
			}

			if (document.frm_WC6.WC1_hmul.value=="" || document.frm_WC6.WC1_hmul.value<1.3)
			{
				alert("Please fill the required fields of DOC-WC-1 form.");
				return false;
			}

			if (document.frm_WC6.WC1_avmul.value=="" || document.frm_WC6.WC1_avmul.value<1.3)
			{
				alert("Please fill the required fields of DOC-WC-1 form.");
				return false;
			}

			
			if (document.frm_WC6.WC1_exconst.value!="" && document.frm_WC6.WC1_exconst.value >= 10000000)
			{
				alert("Please fill the required fields of DOC-WC-1 form.");
				return false;
			}
	 
			if (document.frm_WC6.WC1_DEVLARINS.value!="" && document.frm_WC6.WC1_DEVLARINS.value >= 10000000)
			{
				alert("Please fill the required fields of DOC-WC-1 form.");
				return false;
			}
			if (document.frm_WC6.WC1_DEVSMLINS.value!="" && document.frm_WC6.WC1_DEVSMLINS.value >= 10000000)
			{
				alert("Please fill the required fields of DOC-WC-1 form.");
				return false;
			}
			
	}
	if (document.frm_WC6.SLCMul.value!=document.frm_WC6.WC1_mul.value)
	{
		alert("DOC-WC-6 Loss Cost Multiplier must match with DOC-WC-1 No Deviation Multiplier.");
		return false;
	}
	return true;
}
///// Compate dates
function padout(number) { return (number < 10) ? '0' + number : number; }

function y2k(number) { return (number < 1000) ? number + 1900 : number; }

function validate(std,end) 
{
/*    var startday = what.startday.options[what.startday.selectedIndex].value;
    var startmonth = what.startmonth.options[what.startmonth.selectedIndex].value;
    var startyear = what.startyear.options[what.startyear.selectedIndex].text;
    var endday = what.endday.options[what.endday.selectedIndex].value;
    var endmonth = what.endmonth.options[what.endmonth.selectedIndex].value;
    var endyear = what.endyear.options[what.endyear.selectedIndex].text;*/

    //unvalidstartdate = startday + '/' + startmonth + '/' + startyear;
    //unvalidenddate = endday + '/' + endmonth + '/' + endyear;

    var startdate = new Date(std);
    var enddate = new Date(end);

    var validstartdate = padout(startdate.getDate()) + '/' + padout(startdate.getMonth()+1) + '/' + y2k(startdate.getYear())
    var validenddate = padout(enddate.getDate()) + '/' + padout(enddate.getMonth()+1) + '/' + y2k(enddate.getYear())
    
    /*if (unvalidstartdate != validstartdate) {
        alert('Start Date: ' + what.startday.options[what.startday.selectedIndex].text +
                         ' ' + what.startmonth.options[what.startmonth.selectedIndex].text +
                         ' ' + what.startyear.options[what.startyear.selectedIndex].text + ' is invalid');
        return false;
    }*/

    /*if (unvalidenddate != validenddate) {
        alert('End Date: ' + what.endday.options[what.endday.selectedIndex].text +
                       ' ' + what.endmonth.options[what.endmonth.selectedIndex].text +
                       ' ' + what.endyear.options[what.endyear.selectedIndex].text + ' is invalid');
        return false;
    }*/

    starttime = Date.UTC(y2k(startdate.getYear()),startdate.getMonth(),startdate.getDate(),0,0,0);
    endtime = Date.UTC(y2k(enddate.getYear()),enddate.getMonth(),enddate.getDate(),0,0,0);
    
    if (starttime < endtime) {
        return true;
    }
    else 
    {
     //   alert('Start Date is not less than End Date');
        return false
    }
    
/*    currentdate = new Date();
    currenttime = Date.UTC(y2k(currentdate.getYear()),currentdate.getMonth(),currentdate.getDate(),0,0,0);
    
    if (endtime < currenttime) {
        // valid
    }
    else {
        alert('End Date is not less than todays date');
        return false;
    }
    
    what.startdate.value = validstartdate;
    what.enddate.value = validenddate;*/
    return true;
}
///End compare dates
   function PCTD1_validation()
   
   {   
      
  if(document.frm_PCDT.Company_TrackingNo.value ==""){
	alert("Please enter the Company Tracking#");
	document.frm_PCDT.Company_TrackingNo.focus();
	return false;   
   }
   if(document.frm_PCDT.Conatct_Title.value ==""){
	alert("Please enter the Title.");
	document.frm_PCDT.Conatct_Title.focus();
	return false;   
   }
   /*
   if(document.frm_PCDT.company_name.value ==""){
	alert("Please enter the Company Name");
	document.frm_PCDT.company_name.focus();
	return false;   
   }
   
   if(document.frm_PCDT.NAIC.value ==""){
	alert("Please enter the NAIC#");
	document.frm_PCDT.NAIC.focus();
	return false;   
   }*/
   
   
   if(document.frm_PCDT.Filer_Name.value ==""){
	alert("Please enter the Name of authorized Filer  ");
	document.frm_PCDT.Filer_Name.focus();
	return false;   
   } 
   
   if(document.frm_PCDT.Insurnce_Type.value ==""){
	alert("Please enter Type of Insurance(TOI)");
	document.frm_PCDT.Insurnce_Type.focus();
	return false;   
   } 
   
   if (document.frm_PCDT.Insurnce_SubType1.value == ""){
	alert("Please select Sub-Type of Insurance(Sub-TOI)");
	document.frm_PCDT.Insurnce_SubType1.focus();
	return false;   
   } 
    /*if(document.frm_PCDT.Insurnce_SubType.value ==""){
	alert("Please enter the Sub Type of Insurance");
	document.frm_PCDT.Insurnce_SubType.focus();
	return false;   
	}*/
	  

var flag=0;  
if(document.frm_PCDT.RL_Cost.checked)
{
flag=1;
}
if(document.frm_PCDT.Rules.checked)
{
flag=1;
}

if(document.frm_PCDT.Ra_Rl.checked)
{
flag=1;
}
if(document.frm_PCDT.Ra_Rl_Forms.checked)
{
flag=1;
}
if(document.frm_PCDT.Combination.checked)
{
flag=1;
}


if(document.frm_PCDT.Forms.checked)

{
flag=1;
}
if(document.frm_PCDT.Withdrawal.checked)
{
flag=1;
}
if(flag==0)
	{
	alert("Please Select Filing Type");
	document.frm_PCDT.RL_Cost.focus();
	return false;   
	}
	
		
	/*if(document.frm_PCDT.Eff_Date_New.value ==""){
	alert("Please enter a New Effective Date");
	document.frm_PCDT.Eff_Date_New.focus();
	return false;   
	}  
	
	 if(document.frm_PCDT.Eff_Date_Renewal.value ==""){
	alert("Please enter an Effactive Date for Renewal");
	document.frm_PCDT.Eff_Date_Renewal.focus();
	return false;   
	}*/

	if (document.frm_PCDT.Eff_Date_New.value=="")
		{
	/*		alert("Please Enter the New Effective Date");
			document.frm_PCDT.Eff_Date_New.focus();
			return false;  			*/
		}
		else
		{
			if (isDate(document.frm_PCDT.Eff_Date_New.value)==false)
			{ 	
			alert("Please Enter the Valid New Effective Date");
			document.frm_PCDT.Eff_Date_New.focus();
			return false;
			}
			else
			{
			/*	//----- checking for 60 days period	
				var given_date=document.frm_PCDT.Eff_Date_New.value;
				var pos1=given_date.indexOf(dtCh);
				var pos2=given_date.indexOf(dtCh,pos1+1);
				var strMonth=given_date.substring(0,pos1);
				var strDay=given_date.substring(pos1+1,pos2)
				var strYear=given_date.substring(pos2+1);
				var num=2;
				if (DaysDifferenc(strYear,strMonth,strDay,num)==false)
				{
				//alert("Proposed Effective Date should be a minimum of 60 days from today's date");				
					document.frm_PCDT.Eff_Date_New.focus();
					return false;
				}*/
			}			
		}
				
		if (document.frm_PCDT.Filling_Date.value=="")
		{
			alert("Please Enter the New Filing Date");
			document.frm_PCDT.Filling_Date.focus();
			return false;
			//document.frm_PCDT.Filling_Date.focus();
			
		}
		else
		{
			if (isDate(document.frm_PCDT.Filling_Date.value)==false)
			{ 	
			 alert("Please Enter the valid New Filing Date");
			document.frm_PCDT.Filling_Date.focus();
			return false;
		     //document.frm_PCDT.Filling_Date.focus();
			}
			else
			{
				//----- checking for 60 days period	
				var given_date=document.frm_PCDT.Filling_Date.value;
				var pos1=given_date.indexOf(dtCh);
				var pos2=given_date.indexOf(dtCh,pos1+1);
				var strMonth=given_date.substring(0,pos1);
				var strDay=given_date.substring(pos1+1,pos2)
				var strYear=given_date.substring(pos2+1);
				if (OneDaysDifferenc(strYear,strMonth,strDay)==false)
				{
					document.frm_PCDT.Filling_Date.focus();
					return false;
				}
			}			
		}
if(document.frm_PCDT.OPTIN_Carrier.checked==false && document.frm_PCDT.OPTIN_MWCIA.checked==false)
{
		alert("Please select a payment method (OPT IN).");
		document.frm_PCDT.OPTIN_MWCIA.focus();
		return false;

}


		if(document.frm_PCDT.OPTIN_Carrier.checked)
		{		
			
			if(document.frm_PCDT.Check.value=="")
				{
					alert("Please enter the Check Number.");
					document.frm_PCDT.Check.focus();
					return false;
				}
			
			if(document.frm_PCDT.Check_Amount.value=="")
				{
				alert("Please enter the Check Amount.");
				document.frm_PCDT.Check_Amount.focus();
				return false;
				}
				else if(document.frm_PCDT.Check_Amount.value<=0)
				
				{
				alert("Please enter the valid Amount.");
				document.frm_PCDT.Check_Amount.focus();
				return false;				
				}
		return true;
		}	
				
		
	return true;	
   }
   
  
   /*
   function r1c5col()
   {
	   document.WC7.r1c5.value = Math.round(document.WC7.r1c5.value*Math.pow(10,2))/Math.pow(10,2);
	   document.WC7.r1c6.value = Math.round(document.WC7.r1c6.value*Math.pow(10,2))/Math.pow(10,2);
   }
   function r2c5col()
   {
	   document.WC7.r2c5.value = Math.round(document.WC7.r2c5.value*Math.pow(10,2))/Math.pow(10,2);
	   document.WC7.r2c6.value = Math.round(document.WC7.r2c6.value*Math.pow(10,2))/Math.pow(10,2);
   }
   function r3c5col()
   {
	   document.WC7.r3c5.value = Math.round(document.WC7.r3c5.value*Math.pow(10,2))/Math.pow(10,2);
	   document.WC7.r3c6.value = Math.round(document.WC7.r3c6.value*Math.pow(10,2))/Math.pow(10,2);
   }
   function r4c5col()
   {
	   document.WC7.r4c5.value = Math.round(document.WC7.r4c5.value*Math.pow(10,2))/Math.pow(10,2);
	   document.WC7.r4c6.value = Math.round(document.WC7.r4c6.value*Math.pow(10,2))/Math.pow(10,2);
   }
   function r5c5col()
   {
	   document.WC7.r5c5.value = Math.round(document.WC7.r5c5.value*Math.pow(10,2))/Math.pow(10,2);
	   document.WC7.r5c6.value = Math.round(document.WC7.r5c6.value*Math.pow(10,2))/Math.pow(10,2);
   }
   function r6c5col()
   {
	   document.WC7.r6c5.value = Math.round(document.WC7.r6c5.value*Math.pow(10,2))/Math.pow(10,2);
	   document.WC7.r6c6.value = Math.round(document.WC7.r6c6.value*Math.pow(10,2))/Math.pow(10,2);
   }
   function r7c5col()
   {
	   document.WC7.r7c5.value = Math.round(document.WC7.r7c5.value*Math.pow(10,2))/Math.pow(10,2);
	   document.WC7.r7c6.value = Math.round(document.WC7.r7c6.value*Math.pow(10,2))/Math.pow(10,2);
   }

   function r9c5col()
   {
	   document.WC7.r9c5.value = Math.round(document.WC7.r9c5.value*Math.pow(10,2))/Math.pow(10,2);
	   document.WC7.r9c6.value = Math.round(document.WC7.r9c6.value*Math.pow(10,2))/Math.pow(10,2);
   }
   function r10c5col()
   {
	   document.WC7.r10c5.value = Math.round(document.WC7.r10c5.value*Math.pow(10,2))/Math.pow(10,2);
	   document.WC7.r10c6.value = Math.round(document.WC7.r10c6.value*Math.pow(10,2))/Math.pow(10,2);
   }
   function r11c5col()
   {
	   document.WC7.r11c5.value = Math.round(document.WC7.r11c5.value*Math.pow(10,2))/Math.pow(10,2);
	   document.WC7.r11c6.value = Math.round(document.WC7.r11c6.value*Math.pow(10,2))/Math.pow(10,2);
   }
   function r12c5col()
   {
	   document.WC7.r12c5.value = Math.round(document.WC7.r12c5.value*Math.pow(10,2))/Math.pow(10,2);
	   document.WC7.r12c6.value = Math.round(document.WC7.r12c6.value*Math.pow(10,2))/Math.pow(10,2);
   }
   function r13c5col()
   {
	   document.WC7.r13c5.value = Math.round(document.WC7.r13c5.value*Math.pow(10,2))/Math.pow(10,2);
	   document.WC7.r13c6.value = Math.round(document.WC7.r13c6.value*Math.pow(10,2))/Math.pow(10,2);
   }
*/
