 function deletefunction()
   {
   var m=document.plandetails.counter.value;
   var tempcount=0;	
   if(m>1){
	 for (k=0; k<m; k++)
     {	  	
       if (document.plandetails.check[k].checked)
          {           
	        tempcount = tempcount+1;         
			document.rosterform1.chkval.value+=document.plandetails.check[k].value;		
			document.rosterform1.chkval.value+=",";
          }		
	  }
	}else{
	  	 if (document.plandetails.check.checked)
           {           
            tempcount = tempcount+1;
			document.rosterform1.chkval.value+=document.plandetails.check.value;			
			document.rosterform1.chkval.value+=",";			
           }		
	}

	 if (tempcount == 0)
	 {
       alert("Please check atleast one record ")
		return false;
     }	
	document.rosterform1.submit();
}     







 function deletefunction1()
   {
   var m=document.plandetails.counter.value;
   var tempcount=0;	
   var tempcount1=0;	
   if(m>1){
	 for (k=0; k<m; k++)
     {	  	
       if (document.plandetails.check[k].checked)
          {           
	        tempcount = tempcount+1;         
			document.rosterform1.chkval.value+=document.plandetails.check[k].value;		
			document.rosterform1.chkval.value+=",";

	        tempcount1 = tempcount1+1;         
			document.rosterform1.chkval1.value+=document.plandetails.check1[k].value;		
			document.rosterform1.chkval1.value+=",";
          }		
	  }
	}else{
	  	 if (document.plandetails.check.checked)
           {           
            tempcount = tempcount+1;
			document.rosterform1.chkval.value+=document.plandetails.check.value;			
			document.rosterform1.chkval.value+=",";	

            tempcount1 = tempcount1+1;
			document.rosterform1.chkval1.value+=document.plandetails.check1.value;			
			document.rosterform1.chkval1.value+=",";		
           }		
	}


	 if (tempcount == 0)
	 {
       alert("Please check atleast one record ")
		return false;
     }	
	document.rosterform1.submit();
} 









 function Clearfunction()
	{
		alert("Please Confirm Clear !");
//		alert("Click On Retry On the Next Popup");
		location.reload();
	}

function checkall(thestate){
	var el_collection = eval("document.forms.plandetails.check")
	for (c=0; c < el_collection.length; c++)
		el_collection[c].checked = thestate
}



// i need to enter body onload while exe this program.
// which is found in home.asp
function blinkIt() {
 if (!document.all) return;
 else {
   for(i=0;i<document.all.tags('blink').length;i++){
      s=document.all.tags('blink')[i];
      s.style.visibility=(s.style.visibility=='visible')?'hidden':'visible';
   }
 }
}













<!-- Original:  Ronnie T. Moore -->
<!-- Web Site:  The JavaScript Source -->

<!-- Dynamic 'fix' by: Nannette Thacker -->
<!-- Web Site: http://www.shiningstar.net -->

<!-- Begin Limit Textarea
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else 
countfield.value = maxlimit - field.value.length;
}
// End -->




<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- auto tab -->
<!-- Begin
var isNN = (navigator.appName.indexOf("Netscape")!=-1);
function autoTab(input,len, e) {
var keyCode = (isNN) ? e.which : e.keyCode; 
var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
if(input.value.length >= len && !containsElement(filter,keyCode)) {
input.value = input.value.slice(0, len);
input.form[(getIndex(input)+1) % input.form.length].focus();
}
function containsElement(arr, ele) {
var found = false, index = 0;
while(!found && index < arr.length)
if(arr[index] == ele)
found = true;
else
index++;
return found;
}
function getIndex(input) {
var index = -1, i = 0, found = false;
while (i < input.form.length && index == -1)
if (input.form[i] == input)index = i;
else i++;
return index;
}
return true;
}
//  End -->










<!-- Begin Check caps lock
function checkCapsLock( e ) {
	var myKeyCode=0;
	var myShiftKey=false;
	var myMsg='Caps Lock is On.\n\nTo prevent entering your password incorrectly,\nyou should press Caps Lock to turn it off.';

	// Internet Explorer 4+
	if ( document.all ) {
		myKeyCode=e.keyCode;
		myShiftKey=e.shiftKey;

	// Netscape 4
	} else if ( document.layers ) {
		myKeyCode=e.which;
		myShiftKey=( myKeyCode == 16 ) ? true : false;

	// Netscape 6
	} else if ( document.getElementById ) {
		myKeyCode=e.which;
		myShiftKey=( myKeyCode == 16 ) ? true : false;

	}

	// Upper case letters are seen without depressing the Shift key, therefore Caps Lock is on
	if ( ( myKeyCode >= 65 && myKeyCode <= 90 ) && !myShiftKey ) {
		alert( myMsg );

	// Lower case letters are seen while depressing the Shift key, therefore Caps Lock is on
	} else if ( ( myKeyCode >= 97 && myKeyCode <= 122 ) && myShiftKey ) {
		alert( myMsg );

	}
}
//  End -->



















<!-- choose country -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var africaArray =  new Array("('Select country','',true,true)",
"('Ethiopia')",
"('Somalia')",
"('South Africa')",
"('Other')");
var middleeastArray =  new Array("('Select country','',true,true)",
"('Egypt')",
"('Iran')",
"('Israel')",
"('Kuwait')",
"('Lebanon')",
"('Morocco')",
"('Saudi Arabia')",
"('Syria')",
"('Turkey')",
"('U. A. Emirates')",
"('Other')");
var asiaArray =  new Array("('Select country','',true,true)",
"('Armenia')",
"('Bangladesh')",
"('Cambodia')",
"('China')",
"('India')",
"('Indonesia')",
"('Japan')",
"('Malaysia')",
"('Myanmar')",
"('Nepal')",
"('Pakistan')",
"('Philippines')",
"('Singapore')",
"('South Korea')",
"('Sri Lanka')",
"('Taiwan')",
"('Thailand')",
"('Uzbekistan')",
"('Vietnam')",
"('Other')");
var europeArray =  new Array("('Select country','',true,true)",
"('Albania')",
"('Austria')",
"('Belarus')",
"('Belgium')",
"('Bosnia')",
"('Bulgaria')",
"('Croatia')",
"('Cyprus')",
"('Czech Rep.')",
"('Denmark')",
"('Estonia')",
"('Finland')",
"('France')",
"('Germany')",
"('Greece')",
"('Hungary')",
"('Iceland')",
"('Ireland')",
"('Italy')",
"('Latvia')",
"('Liechtenstein')",
"('Lithuania')",
"('Luxembourg')",
"('Macedonia')",
"('Malta')",
"('Monaco')",
"('Netherlands')",
"('Norway')",
"('Poland')",
"('Portugal')",
"('Romania')",
"('Russia')",
"('Slovakia')",
"('Slovenia')",
"('Spain')",
"('Sweden')",
"('Switzerland')",
"('Ukraine')",
"('United Kingdom')",
"('Other')");
var australiaArray =  new Array("('Select country','',true,true)",
"('Australia')",
"('New Zealand')",
"('Other')");
var lamericaArray =  new Array("('Select country','',true,true)",
"('Costa Rica')",
"('Cuba')",
"('El Salvador')",
"('Guatemala')",
"('Haiti')",
"('Jamaica')",
"('Mexico')",
"('Panama')",
"('Other')");
var namericaArray =  new Array("('Select country','',true,true)",
"('Canada')",
"('USA')",
"('Other')");
var samericaArray =  new Array("('Select country','',true,true)",
"('Argentina')",
"('Bolivia')",
"('Brazil')",
"('Chile')",
"('Colombia')",
"('Ecuador')",
"('Paraguay')",
"('Peru')",
"('Suriname')",
"('Uruguay')",
"('Venezuela')",
"('Other')");
function populateCountry(inForm,selected) {
var selectedArray = eval(selected + "Array");
while (selectedArray.length < inForm.country.options.length) {
inForm.country.options[(inForm.country.options.length - 1)] = null;
}
for (var i=0; i < selectedArray.length; i++) {
eval("inForm.country.options[i]=" + "new Option" + selectedArray[i]);
}
if (inForm.region.options[0].value == '') {
inForm.region.options[0]= null;
if ( navigator.appName == 'Netscape') {
if (parseInt(navigator.appVersion) < 4) {
window.history.go(0);
}
else {   	
if (navigator.platform == 'Win32' || navigator.platform == 'Win16') {
window.history.go(0);
            }
         }
      }
   }
}
function populateUSstate1(inForm,selected) {  
var stateArray =  new Array("('Select State','',true,true)",
"('Alabama')",
"('Alaska')",
"('Arizona')",
"('Arkansas')",
"('California')",
"('Colorado')",
"('Connecticut')",
"('Delaware')",
"('Columbia')",
"('Florida')",
"('Georgia')",
"('Hawaii')",
"('Idaho')",
"('Illinois')",
"('Indiana')",
"('Iowa')",
"('Kansas')",
"('Kentucky')",
"('Louisiana')",
"('Maine')",
"('Maryland')",
"('Massachusetts')",
"('Michigan')",
"('Minnesota')",
"('Mississippi')",
"('Missouri')",
"('Montana')",
"('Nebraska')",
"('Nevada')",
"('New Hampshire')",
"('New Jersey')",
"('New Mexico')",
"('New York')",
"('North Carolina')",
"('North Dakota')",
"('Ohio')",
"('Oklahoma')",
"('Oregon')",
"('Pennsylvania')",
"('Rhode Island')",
"('South Carolina')",
"('South Dakota')",
"('Tennessee')",
"('Texas')",
"('Utah')",
"('Vermont')",
"('Virginia')",
"('Washington')",
"('West Virginia')",
"('Wisconsin')",
"('Wyoming')");
if (selected == 'USA') {
for (var i=0; i < stateArray.length; i++) {
eval("inForm.country.options[i]=" + "new Option" + stateArray[i]);
}
if ( navigator.appName == 'Netscape') {
if (parseInt(navigator.appVersion) < 4) {
window.history.go(0)
}
else {    	
if (navigator.platform == 'Win32' || navigator.platform == 'Win16') {
window.history.go(0)
         }
      }
   }
}
else {
}  
if (selected == 'Other') {
newCountry = "";
while (newCountry == ""){
newCountry=prompt ("Please enter the name of your country.", "");
}
if (newCountry != null) {
inForm.country.options[(inForm.country.options.length-1)]=new Option(newCountry,newCountry,true,true);
inForm.country.options[inForm.country.options.length]=new Option('Other, not listed','Other');
   }
}
if(inForm.country.options[0].text == 'Select country') {
inForm.country.options[0]= null;
   }
}
// End -->



















<!-- choose Type_of_bus -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var Type_of_bus_selectArray =  new Array("('SELECT TYPE','',true,true)",
"('MANUFACTURER')",
"('DISTRIBUTOR')",
"('WHOLESALER')",
"('DEALER')",
"('SERVICES PROVIDER')",
"('OTHER')");
function populateType_of_bus(inForm,selected) {
var selectedArray = eval(selected + "Array");
while (selectedArray.length < inForm.Type_of_bus.options.length) {
inForm.Type_of_bus.options[(inForm.Type_of_bus.options.length - 1)] = null;
}
for (var i=0; i < selectedArray.length; i++) {
eval("inForm.Type_of_bus.options[i]=" + "new Option" + selectedArray[i]);
}
if (inForm.type_s.options[0].value == '') {
inForm.type_s.options[0]= null;
if ( navigator.appName == 'Netscape') {
if (parseInt(navigator.appVersion) < 4) {
window.history.go(0);
}
else {   	
if (navigator.platform == 'Win32' || navigator.platform == 'Win16') {
window.history.go(0);
            }
         }
      }
   }
}
function populateUSstate(inForm,selected) {  
var stateArray =  new Array("('Select State','',true,true)",
"('Wyoming')");
if (selected == 'USA') {
for (var i=0; i < stateArray.length; i++) {
eval("inForm.Type_of_bus.options[i]=" + "new Option" + stateArray[i]);
}
if ( navigator.appName == 'Netscape') {
if (parseInt(navigator.appVersion) < 4) {
window.history.go(0)
}
else {    	
if (navigator.platform == 'Win32' || navigator.platform == 'Win16') {
window.history.go(0)
         }
      }
   }
}
else {
}  
if (selected == 'OTHER') {
newType_of_bus = "";
while (newType_of_bus == ""){
newType_of_bus=prompt ("Specify your Type.", "");
}
if (newType_of_bus != null) {
inForm.Type_of_bus.options[(inForm.Type_of_bus.options.length-1)]=new Option(newType_of_bus,newType_of_bus,true,true);
inForm.Type_of_bus.options[inForm.Type_of_bus.options.length]=new Option('OTHER, NOT LISTED','OTHER');
   }
}
if(inForm.Type_of_bus.options[0].text == 'SELECT TYPE') {
inForm.Type_of_bus.options[0]= null;
   }
}
// End -->


