

 function addLoadEvent(func1,arg1,arg2) {
  var oldonload = window.onload;

    window.onload = function() {
      oldonload();
	 
	 if(func1!='Null'){
	  func1();
	 }
	  if(arg1!='Null')
		{
			 ShowOptions(arg1,null);
		}
	     ShowOptions(arg2,null);
  }
}

function addLoadEvent1(func){
    window.onload = function() {
	      func();

   }

}

function addLoadEvent2(func){
	var oldonload = window.onload;
    window.onload = function() {
		  oldonload();
	      func();

   }

}


 function popUp(URL) {

day = new Date();
id = day.getTime();
eval("page" + id + " = window.showModalDialog(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=1000,height=900,left = 300,top = 200');");
}
function popUpInvMgt(URL) {
day = new Date();
id = day.getTime();
URL= "jsp/inventorymanagement/" + URL;

eval("page" + id + " = window.showModalDialog(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=1000,height=900,left = 300,top = 200');");
}

function yes() {
		MMDiv.style.visibility='visible';
		MNDiv.style.visibility='hidden';
		}
		function no() {
		MMDiv.style.visibility='hidden';
		MNDiv.style.visibility='visible';
		}

function confirmMsg()
{


document.write('<html>')
document.write('<link REL="stylesheet" TYPE="text/css" href="stylesheet/stylesheet.css">');
document.write('<body bgcolor="#F4F5F2">');

document.write('<table width="100%" border="0">');

document.write('<tr VALIGN=MIDDLE>');
document.write('<td height="450px"><h1   align="center"> Data Submitted Successfully</h1></td>');
document.write('</tr>');
document.write('<tr>');
document.write('</tr>');
document.write('<tr>');
document.write('</tr>');
document.write('<tr>');
document.write('</tr>');


document.write('</table>');
document.write('</body>');
document.write('</html>')
}

var oDP = null;
var oDate = null;
function fnInit()
{
		
//	alert("Inside FnInit");
	oDate = new Date();
	oDP   = new frameDatePicker.DatePicker("divDatePicker",1753,2500,false,"MM/DD/YYYY");
		
}

function fnInit2()
{
						 
	oDate = new Date();
	oDP1   = new frameDatePicker1.DatePicker("divDatePicker1",1753,2500,false,"MM/DD/YYYY");
	oDP2   = new frameDatePicker2.DatePicker("divDatePicker2",1753,2500,false,"MM/DD/YYYY");
		
}



function fnInit_newss()
{
						 
	oDate = new Date();
	oDP_newss  = new frameDatePicker_newss.DatePicker("divDatePicker_newss",1753,2500,false,"MM/DD/YYYY");
		oDP_newss1  = new frameDatePicker_newss1.DatePicker("divDatePicker_newss1",1753,2500,false,"MM/DD/YYYY");
			oDP_newss2  = new frameDatePicker_newss2.DatePicker("divDatePicker_newss2",1753,2500,false,"MM/DD/YYYY");
				oDP_newss3  = new frameDatePicker_newss3.DatePicker("divDatePicker_newss3",1753,2500,false,"MM/DD/YYYY");
		
}

function table(){


document.write('<table width=400 align=center border=1>');


document.write('<tr>');
document.write('<th>Sim No.</th>');
document.write('<th>State</th>');
document.write('<th>Procure Date</th>');

document.write('<tr>');
document.write('<td align="center">123</td>');
document.write('<td align="center">Activated</td>');
document.write('<td align="center">13-Jan-2006</td>');

document.write('<tr>');
document.write('<td align="center">&nbsp;</td>');
document.write('<td align="center"><input type="button" value="Back" onclick="history.back()" class="inputbutton"</td>');
document.write('<td align="center">&nbsp;</td>');


document.write('</table>');

}



function createtable()
{
var x=document.getElementById('myTable').insertRow(0);
var a=x.insertCell(0);
var b=x.insertCell(1);
var c=x.insertCell(2);
a.innerHTML="<b>SIM No.</b>";
b.innerHTML="<b>State</b>";
c.innerHTML="<b>Procured Date</b>";


var Y=document.getElementById('myTable').insertRow(1);
var a=Y.insertCell(0);
var b=Y.insertCell(1);
var c=Y.insertCell(2);
a.innerHTML="123";
b.innerHTML="Activated";
c.innerHTML="12-Jan-2006";


}

function createsalesheettable()
{
var x=document.getElementById('myTable').insertRow(0);
var a=x.insertCell(0);
var b=x.insertCell(1);
var c=x.insertCell(2);
var d=x.insertCell(3);
a.innerHTML="<b>Salesheet No.</b>";
b.innerHTML="<b>SIM No</b>";
c.innerHTML="<b>Base Unit No</b>";
d.innerHTML="<b>Device No.</b>";

var Y=document.getElementById('myTable').insertRow(1);
var a=Y.insertCell(0);
var b=Y.insertCell(1);
var c=Y.insertCell(2);
var d=Y.insertCell(3);
a.innerHTML="123";
b.innerHTML="344";
c.innerHTML="DEF";
d.innerHTML="999AB";


}






  function showList() {
  sList = window.open("devicelist.html", "list", "width=250,height=410");
}

function remLink() {
  if (window.sList && window.sList.open && !window.sList.closed)
    window.sList.opener = null;
}


function pick(symbol) {
	document.write("enterthe function");
  if (window.opener && !window.opener.closed)
	{ 
    window.opener.document.stockForm.stockBox.value = symbol;
  document.write("exited the fun value saved");
	}
  window.close();
}



function sendValue(s){
var selvalue = s.options[s.selectedIndex].value;

window.opener.document.popupform.device1.value = selvalue;
window.close();
}



function sendtmValue(s)
{
var selvalue = s.options[s.selectedIndex].value;

window.opener.document.popupform.device2.value = selvalue;
window.close();



}



function sendunitValue(s)
{
var selvalue = s.options[s.selectedIndex].value;

window.opener.document.popupform.device3.value = selvalue;
window.close();



}



function sendsimValue(s)
{
var selvalue = s.options[s.selectedIndex].value;

window.opener.document.popupform.device4.value = selvalue;
window.close();



}

function activate(actv)
	{
	    var ac = actv;
		if(ac == 'yes') 
		{
			ActDiv.style.visibility='visible';
			DeactDiv.style.visibility='hidden';
		}
		else
		{
			 DeactDiv.style.visibility='visible';
			ActDiv.style.visibility='hidden';
		}
		
	}

function activate1(actv)
	{
	    var ac = actv;
		if(ac == 'yes') 
		{
			ActDiv.style.visibility='visible';
			
		}
		else
		{
			
			ActDiv.style.visibility='hidden';
		}
		
	}


function checkCheckBoxes(theForm) {

	
	if (theForm.chknote.checked == false ) 
	{
		alert ('Please choose the  checkbox!');
		return false;
	} else { 
		
		confirm();
		return true;
	}
}


function creditcarddetails(radioObj)

{
if (radioObj.checked) 
	

	{document.getElementById("divcreditcard").style.visibility='visible';
	
	document.getElementById("divothermode").style.visibility='hidden';
	document.getElementById("divcheque").style.visibility='hidden';
	
	}




}


function chequedetails(radioObj1)

{

	
if (radioObj1.checked) 
	

	{
		
		document.getElementById("divcheque").style.visibility='visible';
	
		document.getElementById("divothermode").style.visibility='hidden';
	document.getElementById("divcreditcard").style.visibility='hidden';
	
	}







}



function othermode(radioObj1)

{
	
if (radioObj1.checked) 
	

	{document.getElementById("divcheque").style.visibility='hidden';
	document.getElementById("divothermode").style.visibility='visible';
	document.getElementById("divcreditcard").style.visibility='hidden';
	
	}




}




function billaddr() 
	{
         // alert("hi");
	if(document.custsalesform.billingaddr.checked==true )
	  {
		  document.custsalesform.billingaddress1.disabled= false;
		  document.custsalesform.billingaddress2.disabled= false;
		  document.custsalesform.billingcity.disabled= false;
		  document.custsalesform.billingstates.disabled= false;
		  document.custsalesform.billingcountry.disabled= false;
		  document.custsalesform.billingzipcode.disabled= false;
		  document.custsalesform.billingShipdate.disabled= false;
      }
   if(document.custsalesform.billingaddr.checked==false )
	  {
		  document.custsalesform.billingaddress1.disabled= true;
		  document.custsalesform.billingaddress1.value= "";
		  document.custsalesform.billingaddress2.disabled= true;
		  document.custsalesform.billingaddress2.value= "";
		  document.custsalesform.billingcity.disabled= true;
		  document.custsalesform.billingcity.value= "";
		  document.custsalesform.billingstates.disabled= true;
		  document.custsalesform.billingstates.value= "";
		  document.custsalesform.billingcountry.disabled= true;
		  document.custsalesform.billingcountry.value= "";
		  document.custsalesform.billingzipcode.disabled= true;
		  document.custsalesform.billingzipcode.value= "";
		  document.custsalesform.billingShipdate.disabled= true;
		  document.custsalesform.billingShipdate.value= "";
      }
 
  
}


function creditcarddetailsfleet(radioObj1)
{


if (radioObj1.checked) 
	

		{/*document.getElementById("divcheque").style.visibility='hidden';
		document.getElementById("divothermode").style.visibility='hidden';
		document.getElementById("divcreditcard").style.visibility='hidden'; */


		document.getElementById("divfleetcreditcard").style.visibility='visible';
		document.getElementById("divothermodefleet").style.visibility='hidden';
			document.getElementById("divfleetcheque").style.visibility='hidden';
	}


}

function creditcarddetailsfleetTRAK(radioObj1)
{


if (radioObj1.checked) 
	

		{
		/*document.getElementById("divcheque").style.visibility='hidden';
		document.getElementById("divothermode").style.visibility='hidden';
		document.getElementById("divcreditcard").style.visibility='hidden';
		document.getElementById("divfleetcreditcard").style.visibility='hidden';
		document.getElementById("divothermodefleet").style.visibility='hidden';
		document.getElementById("divfleetcheque").style.visibility='hidden'; */

		document.getElementById("divchequefleetTRAK").style.visibility='hidden';
		document.getElementById("divothermodefleetTRAK").style.visibility='hidden';
		document.getElementById("divcreditcardfleetTRAK").style.visibility='visible';

	}


}

function creditcarddetailsMT200(radioObj1)
{

   
if (radioObj1.checked) 
	

		{
		/*document.getElementById("divcheque").style.visibility='hidden';
		document.getElementById("divothermode").style.visibility='hidden';
		document.getElementById("divcreditcard").style.visibility='hidden';
		document.getElementById("divfleetcreditcard").style.visibility='hidden';
		document.getElementById("divothermodefleet").style.visibility='hidden';
		document.getElementById("divfleetcheque").style.visibility='hidden';

		document.getElementById("divchequefleetTRAK").style.visibility='hidden';
		document.getElementById("divothermodefleetTRAK").style.visibility='hidden';
		document.getElementById("divcreditcardfleetTRAK").style.visibility='hidden'; */

		document.getElementById("divchequeMT200").style.visibility='hidden';
		document.getElementById("divothermodeMT200").style.visibility='hidden';
		document.getElementById("divcreditcardMT200").style.visibility='visible';


	}


}

function creditcarddetailsSlimTRAK(radioObj1)
{

   
if (radioObj1.checked) 
	

		{
		/*document.getElementById("divcheque").style.visibility='hidden';
		document.getElementById("divothermode").style.visibility='hidden';
		document.getElementById("divcreditcard").style.visibility='hidden';

		document.getElementById("divfleetcreditcard").style.visibility='hidden';
		document.getElementById("divothermodefleet").style.visibility='hidden';
		document.getElementById("divfleetcheque").style.visibility='hidden';

		document.getElementById("divchequefleetTRAK").style.visibility='hidden';
		document.getElementById("divothermodefleetTRAK").style.visibility='hidden';
		document.getElementById("divcreditcardfleetTRAK").style.visibility='hidden';

		document.getElementById("divchequeMT200").style.visibility='hidden';
		document.getElementById("divothermodeMT200").style.visibility='hidden';
		document.getElementById("divcreditcardMT200").style.visibility='hidden'; */

		
			document.getElementById("divchequeSlimTRAK").style.visibility='hidden';
		document.getElementById("divothermodeSlimTRAK").style.visibility='hidden';
		document.getElementById("divcreditcardSlimTRAK").style.visibility='visible';



	}


}


function chequedetailsfleet(radioObj1)
{


if (radioObj1.checked) 
	

		{
			/*document.getElementById("divcheque").style.visibility='hidden';
		document.getElementById("divothermode").style.visibility='hidden';
		document.getElementById("divcreditcard").style.visibility='hidden'; */

		document.getElementById("divfleetcreditcard").style.visibility='hidden';
		document.getElementById("divfleetcheque").style.visibility='visible';
		document.getElementById("divothermodefleet").style.visibility='hidden';
		
		
	}

}

function chequedetailsfleetTRAK(radioObj1)
{
  
if (radioObj1.checked) 
	

		{
			/*document.getElementById("divcheque").style.visibility='hidden';
		document.getElementById("divothermode").style.visibility='hidden';
		document.getElementById("divcreditcard").style.visibility='hidden';

		document.getElementById("divfleetcreditcard").style.visibility='hidden';
		document.getElementById("divfleetcheque").style.visibility='hidden';
		document.getElementById("divothermodefleet").style.visibility='hidden'; */

		document.getElementById("divchequefleetTRAK").style.visibility='visible';
		document.getElementById("divothermodefleetTRAK").style.visibility='hidden';
		document.getElementById("divcreditcardfleetTRAK").style.visibility='hidden';

		
		
	}

}

function chequedetailsMT200(radioObj1)
{
  
if (radioObj1.checked) 
	

		{
			/*document.getElementById("divcheque").style.visibility='hidden';
		document.getElementById("divothermode").style.visibility='hidden';
		document.getElementById("divcreditcard").style.visibility='hidden';

		document.getElementById("divfleetcreditcard").style.visibility='hidden';
		document.getElementById("divfleetcheque").style.visibility='hidden';
		document.getElementById("divothermodefleet").style.visibility='hidden';

		document.getElementById("divchequefleetTRAK").style.visibility='hidden';
		document.getElementById("divothermodefleetTRAK").style.visibility='hidden';
		document.getElementById("divcreditcardfleetTRAK").style.visibility='hidden'; */
		
		document.getElementById("divchequeMT200").style.visibility='visible';
		document.getElementById("divothermodeMT200").style.visibility='hidden';
		document.getElementById("divcreditcardMT200").style.visibility='hidden';

		
		
	}

}

function chequedetailsSlimTRAK(radioObj1)
{
  
if (radioObj1.checked) 
	

		{
			/*document.getElementById("divcheque").style.visibility='hidden';
		document.getElementById("divothermode").style.visibility='hidden';
		document.getElementById("divcreditcard").style.visibility='hidden';

		document.getElementById("divfleetcreditcard").style.visibility='hidden';
		document.getElementById("divfleetcheque").style.visibility='hidden';
		document.getElementById("divothermodefleet").style.visibility='hidden';

		document.getElementById("divchequefleetTRAK").style.visibility='hidden';
		document.getElementById("divothermodefleetTRAK").style.visibility='hidden';
		document.getElementById("divcreditcardfleetTRAK").style.visibility='hidden';
		
		document.getElementById("divchequeMT200").style.visibility='hidden';
		document.getElementById("divothermodeMT200").style.visibility='hidden';
		document.getElementById("divcreditcardMT200").style.visibility='hidden'; */

			document.getElementById("divchequeSlimTRAK").style.visibility='visible';
		document.getElementById("divothermodeSlimTRAK").style.visibility='hidden';
		document.getElementById("divcreditcardSlimTRAK").style.visibility='hidden';

		
		
	}

}



function othermodefleet(radioObj1)
{


if (radioObj1.checked) 
	

		{
			/*document.getElementById("divcheque").style.visibility='hidden';
		document.getElementById("divothermode").style.visibility='hidden';
		document.getElementById("divcreditcard").style.visibility='hidden'; */

		document.getElementById("divfleetcreditcard").style.visibility='hidden';
		document.getElementById("divfleetcheque").style.visibility='hidden';
		document.getElementById("divothermodefleet").style.visibility='visible';
		
		
	}



	

}

function othermodefleetTRAK(radioObj1)
{


if (radioObj1.checked) 
	

		{
		/*document.getElementById("divcheque").style.visibility='hidden';
		document.getElementById("divothermode").style.visibility='hidden';
		document.getElementById("divcreditcard").style.visibility='hidden';

		document.getElementById("divfleetcreditcard").style.visibility='hidden';
		document.getElementById("divfleetcheque").style.visibility='hidden';
		document.getElementById("divothermodefleet").style.visibility='hidden'; */
		
		document.getElementById("divchequefleetTRAK").style.visibility='hidden';
		document.getElementById("divothermodefleetTRAK").style.visibility='visible';
		document.getElementById("divcreditcardfleetTRAK").style.visibility='hidden';


		
	}

}

function othermodeMT200(radioObj1)
{


if (radioObj1.checked) 
	

		{
		/*document.getElementById("divcheque").style.visibility='hidden';
		document.getElementById("divothermode").style.visibility='hidden';
		document.getElementById("divcreditcard").style.visibility='hidden';

		document.getElementById("divfleetcreditcard").style.visibility='hidden';
		document.getElementById("divfleetcheque").style.visibility='hidden';
		document.getElementById("divothermodefleet").style.visibility='hidden';
		
		document.getElementById("divchequefleetTRAK").style.visibility='hidden';
		document.getElementById("divothermodefleetTRAK").style.visibility='hidden';
		document.getElementById("divcreditcardfleetTRAK").style.visibility='hidden'; */

		document.getElementById("divchequeMT200").style.visibility='hidden';
		document.getElementById("divothermodeMT200").style.visibility='visible';
		document.getElementById("divcreditcardMT200").style.visibility='hidden';


		
	}

}


function othermodeSlimTRAK(radioObj1)
{


if (radioObj1.checked) 
	

		{
	/*	document.getElementById("divcheque").style.visibility='hidden';
		document.getElementById("divothermode").style.visibility='hidden';
		document.getElementById("divcreditcard").style.visibility='hidden';

		document.getElementById("divfleetcreditcard").style.visibility='hidden';
		document.getElementById("divfleetcheque").style.visibility='hidden';
		document.getElementById("divothermodefleet").style.visibility='hidden';
		
		document.getElementById("divchequefleetTRAK").style.visibility='hidden';
		document.getElementById("divothermodefleetTRAK").style.visibility='hidden';
		document.getElementById("divcreditcardfleetTRAK").style.visibility='hidden';

		document.getElementById("divchequeMT200").style.visibility='hidden';
		document.getElementById("divothermodeMT200").style.visibility='hidden';
		document.getElementById("divcreditcardMT200").style.visibility='hidden';    */

		
		document.getElementById("divchequeSlimTRAK").style.visibility='hidden';
		document.getElementById("divothermodeSlimTRAK").style.visibility='visible';
		document.getElementById("divcreditcardSlimTRAK").style.visibility='hidden';


		
	}

}

function csa(csa)
	{
	    var ac = csa;
		if(ac == 'ag') 
		{
		divcheque.style.visibility='hidden';
		divothermode.style.visibility='hidden';
		divcreditcard.style.visibility='hidden';

		divfleetcreditcard.style.visibility='hidden';
		divfleetcheque.style.visibility='hidden';
		divothermodefleet.style.visibility='hidden';

		divchequefleetTRAK.style.visibility='hidden';
		divothermodefleetTRAK.style.visibility='hidden';
		divcreditcardfleetTRAK.style.visibility='hidden';

		divchequeMT200.style.visibility='hidden';
		divothermodeMT200.style.visibility='hidden';
		divcreditcardMT200.style.visibility='hidden';

		divchequeSlimTRAK.style.visibility='hidden';
		divothermodeSlimTRAK.style.visibility='hidden';
		divcreditcardSlimTRAK.style.visibility='hidden';
		
		
		MMDiv1.style.visibility='visible';
		MMDiv2.style.visibility='hidden';
		MMDiv3.style.visibility='hidden';
		MMDiv4.style.visibility='hidden';
		MMDiv5.style.visibility='hidden';
		MMDiv6.style.visibility='hidden';


		divcheque.style.visibility='hidden';
		divothermode.style.visibility='hidden';
		divcreditcard.style.visibility='hidden';

		}
		if(ac == 'at') 
		{
		divcheque.style.visibility='hidden';
		divothermode.style.visibility='hidden';
		divcreditcard.style.visibility='hidden';

		divfleetcreditcard.style.visibility='hidden';
		divfleetcheque.style.visibility='hidden';
		divothermodefleet.style.visibility='hidden';

		divchequefleetTRAK.style.visibility='hidden';
		divothermodefleetTRAK.style.visibility='hidden';
		divcreditcardfleetTRAK.style.visibility='hidden';

		divchequeMT200.style.visibility='hidden';
		divothermodeMT200.style.visibility='hidden';
		divcreditcardMT200.style.visibility='hidden';

		divchequeSlimTRAK.style.visibility='hidden';
		divothermodeSlimTRAK.style.visibility='hidden';
		divcreditcardSlimTRAK.style.visibility='hidden';

		
		MMDiv1.style.visibility='hidden';
		MMDiv2.style.visibility='visible';
		MMDiv3.style.visibility='hidden';
		MMDiv4.style.visibility='hidden';
		MMDiv5.style.visibility='hidden';
		MMDiv6.style.visibility='hidden';
		
		}
		if(ac == 'fg') 
		{
		divcheque.style.visibility='hidden';
		divothermode.style.visibility='hidden';
		divcreditcard.style.visibility='hidden';

		divfleetcreditcard.style.visibility='hidden';
		divfleetcheque.style.visibility='hidden';
		divothermodefleet.style.visibility='hidden';

		divchequefleetTRAK.style.visibility='hidden';
		divothermodefleetTRAK.style.visibility='hidden';
		divcreditcardfleetTRAK.style.visibility='hidden';

		divchequeMT200.style.visibility='hidden';
		divothermodeMT200.style.visibility='hidden';
		divcreditcardMT200.style.visibility='hidden';

		divchequeSlimTRAK.style.visibility='hidden';
		divothermodeSlimTRAK.style.visibility='hidden';
		divcreditcardSlimTRAK.style.visibility='hidden';


		MMDiv1.style.visibility='hidden';
		MMDiv2.style.visibility='hidden';
		MMDiv3.style.visibility='visible';
		MMDiv4.style.visibility='hidden';
		MMDiv5.style.visibility='hidden';
		MMDiv6.style.visibility='hidden';
		
		}
		if(ac == 'ft') 
		{

		divcheque.style.visibility='hidden';
		divothermode.style.visibility='hidden';
		divcreditcard.style.visibility='hidden';

		divfleetcreditcard.style.visibility='hidden';
		divfleetcheque.style.visibility='hidden';
		divothermodefleet.style.visibility='hidden';

		divchequefleetTRAK.style.visibility='hidden';
		divothermodefleetTRAK.style.visibility='hidden';
		divcreditcardfleetTRAK.style.visibility='hidden';

		divchequeMT200.style.visibility='hidden';
		divothermodeMT200.style.visibility='hidden';
		divcreditcardMT200.style.visibility='hidden';

		divchequeSlimTRAK.style.visibility='hidden';
		divothermodeSlimTRAK.style.visibility='hidden';
		divcreditcardSlimTRAK.style.visibility='hidden';


		MMDiv1.style.visibility='hidden';
		MMDiv2.style.visibility='hidden';
		MMDiv3.style.visibility='hidden';
		MMDiv4.style.visibility='visible';
		MMDiv5.style.visibility='hidden';
		MMDiv6.style.visibility='hidden';
		
		}
		if(ac == 'mt') 
		{

		divcheque.style.visibility='hidden';
		divothermode.style.visibility='hidden';
		divcreditcard.style.visibility='hidden';

		divfleetcreditcard.style.visibility='hidden';
		divfleetcheque.style.visibility='hidden';
		divothermodefleet.style.visibility='hidden';

		divchequefleetTRAK.style.visibility='hidden';
		divothermodefleetTRAK.style.visibility='hidden';
		divcreditcardfleetTRAK.style.visibility='hidden';

		divchequeMT200.style.visibility='hidden';
		divothermodeMT200.style.visibility='hidden';
		divcreditcardMT200.style.visibility='hidden';

		divchequeSlimTRAK.style.visibility='hidden';
		divothermodeSlimTRAK.style.visibility='hidden';
		divcreditcardSlimTRAK.style.visibility='hidden';


		MMDiv1.style.visibility='hidden';
		MMDiv2.style.visibility='hidden';
		MMDiv3.style.visibility='hidden';
		MMDiv4.style.visibility='hidden';
		MMDiv5.style.visibility='visible';
		MMDiv6.style.visibility='hidden';
		
		}
		if(ac == 'st') 
		{
		divcheque.style.visibility='hidden';
		divothermode.style.visibility='hidden';
		divcreditcard.style.visibility='hidden';

		divfleetcreditcard.style.visibility='hidden';
		divfleetcheque.style.visibility='hidden';
		divothermodefleet.style.visibility='hidden';

		divchequefleetTRAK.style.visibility='hidden';
		divothermodefleetTRAK.style.visibility='hidden';
		divcreditcardfleetTRAK.style.visibility='hidden';

		divchequeMT200.style.visibility='hidden';
		divothermodeMT200.style.visibility='hidden';
		divcreditcardMT200.style.visibility='hidden';

		divchequeSlimTRAK.style.visibility='hidden';
		divothermodeSlimTRAK.style.visibility='hidden';
		divcreditcardSlimTRAK.style.visibility='hidden';


		MMDiv1.style.visibility='hidden';
		MMDiv2.style.visibility='hidden';
		MMDiv3.style.visibility='hidden';
		MMDiv4.style.visibility='hidden';
		MMDiv5.style.visibility='hidden';
		MMDiv6.style.visibility='visible';
		
		}
	}





function track(val)
{
	
	var tr = val;
		if(tr == 'esn') 
		{
			Esndiv.style.visibility='visible';
			Simdiv.style.visibility='hidden';
			
			Userdiv.style.visibility='hidden';
		}
		if(tr == 'sim') 
		{
			Esndiv.style.visibility='hidden';
			Simdiv.style.visibility='visible';
		
			Userdiv.style.visibility='hidden';
		}
				
		if(tr == 'user') 
		{
	
			Userdiv.style.visibility='visible';
			Esndiv.style.visibility='hidden';
			Simdiv.style.visibility='hidden';
		
			
		}
		if(tr == 'simresult') 
		{
			Esndiv.style.visibility='hidden';
			Simdiv.style.visibility='visible';
		result.style.visibility='hidden';
			Userdiv.style.visibility='hidden';
		}
		
		
		if(tr == 'userresult') 
		{
	
			Userdiv.style.visibility='visible';
			Esndiv.style.visibility='hidden';
			Simdiv.style.visibility='hidden';
		result.style.visibility='hidden';
			
		}
		if(tr == 'esnresult') 
		{
			Esndiv.style.visibility='visible';
			Simdiv.style.visibility='hidden';
			Userdiv.style.visibility='hidden';
			result.style.visibility='hidden';
		}
		if(tr == 'res') 
		{
	
		result.style.visibility='visible';
		
		}
		if(tr == '') 
		{
			Esndiv.style.visibility='hidden';
			Simdiv.style.visibility='hidden';
			Userdiv.style.visibility='hidden';
			
		}
	
}
function pay(type)
{

	if(document.getElementById("type").checked)
	  {
		custtype.style.visibility='visible';
	  }
	else 
	{
		custtype.style.visibility='hidden';
	}

}
function typeofdue()
{
	if (document.newsalessheetform.checkdueupon.checked == true)
	{
		alert("inside due upon");
		
	}
	else
	{

		
	}
}

// Start  --- Saji
function enableFullPartialPayment()
{
	
	var theTable;
	theTable = document.getElementById('fullpartialPayment_table');  
	theTable.style.display = "block";
	document.newSalesSheetForm.checkdueupon.disable = false;
}
function disableFullPartialPayment()
{
	
	var theTable;
	theTable = document.getElementById('fullpartialPayment_table');  
	theTable.style.display = "none";
	document.newSalesSheetForm.checkdueupon.disable = true;
}

function addrow()
{
	
	var url;
   url = "<%=request.getContextPath()%>/addRows1.do";
  
   document.forms['newSalesSheetForm'].action= url;
   document.forms['newSalesSheetForm'].submit();
}


function enableCashDetails()
{

var theTable;
var theTable3;
var theTable4;
    theTable = document.getElementById('cheque_table');  
	theTable.style.display = "none";
	theTable3 = document.getElementById('newsalesheetButton_table');  
	theTable3.style.display = "block";
	theTable4 = document.getElementById('credit_table');  
	theTable4.style.display = "none";
}

function ebableChequeDetails(){

	var theTable;
	var theTable3;
	var theTable4;
    theTable = document.getElementById('cheque_table');  
	theTable.style.display = "block";	
	theTable3 = document.getElementById('newsalesheetButton_table');  
	theTable3.style.display = "block";
	theTable4 = document.getElementById('credit_table');  
	theTable4.style.display = "none";
}



function ebableCodDetails ()
{

var theTable;
var theTable3;
var theTable4;
    theTable = document.getElementById('cheque_table');  
	theTable.style.display = "none";	
	theTable3 = document.getElementById('newsalesheetButton_table');  
	theTable3.style.display = "block";
	theTable4 = document.getElementById('credit_table');  
	theTable4.style.display = "none";
}

function ebableCreditCardDetails(){
	
	var theTable;
    var theTable3;
	 var theTable4;
    theTable = document.getElementById('credit_table');  
	theTable.style.display = "block";	
	theTable3 = document.getElementById('newsalesheetButton_table');  
	theTable3.style.display = "block";
	theTable4 = document.getElementById('cheque_table');  
	theTable4.style.display = "none";
}

function enableBillingAdress(){
		var theTable;
		theTable = document.getElementById('table_10');  
		if (document.newSalesSheetForm.checkall.checked == true)
		{
			theTable.tBodies[0].rows[1].cells[1].childNodes[0].disabled=false;
			theTable.tBodies[0].rows[1].cells[3].childNodes[0].disabled=false;
			theTable.tBodies[0].rows[2].cells[1].childNodes[0].disabled=false;
			theTable.tBodies[0].rows[2].cells[3].childNodes[0].disabled=false;
			theTable.tBodies[0].rows[3].cells[1].childNodes[0].disabled=false;
			theTable.tBodies[0].rows[3].cells[3].childNodes[0].disabled=false;
			theTable.tBodies[0].rows[4].cells[1].childNodes[0].disabled=false;
			theTable.tBodies[0].rows[4].cells[3].childNodes[0].disabled=false;
		}
		else
		{
			theTable.tBodies[0].rows[1].cells[1].childNodes[0].disabled=true;
			theTable.tBodies[0].rows[1].cells[3].childNodes[0].disabled=true;
			theTable.tBodies[0].rows[2].cells[1].childNodes[0].disabled=true;
			theTable.tBodies[0].rows[2].cells[3].childNodes[0].disabled=true;
			theTable.tBodies[0].rows[3].cells[1].childNodes[0].disabled=true;
			theTable.tBodies[0].rows[3].cells[3].childNodes[0].disabled=true;
			theTable.tBodies[0].rows[4].cells[1].childNodes[0].disabled=true;
			theTable.tBodies[0].rows[4].cells[3].childNodes[0].disabled=true;
		}	
}

			