function ConfirmAction( a )
{
 return window.confirm(a);
}
function CheckCPKategForm ()
{
 result = true;
 obj = document.getElementById('nosauk_lv');
 if ((obj!=null)&&(obj.value=="")) {
  window.alert('Nosaukums (lv) nav ievadīts!');
  result = false;
 }
 obj = document.getElementById('nosauk_ru');
 if ((result)&&(obj!=null)&&(obj.value=="")) {
  window.alert('Nosaukums (ru) nav ievadīts!');
  result = false;
 }
  obj = document.getElementById('nosauk_en');
 if ((result)&&(obj!=null)&&(obj.value=="")) {
  window.alert('Nosaukums (en) nav ievadīts!');
  result = false;
 }
  obj = document.getElementById('seciba');
 if ((result)&&(obj!=null)&&(obj.value=="")) {
  window.alert('Secība nav ievadīta!');
  result = false;
 }
 return result;
}
function CheckUserForm()
{
 result = true;
 obj = document.getElementById('username');
 if ((result)&&(obj!=null)&&(obj.value=="")) {
  window.alert('Ievadiet lietotāja vārdu.');
  result = false;
 }
 obj = document.getElementById('password1');
 if ((result)&&(obj!=null)&&(obj.value=="")) {
  window.alert('Ievadiet paroli.');
  result = false;
 }
 obj2 = document.getElementById('password2');
 if ((result)&&(obj2!=null)&&(obj2.value=="")) {
  window.alert('Ievadiet apstiprināšanas paroli.');
  result = false;
 }
 if (obj.value!=obj2.value) {
  window.alert('Parole un apstiprināšanas parole nesakrīt.');
  result = false;
 }
 obj = document.getElementById('email');
 if ((result)&&(obj!=null)&&((obj.value=="")||(obj.value.length<5))) {
  window.alert('E-pasts nav norādīts korekti.');
  result = false;
 }
obj = document.getElementById('telefons');
 if ((result)&&(obj!=null)&&((obj.value=="")||(obj.value.length<7))) {
  window.alert('Telefons nav norādīts korekti.');
  result = false;
 }
 obj = document.getElementById('valoda');
 if ((result)&&(obj!=null)&&!((obj.value=="lv")||(obj.value=="ru")||(obj.value=="en"))) {
  window.alert('Valoda nav norādīta korekti.');
  result = false;
 }
 return result;
}