//checks that Service is selected in the onclick() event
<!--
function shipmentClicked(form)
{	//check if any of the Service option is selected.If not ask the user to select
	if (!(form.Service[0].checked || form.Service[1].checked))
	{
		alert('Please select Service Type');
		return false;
	}
	else
	{
	}
	form.submit();
	return true;	
}
//function that checks if correct state selected in Origin dropDown
function originStateClicked(form)
{
	//alert('Calling frm Orgin StateClciked');
	form.submit();
	return true;
}
//function that checks if correct state selected in Destination dropDown
function destinationStateClicked(form)
{
	//alert('Calling frm Destination StateClciked');
	form.submit();
	return true;
}
//function that checks if correct location selected in Orgin dropdown
function originLocationClicked(form)
{	
	//alert(form.originLocationId.options[0].selected);
	if (form.originLocationId.options[0].selected == true)
	{
		alert('Please select Correct location');
		//alert(form.originLocationId.options[0].value);
		return false;
	}
	return true;
}
//function that checks if correct country selected in Destination dropDown
function destinationCountryClicked(form)
{
	//alert('Calling frm Destination CountryClciked');
	form.submit();
	return true;
}
//function that checks if correct Location selected in Destination DropDown
function destinationLocationClicked(form)
{
	//alert(form.destinationLocationId.options[0].selected);
	if (form.destinationLocationId.options[0].selected == true)
	{
		alert('Please select Correct location');
		//alert(form.destinationLocationId.options[0].value);
		return false;
	}
	/*if (form.thecountry.value=='')
	{ alert('seting to country the hidden');
		form.thecountry.value = 'c';
	}
	else if (form.thecountry.value == 'c')
	{  alert('seting to interntnal the hidden');
		form.thecountry.value = 'i';
	}
	else if (form.thecountry.value == 'i')
	{  alert('once again seting to interntnal the hidden');
		form.thecountry.value = 'i';
	}*/
	form.submit();
	return true;
}
function txtEmpty(form)
{
	if (form.originLocationId.options[0].selected == true)
	{
		alert('Please select Origin location');
		//alert(form.originLocationId.options[0].value);
		return false;
	}
	else if (form.destinationLocationId.options[0].selected == true)
	{
		alert('Please select Destinaion location');
		//alert(form.destinationLocationId.options[0].value);
		return false;
	}
	var value1 = form.WeightKg.value;
	var value2 = form.WeightGms.value;
	if (value1.length == 0 && value2.length == 0)
	{
	  window.alert("Please specify the Weight in Kg/Gms");	  
	  return false;
	}
	
	if(value1 == 0 && !(value2 == 0))
	{
	}
	else if(!(value1 == 0) && value2 == 0)
	{
	}
	else if(value1 == 0 && value2 == 0)
	{
 	  window.alert("Please specify non-zero Weight in Kg/Gms");	  
	  return false;
	}	
	return true;
}
// copyright 1999 Idocs, Inc. http://www.idocs.com
// Distribute this script freely but keep this notice in place
function numbersonly(myfield, e, dec)
{
	//function to accept only numbers
	var key;
	var keychar;

	if (window.event)
	   key = window.event.keyCode;
	else if (e)
	   key = e.which;
	else
	   return true;
	keychar = String.fromCharCode(key);

	// control keys
	if ((key==null) || (key==0) || (key==8) || 
		(key==9) || (key==13) || (key==27) )
	   return true;

	// numbers
	else if ((("0123456789").indexOf(keychar) > -1))
	   return true;

	// decimal point jump
	else if (dec && (keychar == "."))
	{
		myfield.form.elements[dec].focus();
	   return false;
	}
	else
	return false;
}
//-->