viena_rinda=9;
pasr_bilde=viena_rinda;
curr_div_id=1; //pašreizējais div ident.
curr_div_id1=1; //pašreizējais div ident.
var xmlHttp;
var xmlHttp1;

function par_atb()
{
    document.getElementById("patbs1").style.display="block";
    document.getElementById("patbs2").style.display="block";
    document.getElementById("patbs3").style.display="block";
}

function vk_virina(div_gars, div_iss, div_id)
{
  if (document.getElementById(div_id).value=="  Minimizēt komentāru")
  {
    document.getElementById(div_gars).style.display="none";
    document.getElementById(div_iss).style.display="block";
    document.getElementById(div_id).value="  Lasīt visu komentāru";
  }
  else
  {
    document.getElementById(div_gars).style.display="block";
    document.getElementById(div_iss).style.display="none";
    document.getElementById(div_id).value="  Minimizēt komentāru";
  }
}


function vip_virina()
{
  if (document.getElementById('vip_virina').value=="  Minimizēt aprakstu")
  {
    document.getElementById('vip_gars').style.display="none";
    document.getElementById('vip_iss').style.display="block";
    document.getElementById('vip_virina').value="  Lasīt visu aprakstu";
  }
  else
  {
    document.getElementById('vip_gars').style.display="block";
    document.getElementById('vip_iss').style.display="none";
    document.getElementById('vip_virina').value="  Minimizēt aprakstu";
  }
}


function od_virina(id)
{
  var poga="vir"+id;
  var divs="od"+id;
  if (document.getElementById(poga).value=="  Nerādīt sarakstu  ")
  {
    document.getElementById(divs).style.display="none";
    document.getElementById(poga).value="  Rādīt sarakstu  ";
  }
  else
  {
    document.getElementById(divs).style.display="block";
    document.getElementById(poga).value="  Nerādīt sarakstu  ";
  }
}



function kom_virina()
{
  if (document.getElementById('virina').value=="  Aizvērt komentārus")
  {
    document.getElementById('skat_koment').style.display="none";
    document.getElementById('virina').value="  Rādīt komentārus";
  }
  else
  {
    document.getElementById('skat_koment').style.display="block";
    document.getElementById('virina').value="  Aizvērt komentārus";
  }
}

function atbidas()
{
 if (pasr_bilde>viena_rinda)
 {
  
  var div_nr=pasr_bilde-viena_rinda;
  var divid='b'+div_nr;
  document.getElementById(divid).style.display="block";
  div_nr=pasr_bilde;
  divid='b'+div_nr;
  document.getElementById(divid).style.display="none";
  pasr_bilde--;
  if (pasr_bilde<=viena_rinda)
  {
    document.getElementById('kbult').style.display="none";
    document.getElementById('tuksums').style.display="block";
  }
  if (pasr_bilde==29)
    document.getElementById('lbult').style.display="block";
  }
}

function rada_vardus(ids)
{
  var vards="vards"+ids;
  var rada="radit"+ids;

  if (document.getElementById(vards).style.display=="none")
  {
       document.getElementById(vards).style.display="block";
       document.getElementById(rada).value="Nerādīt";
       document.getElementById(rada).innerHTML=" Aizvērt";
  }
  else
  {
       document.getElementById(vards).style.display="none";
       document.getElementById(rada).value="Rādīt";
       document.getElementById(rada).innerHTML=" Atvērt";
  }
}

function rada_nov(id_nos)
{
  if (document.getElementById(id_nos).style.display=="none")
     document.getElementById(id_nos).style.display="block";
  else
     document.getElementById(id_nos).style.display="none";
}

function pabidas()
{
 if (pasr_bilde<30)
 {
  if (pasr_bilde<viena_rinda)
     pasr_bilde=viena_rinda;
  var div_nr=pasr_bilde-viena_rinda+1;
  var divid='b'+div_nr;
  document.getElementById(divid).style.display="none";
  div_nr=pasr_bilde+1;
  divid='b'+div_nr;
  document.getElementById(divid).style.display="block";
  pasr_bilde++;
  if (pasr_bilde>29)
    document.getElementById('lbult').style.display="none";
  if (pasr_bilde>viena_rinda)
  {
    document.getElementById('kbult').style.display="block";
    document.getElementById('tuksums').style.display="none";
  }
 }
}


function ver_raj_aplinku(id_nos, raj_id, val, pogas_id)
{
  if (document.getElementById(id_nos).style.display=="none")
  {
    document.getElementById(id_nos).style.display="block";
      document.getElementById(pogas_id).style.borderLeft="medium solid #FFFFFF";
      document.getElementById(pogas_id).style.borderTop="thin solid #f2f0ee";

/*
      if (document.getElementById('vieta_mainiga'))
      {
         xmlHttp1=GetXmlHttpObject();
         var url1="ielasa_raj_bildes.php";
         url1=url1+"?q="+raj_id;
         curr_div_id1='vieta_mainiga';

         xmlHttp1.onreadystatechange=stateChanged2;
         xmlHttp1.open("GET",url1,true);
         xmlHttp1.send(null);
      }
*/
  }
  else
  {
    document.getElementById(id_nos).style.display="none";
    document.getElementById(pogas_id).style.border="none";
  }
}



function ver_jnov_aplinku(id_nos, jnov_id, val, pogas_id)
{
  if (document.getElementById(id_nos).style.display=="none")
  {
    document.getElementById(id_nos).style.display="block";
//    document.getElementById(pogas_id).style.backgroundColor="#FFFFFF";
      document.getElementById(pogas_id).style.borderLeft="medium solid #FFFFFF";
      document.getElementById(pogas_id).style.borderTop="thin solid #f2f0ee";
//    alert(document.getElementById(id_nos).innerHTML);
//    if (val=='eng')
//       alert(document.getElementById(id_nos).innerHTML);
/*
    if (document.getElementById(id_nos).innerHTML=='Mazliet uzgaidiet ..' || document.getElementById(id_nos).innerHTML=='<b>Mazliet uzgaidiet ..</b>' || document.getElementById(id_nos).innerHTML=='A little wait ..' || document.getElementById(id_nos).innerHTML=='<b>A little wait ..</b>')
    {
      xmlHttp=GetXmlHttpObject();
      if (xmlHttp==null)
      {
         alert ("Browseris neatbalsta HTTP Request");
         return;
      }
      var url="ielasa_jn_vtas.php";
      url=url+"?q="+jnov_id;
      url=url+"&l="+val;
//    url=url+"&sid="+Math.random();
      curr_div_id=id_nos;
      xmlHttp.onreadystatechange=stateChanged;
      xmlHttp.open("GET",url,true);
      xmlHttp.send(null);
 
    }
*/
/*
      if (document.getElementById('vieta_mainiga'))
      {
         xmlHttp1=GetXmlHttpObject();
         var url1="ielasa_jn_bildes.php";
         url1=url1+"?q="+jnov_id;
//    url1=url1+"&sid="+Math.random();
//    curr_div_id1='daba_mainiga';
         curr_div_id1='vieta_mainiga';

         xmlHttp1.onreadystatechange=stateChanged2;
         xmlHttp1.open("GET",url1,true);
         xmlHttp1.send(null);
      }
*/
  }
  else
  {
    document.getElementById(id_nos).style.display="none";
    document.getElementById(pogas_id).style.border="none";
  }



//  document.getElementById(pogas_id).style.backgroundColor="#fbfdc1";

}


function ver_temu_aplinku(id_nos)
{
// , val

  if (document.getElementById(id_nos).style.display=="none")
    document.getElementById(id_nos).style.display="block";
  else
    document.getElementById(id_nos).style.display="none";
}

function ver_bilzu_aplinku_ar_param(id_nos, vip_tips, rtips,val)
{
  if (document.getElementById(id_nos).style.display=="none")
  {
    document.getElementById(id_nos).style.display="block";
//    alert(document.getElementById(id_nos).innerHTML);
//    if (val=='eng')
//       alert(document.getElementById(id_nos).innerHTML);
    var sat=document.getElementById(id_nos).innerHTML;
//    if (sat=='Mazliet uzgaidiet ..' || sat=='<b>Mazliet uzgaidiet ..</b>' || sat=='A little wait ..' || sat=='<b>A little wait ..</b>')
    if (sat.indexOf('Mazliet uzgaidiet ..',0)>0 || sat.indexOf('A little wait ..',0)>0)
    {
      xmlHttp=GetXmlHttpObject();
      if (xmlHttp==null)
      {
         alert ("Browseris neatbalsta HTTP Request");
         return;
      }
      var url="ielasa_bildes.php";
      url=url+"?q="+vip_tips;
      if (rtips>0)
         url=url+"&tips="+rtips;
      url=url+"&l="+val;
//    url=url+"&sid="+Math.random();
      curr_div_id=id_nos;
      xmlHttp.onreadystatechange=stateChanged;
      xmlHttp.open("GET",url,true);
      xmlHttp.send(null);
 
    }
      if (document.getElementById('daba_mainiga'))
      {
         xmlHttp1=GetXmlHttpObject();
         if (vip_tips!=11)
         {
            var url1="ielasa_vip_aprakstu.php";
            url1=url1+"?q="+vip_tips;
            if (rtips>0)
               url1=url1+"&tips="+rtips;
//    url=url+"&sid="+Math.random();
         }
         else
            var url1="ielasa_juras.php";

         curr_div_id1='daba_mainiga';
         xmlHttp1.onreadystatechange=stateChanged2;
         xmlHttp1.open("GET",url1,true);
         xmlHttp1.send(null);
      }
  }
  else
  {
    document.getElementById(id_nos).style.display="none";
  }
}


function ver_bilzu_aplinku(id_nos, vip_tips, val)
{
  if (document.getElementById(id_nos).style.display=="none")
  {
    document.getElementById(id_nos).style.display="block";
//    alert(document.getElementById(id_nos).innerHTML);
//    if (val=='eng')
//       alert(document.getElementById(id_nos).innerHTML);
    var sat=document.getElementById(id_nos).innerHTML;
//    if (sat=='Mazliet uzgaidiet ..' || sat=='<b>Mazliet uzgaidiet ..</b>' || sat=='A little wait ..' || sat=='<b>A little wait ..</b>')
    if (sat.indexOf('Mazliet uzgaidiet ..',0)>0 || sat.indexOf('A little wait ..',0)>0)
    {
      xmlHttp=GetXmlHttpObject();
      if (xmlHttp==null)
      {
         alert ("Browseris neatbalsta HTTP Request");
         return;
      }
      var url="ielasa_bildes.php";
      url=url+"?q="+vip_tips;
      url=url+"&l="+val;
//    url=url+"&sid="+Math.random();
      curr_div_id=id_nos;
      xmlHttp.onreadystatechange=stateChanged;
      xmlHttp.open("GET",url,true);
      xmlHttp.send(null);
 
    }
      if (document.getElementById('daba_mainiga'))
      {
         xmlHttp1=GetXmlHttpObject();
         if (vip_tips!=11)
         {
            var url1="ielasa_vip_aprakstu.php";
            url1=url1+"?q="+vip_tips;
//    url=url+"&sid="+Math.random();
         }
         else
            var url1="ielasa_juras.php";

         curr_div_id1='daba_mainiga';
         xmlHttp1.onreadystatechange=stateChanged2;
         xmlHttp1.open("GET",url1,true);
         xmlHttp1.send(null);
      }
  }
  else
  {
    document.getElementById(id_nos).style.display="none";
  }
}


function ver_bilzu_aplinku_iezime(id_nos, vip_tips, vip_id,val)
{
  if (document.getElementById(id_nos).style.display=="none")
  {
    document.getElementById(id_nos).style.display="block";
//    alert(document.getElementById(id_nos).innerHTML);
//    if (val=='eng')
//       alert(document.getElementById(id_nos).innerHTML);
    var sat=document.getElementById(id_nos).innerHTML;
//    if (sat=='Mazliet uzgaidiet ..' || sat=='<b>Mazliet uzgaidiet ..</b>' || sat=='A little wait ..' || sat=='<b>A little wait ..</b>')
    if (sat.indexOf('Mazliet uzgaidiet ..',0)>0 || sat.indexOf('A little wait ..',0)>0)
    {
      xmlHttp=GetXmlHttpObject();
      if (xmlHttp==null)
      {
         alert ("Browseris neatbalsta HTTP Request");
         return;
      }
      var url="ielasa_bildes.php";
      url=url+"?q="+vip_tips;
      url=url+"&l="+val;
      url=url+"&vipid="+vip_id;
//    url=url+"&sid="+Math.random();
      curr_div_id=id_nos;
      xmlHttp.onreadystatechange=stateChanged;
      xmlHttp.open("GET",url,true);
      xmlHttp.send(null);
 
    }
      if (document.getElementById('daba_mainiga'))
      {
         xmlHttp1=GetXmlHttpObject();
         if (vip_tips!=11)
         {
            var url1="ielasa_vip_aprakstu.php";
            url1=url1+"?q="+vip_tips;
//    url=url+"&sid="+Math.random();
         }
         else
            var url1="ielasa_juras.php";

         curr_div_id1='daba_mainiga';
         xmlHttp1.onreadystatechange=stateChanged2;
         xmlHttp1.open("GET",url1,true);
         xmlHttp1.send(null);
      }
  }
  else
  {
    document.getElementById(id_nos).style.display="none";
  }
}


function VipInfo(id_nos, vip_tips, val)
{
      xmlHttp=GetXmlHttpObject();
      if (xmlHttp==null)
      {
         alert ("Browseris neatbalsta HTTP Request");
         return;
      }
      var url1="ielasa_vip_aprakstu.php";
      url1=url1+"?q="+vip_tips;
//    url1=url1+"&sid="+Math.random();
      curr_div_id='daba_mainiga';
      xmlHttp.onreadystatechange=stateChanged;
      xmlHttp.open("GET",url1,true);
      xmlHttp.send(null);
}

function LinkaKrasa(obj) 
{
    obj.style.color="#990099";
}

function LinkaAtKrasa(obj) 
{
    obj.style.color="#AA0055";
}


function IzlecBilde(vietas_id,vai_lekt,obj) 
{
  if (vai_lekt=="1")
  {
    if (document.layers) 
       document.layers[''+vietas_id+''].visibility = "show";
    else if (document.all) 
       document.all[''+vietas_id+''].style.visibility = "visible";
    else if (document.getElementById) 
       document.getElementById(''+vietas_id+'').style.visibility = "visible";
    obj.style.color="#990099";
  }
  else
    if (vai_lekt=="0")
    {
      if (document.layers) 
         document.layers[''+vietas_id+''].visibility = "hide";
      else if (document.all) 
         document.all[''+vietas_id+''].style.visibility = "hidden";
      else if (document.getElementById) 
         document.getElementById(''+vietas_id+'').style.visibility = "hidden";
      obj.style.color="#AA0055";
    }
} 



function IzlecBildeW(vietas_id, bildes_nos, vai_lekt,obj) 
{
  if (vai_lekt=="1")
  {
    if (document.layers) 
       document.layers[''+vietas_id+''].visibility = "show";
    else if (document.all) 
       document.all[''+vietas_id+''].style.visibility = "visible";
    else if (document.getElementById) 
       document.getElementById(''+vietas_id+'').style.visibility = "visible";
//    document.getElementById(vietas_id).style.visibility = "visible";
    obj.style.color="#990099";
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null)
    {
       alert ("Browseris neatbalsta HTTP Request");
       return;
    }
     var url="atrod_bildi.php";
     url=url+"?q="+bildes_nos;
//    url=url+"&sid="+Math.random();
    curr_div_id=vietas_id;
    xmlHttp.onreadystatechange=stateChanged;
    xmlHttp.open("GET",url,true);
    xmlHttp.send(null);
  }
  else
    if (vai_lekt=="0")
    {
      if (document.layers) 
         document.layers[''+vietas_id+''].visibility = "hide";
      else if (document.all) 
         document.all[''+vietas_id+''].style.visibility = "hidden";
      else if (document.getElementById) 
         document.getElementById(''+vietas_id+'').style.visibility = "hidden";
//      document.getElementById(vietas_id).style.visibility = "hidden";
      obj.style.color="#AA0055";
    }
} 


function stateChanged() 
{ 
// var bildes_div_id='lecbilde1';
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
  document.getElementById(curr_div_id).innerHTML=xmlHttp.responseText;
 } 
}

function stateChanged2() 
{ 
if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete")
 { 
  document.getElementById(curr_div_id1).innerHTML=xmlHttp1.responseText;
 } 
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}



function akcept(subm_id)
{
//  alert("ok");
// te vajag pārrakstīt kā document.forms['formas_nos'].submit();
   document.getElementById(subm_id).submit();
}


function likt_proc()
{
//   document.getElementById("att_nos").value='%'+document.getElementById("att_nos").value;
// te vajag pārrakstīt kā document.forms['formas_nos'].submit();

   document.getElementById('sika_mekl').submit();
}


function rakstaText(txt)
{
document.getElementById("apraksts").innerHTML=txt;
}

function rakstaApr(txt,id_nos)
{
document.getElementById(id_nos).innerHTML=txt;
}


function mazveidot()
{
document.getElementById('jbilde').style.width="";
document.getElementById('jbilde').style.height="";
var newImg = new Image();
newImg.src = document.getElementById('jbilde').src;
var augstums = newImg.height;
var platums = newImg.width;
var ap=augstums /platums;
var max_izm=60;
document.getElementById('jbilde').width = max_izm;
document.getElementById('jbilde').height = Math.round(ap*max_izm);
}


function FonKrasMaina(krasa)
{
document.body.style.backgroundColor=krasa;
}


function lielbilde_bezkom_tm(f_nos, paraksts, obj,tm) {

	NewWindow=window.open("","",('channelmode=0,directories=0,fullscreen=0,status=0,resizable=1,scrollbars=1,titlebar=1,location=0,left=0,top=0,width=1024,height=768,toolbar=0'));
	NewWindow.document.write ("\n <HTML><HEAD>");
	NewWindow.document.write ("\n <META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>");
	NewWindow.document.write ("\n <TITLE>Daba DZIEDAVA.lv");
	NewWindow.document.write ("\n </TITLE><script type='text/javascript' src='/dziedava_script.js'></script></HEAD>");
	NewWindow.document.write ("\n <body bgcolor='#EEEEEE'>");
	NewWindow.document.write ("\n <TABLE height='100%' align='center' valign='middle'><TR><TD>");
	NewWindow.document.write ("\n <p align='center'>\"");
	NewWindow.document.write (paraksts);
	NewWindow.document.write ("\"</p>");
	NewWindow.document.write ("\n </TD></TR><TR><TD align='center'>");
	NewWindow.document.write ("\n <A HREF='JavaScript:this.close()'><img border='0' src='");
	NewWindow.document.write (f_nos);
	NewWindow.document.write ("'></A>");
	NewWindow.document.write ("\n <p align='left'>");
	NewWindow.document.write (obj);
	NewWindow.document.write (tm);
	NewWindow.document.write ("\n </p>");

	NewWindow.document.write ("\n </TD></TR><TR height='9%'><TD valign='top' align='center'>");
	NewWindow.document.write ("\n <img border='0' src='/paligs/krasu_gamma.jpg' usemap='#fonkrasa'>");

NewWindow.document.write ("<MAP id='fonkrasa' name='fonkrasa'>");
NewWindow.document.write ("<area shape='rect' coords='5,5,20,20' onMouseOver='FonKrasMaina(\"#FFFFFF\")' > \
<area shape='rect' coords='25,5,40,20' onMouseOver='FonKrasMaina(\"#E5E5E5\")' > \
<area shape='rect' coords='45,5,60,20' onMouseOver='FonKrasMaina(\"#CCCCCC\")' > \
<area shape='rect' coords='65,5,80,20' onMouseOver='FonKrasMaina(\"#B3B3B3\")' > \
<area shape='rect' coords='85,5,100,20' onMouseOver='FonKrasMaina(\"#999999\")' > \
<area shape='rect' coords='105,5,120,20' onMouseOver='FonKrasMaina(\"#808080\")' > \
<area shape='rect' coords='125,5,140,20' onMouseOver='FonKrasMaina(\"#666666\")' > \
<area shape='rect' coords='145,5,160,20' onMouseOver='FonKrasMaina(\"#4D4D4D\")' > \
<area shape='rect' coords='165,5,180,20' onMouseOver='FonKrasMaina(\"#333333\")' > \
<area shape='rect' coords='185,5,200,20' onMouseOver='FonKrasMaina(\"#1A1A1A\")' > \
<area shape='rect' coords='205,5,220,20' onMouseOver='FonKrasMaina(\"#000000\")' > \
</MAP> ");
	NewWindow.document.write ("</TD></TR></TABLE>");
	NewWindow.document.write ("\n <br>&nbsp;<br>&nbsp;");
	NewWindow.document.write ("\n </BODY></HTML>");
	NewWindow.document.close();
	return false;
}


function lielbilde_bezkom_fg(f_nos, paraksts, obj,tm,fg) {

	NewWindow=window.open("","",('channelmode=0,directories=0,fullscreen=0,status=0,resizable=1,scrollbars=1,titlebar=1,location=0,left=0,top=0,width=1024,height=768,toolbar=0'));
	NewWindow.document.write ("\n <HTML><HEAD>" +
"\n <META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>" + 
"\n <TITLE>Daba DZIEDAVA.lv" + 
"\n </TITLE><script type='text/javascript' src='/dziedava_script.js'></script></HEAD>" + 
"\n <body bgcolor='#EEEEEE'>" + 
"\n <TABLE height='100%' align='center' valign='middle'><TR><TD>" + 
"\n <p align='center'>\"" + 
paraksts + 
"\"</p>" + 
"\n </TD></TR><TR><TD align='center'>" + 
"\n <A HREF='JavaScript:this.close()'><img border='0' src='" + 
f_nos + 
"'></A>" + 
"\n <p align='right'>" + 
fg + 
"\n </p>" + 
"\n <p align='left'>" + 
obj + 
tm + 
"\n </p>" + 

"\n </TD></TR><TR height='9%'><TD valign='top' align='center'>" + 
"\n <img border='0' src='/paligs/krasu_gamma.jpg' usemap='#fonkrasa'>" + 

"<MAP id='fonkrasa' name='fonkrasa'>" + 
"<area shape='rect' coords='5,5,20,20' onMouseOver='FonKrasMaina(\"#FFFFFF\")' > \
<area shape='rect' coords='25,5,40,20' onMouseOver='FonKrasMaina(\"#E5E5E5\")' > \
<area shape='rect' coords='45,5,60,20' onMouseOver='FonKrasMaina(\"#CCCCCC\")' > \
<area shape='rect' coords='65,5,80,20' onMouseOver='FonKrasMaina(\"#B3B3B3\")' > \
<area shape='rect' coords='85,5,100,20' onMouseOver='FonKrasMaina(\"#999999\")' > \
<area shape='rect' coords='105,5,120,20' onMouseOver='FonKrasMaina(\"#808080\")' > \
<area shape='rect' coords='125,5,140,20' onMouseOver='FonKrasMaina(\"#666666\")' > \
<area shape='rect' coords='145,5,160,20' onMouseOver='FonKrasMaina(\"#4D4D4D\")' > \
<area shape='rect' coords='165,5,180,20' onMouseOver='FonKrasMaina(\"#333333\")' > \
<area shape='rect' coords='185,5,200,20' onMouseOver='FonKrasMaina(\"#1A1A1A\")' > \
<area shape='rect' coords='205,5,220,20' onMouseOver='FonKrasMaina(\"#000000\")' > \
</MAP> " + 
"</TD></TR></TABLE>" + 
"\n <br>&nbsp;<br>&nbsp;");
	NewWindow.document.write ("\n </BODY></HTML>");
	NewWindow.document.close();
	return false;
}



function lielbilde_bezkom(f_nos, paraksts, obj) {

	NewWindow=window.open("","",('channelmode=0,directories=0,fullscreen=0,status=0,resizable=1,scrollbars=1,titlebar=1,location=0,left=0,top=0,width=1024,height=768,toolbar=0'));
	NewWindow.document.write ("\n <HTML><HEAD>" + 
                    "\n <META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>" + 
                    "\n <TITLE>Daba DZIEDAVA.lv" + 
                    "\n </TITLE><script type='text/javascript' src='/dziedava_script.js'></script></HEAD>" + 
                    "\n <body bgcolor='#EEEEEE'>" + 
                    "\n <TABLE height='100%' align='center' valign='middle'><TR><TD>" + 
                    "\n <p align='center'>" + 
                    paraksts + 
                    "</p>" + 
                    "\n </TD></TR><TR><TD align='center'>" + 
                    "\n <A HREF='JavaScript:this.close()'><img border='0' src='" + 
                    f_nos + 
                    "'></A>" + 
                    "\n <p align='left'>" + 
                    obj + 
                    "\n </p>" + 
                    "\n </TD></TR><TR height='9%'><TD valign='top' align='center'>" + 
                    "\n <img border='0' src='/paligs/krasu_gamma.jpg' usemap='#fonkrasa'>" + 

                    "<MAP id='fonkrasa' name='fonkrasa'>" + 
                    "<area shape='rect' coords='5,5,20,20' onMouseOver='FonKrasMaina(\"#FFFFFF\")' > \
<area shape='rect' coords='25,5,40,20' onMouseOver='FonKrasMaina(\"#E5E5E5\")' > \
<area shape='rect' coords='45,5,60,20' onMouseOver='FonKrasMaina(\"#CCCCCC\")' > \
<area shape='rect' coords='65,5,80,20' onMouseOver='FonKrasMaina(\"#B3B3B3\")' > \
<area shape='rect' coords='85,5,100,20' onMouseOver='FonKrasMaina(\"#999999\")' > \
<area shape='rect' coords='105,5,120,20' onMouseOver='FonKrasMaina(\"#808080\")' > \
<area shape='rect' coords='125,5,140,20' onMouseOver='FonKrasMaina(\"#666666\")' > \
<area shape='rect' coords='145,5,160,20' onMouseOver='FonKrasMaina(\"#4D4D4D\")' > \
<area shape='rect' coords='165,5,180,20' onMouseOver='FonKrasMaina(\"#333333\")' > \
<area shape='rect' coords='185,5,200,20' onMouseOver='FonKrasMaina(\"#1A1A1A\")' > \
<area shape='rect' coords='205,5,220,20' onMouseOver='FonKrasMaina(\"#000000\")' > \
</MAP> " + 
                    "</TD></TR></TABLE>" + 
                    "\n <br>&nbsp;<br>&nbsp;" + 
                    "\n </BODY></HTML>");
	NewWindow.document.close();
	return false;
}


function lielabilde1(f_nos, paraksts, pap_dati, komentari, obj) {

	NewWindow=window.open("","",('channelmode=0,directories=0,fullscreen=0,status=0,resizable=1,scrollbars=1,titlebar=1,location=0,left=0,top=0,width=1024,height=768,toolbar=0'));
	NewWindow.document.write ("<HTML><HEAD>");
	NewWindow.document.write ("<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>");

	NewWindow.document.write ("<TITLE>Daba DZIEDAVA.lv");
	NewWindow.document.write ("</TITLE><script type='text/javascript' src='/dziedava_script.js'></script></HEAD>");
	NewWindow.document.write ("<body bgcolor='#EEEEEE'>");
	NewWindow.document.write ("<TABLE height='100%' align='center' valign='middle'><TR><TD>");
	NewWindow.document.write ("<p align='center'>\"");
	NewWindow.document.write (paraksts);
	NewWindow.document.write ("\" => ");
	NewWindow.document.write (pap_dati);
	NewWindow.document.write ("</p>");
	NewWindow.document.write ("</TD></TR><TR><TD align='center'>");
	NewWindow.document.write ("<A HREF='JavaScript:this.close()'><img border='0' src='");
	NewWindow.document.write (f_nos);
	NewWindow.document.write ("'></A>");
	NewWindow.document.write ("\n <p align='left'>");
	NewWindow.document.write (obj);
	NewWindow.document.write ("\n </p>");
	NewWindow.document.write ("</TD></TR><TR height='9%'><TD valign='top' align='center'>");
	NewWindow.document.write ("<img border='0' src='/paligs/krasu_gamma.jpg' usemap='#fonkrasa'>");

NewWindow.document.write ("<MAP id='fonkrasa' name='fonkrasa'>");
NewWindow.document.write ("<area shape='rect' coords='5,5,20,20' onMouseOver='FonKrasMaina(\"#FFFFFF\")' > \
<area shape='rect' coords='25,5,40,20' onMouseOver='FonKrasMaina(\"#E5E5E5\")' > \
<area shape='rect' coords='45,5,60,20' onMouseOver='FonKrasMaina(\"#CCCCCC\")' > \
<area shape='rect' coords='65,5,80,20' onMouseOver='FonKrasMaina(\"#B3B3B3\")' > \
<area shape='rect' coords='85,5,100,20' onMouseOver='FonKrasMaina(\"#999999\")' > \
<area shape='rect' coords='105,5,120,20' onMouseOver='FonKrasMaina(\"#808080\")' > \
<area shape='rect' coords='125,5,140,20' onMouseOver='FonKrasMaina(\"#666666\")' > \
<area shape='rect' coords='145,5,160,20' onMouseOver='FonKrasMaina(\"#4D4D4D\")' > \
<area shape='rect' coords='165,5,180,20' onMouseOver='FonKrasMaina(\"#333333\")' > \
<area shape='rect' coords='185,5,200,20' onMouseOver='FonKrasMaina(\"#1A1A1A\")' > \
<area shape='rect' coords='205,5,220,20' onMouseOver='FonKrasMaina(\"#000000\")' > \
</MAP> ");
	NewWindow.document.write ("</TD></TR></TABLE>");
	NewWindow.document.write ("<br>&nbsp;&nbsp;&nbsp; Komentāri:");
	NewWindow.document.write (komentari);
	NewWindow.document.write ("\n <div id='jkom' name='jkom'></div>");
	NewWindow.document.write ("\n <br>&nbsp;<br>&nbsp;");
	NewWindow.document.write ("\n </BODY></HTML>");
	NewWindow.document.close();
	return false;
}


function lielabilde1_tm(f_nos, paraksts, pap_dati, komentari, obj,tm) {

	NewWindow=window.open("","",('channelmode=0,directories=0,fullscreen=0,status=0,resizable=1,scrollbars=1,titlebar=1,location=0,left=0,top=0,width=1024,height=768,toolbar=0'));
	NewWindow.document.write ("<HTML><HEAD>");
	NewWindow.document.write ("<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>");

	NewWindow.document.write ("<TITLE>Daba DZIEDAVA.lv");
	NewWindow.document.write ("</TITLE><script type='text/javascript' src='/dziedava_script.js'></script></HEAD>");
	NewWindow.document.write ("<body bgcolor='#EEEEEE'>");
	NewWindow.document.write ("<TABLE height='100%' align='center' valign='middle'><TR><TD>");
	NewWindow.document.write ("<p align='center'>\"");
	NewWindow.document.write (paraksts);
	NewWindow.document.write ("\" => ");
	NewWindow.document.write (pap_dati);
	NewWindow.document.write ("</p>");
	NewWindow.document.write ("</TD></TR><TR><TD align='center'>");
	NewWindow.document.write ("<A HREF='JavaScript:this.close()'><img border='0' src='");
	NewWindow.document.write (f_nos);
	NewWindow.document.write ("'></A>");
	NewWindow.document.write ("\n <p align='left'>");
	NewWindow.document.write (obj);
	NewWindow.document.write (tm);
	NewWindow.document.write ("\n </p>");
	NewWindow.document.write ("</TD></TR><TR height='9%'><TD valign='top' align='center'>");
	NewWindow.document.write ("<img border='0' src='/paligs/krasu_gamma.jpg' usemap='#fonkrasa'>");

NewWindow.document.write ("<MAP id='fonkrasa' name='fonkrasa'>");
NewWindow.document.write ("<area shape='rect' coords='5,5,20,20' onMouseOver='FonKrasMaina(\"#FFFFFF\")' > \
<area shape='rect' coords='25,5,40,20' onMouseOver='FonKrasMaina(\"#E5E5E5\")' > \
<area shape='rect' coords='45,5,60,20' onMouseOver='FonKrasMaina(\"#CCCCCC\")' > \
<area shape='rect' coords='65,5,80,20' onMouseOver='FonKrasMaina(\"#B3B3B3\")' > \
<area shape='rect' coords='85,5,100,20' onMouseOver='FonKrasMaina(\"#999999\")' > \
<area shape='rect' coords='105,5,120,20' onMouseOver='FonKrasMaina(\"#808080\")' > \
<area shape='rect' coords='125,5,140,20' onMouseOver='FonKrasMaina(\"#666666\")' > \
<area shape='rect' coords='145,5,160,20' onMouseOver='FonKrasMaina(\"#4D4D4D\")' > \
<area shape='rect' coords='165,5,180,20' onMouseOver='FonKrasMaina(\"#333333\")' > \
<area shape='rect' coords='185,5,200,20' onMouseOver='FonKrasMaina(\"#1A1A1A\")' > \
<area shape='rect' coords='205,5,220,20' onMouseOver='FonKrasMaina(\"#000000\")' > \
</MAP> ");
	NewWindow.document.write ("</TD></TR></TABLE>");
	NewWindow.document.write ("<br>&nbsp;&nbsp;&nbsp; Komentāri:");
	NewWindow.document.write (komentari);
	NewWindow.document.write ("\n <div id='jkom' name='jkom'></div>");
	NewWindow.document.write ("\n <br>&nbsp;<br>&nbsp;");
	NewWindow.document.write ("\n </BODY></HTML>");
	NewWindow.document.close();
	return false;
}


function lielabilde1_fg(f_nos, paraksts, pap_dati, komentari, obj,tm,fg) {

	NewWindow=window.open("","",('channelmode=0,directories=0,fullscreen=0,status=0,resizable=1,scrollbars=1,titlebar=1,location=0,left=0,top=0,width=1024,height=768,toolbar=0'));
	NewWindow.document.write ("<HTML><HEAD>" + 
           "<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>" + 

           "<TITLE>Daba DZIEDAVA.lv" + 
           "</TITLE><script type='text/javascript' src='/dziedava_script.js'></script></HEAD>" + 
           "<body bgcolor='#EEEEEE'>" + 
           "<TABLE height='100%' align='center' valign='middle'><TR><TD>" + 
           "<p align='center'>\"" + 
           paraksts + 
           "\" => " + 
           pap_dati + 
           "</p>" + 
           "</TD></TR><TR><TD align='center'>" + 
           "<A HREF='JavaScript:this.close()'><img border='0' src='" + 
           f_nos + 
           "'></A>" + 
           "\n <p align='right'>" + 
           fg + 
           "\n </p>" + 
           "\n <p align='left'>" + 
           obj + 
           tm + 
           "\n </p>" + 
           "</TD></TR><TR height='9%'><TD valign='top' align='center'>" + 
           "<img border='0' src='/paligs/krasu_gamma.jpg' usemap='#fonkrasa'>" + 

           "<MAP id='fonkrasa' name='fonkrasa'>" + 
           "<area shape='rect' coords='5,5,20,20' onMouseOver='FonKrasMaina(\"#FFFFFF\")' > \
<area shape='rect' coords='25,5,40,20' onMouseOver='FonKrasMaina(\"#E5E5E5\")' > \
<area shape='rect' coords='45,5,60,20' onMouseOver='FonKrasMaina(\"#CCCCCC\")' > \
<area shape='rect' coords='65,5,80,20' onMouseOver='FonKrasMaina(\"#B3B3B3\")' > \
<area shape='rect' coords='85,5,100,20' onMouseOver='FonKrasMaina(\"#999999\")' > \
<area shape='rect' coords='105,5,120,20' onMouseOver='FonKrasMaina(\"#808080\")' > \
<area shape='rect' coords='125,5,140,20' onMouseOver='FonKrasMaina(\"#666666\")' > \
<area shape='rect' coords='145,5,160,20' onMouseOver='FonKrasMaina(\"#4D4D4D\")' > \
<area shape='rect' coords='165,5,180,20' onMouseOver='FonKrasMaina(\"#333333\")' > \
<area shape='rect' coords='185,5,200,20' onMouseOver='FonKrasMaina(\"#1A1A1A\")' > \
<area shape='rect' coords='205,5,220,20' onMouseOver='FonKrasMaina(\"#000000\")' > \
</MAP> " + 
           "</TD></TR></TABLE>" + 
           "<br>&nbsp;&nbsp;&nbsp; Komentāri:" + 
           komentari + 
           "\n <div id='jkom' name='jkom'></div>" + 
           "\n <br>&nbsp;<br>&nbsp;" + 
           "\n </BODY></HTML>");
	NewWindow.document.close();
	return false;
}



function kom_apstr(vipa_id,obj_nos)
{
document.getElementById('vip_forma').style.display='block'; 
document.getElementById('faila_nr').value=vipa_id;
document.getElementById('objekts').innerHTML=obj_nos+': &nbsp;';
// if .. ja eksistē skat_koment, tad tikai sekojošās 2 rindas
  if (document.getElementById('skat_koment'))
  {
    document.getElementById('skat_koment').style.display="none";
    document.getElementById('virina').value="  Rādīt komentārus";
  }

}



function piev_kom(formas_nos,komlauka_nos,virsr_nos, komautors)
{
 var koment2=document.getElementById(komlauka_nos);
 var komaut=document.getElementById(komautors).value;
 var kom3=koment2.value;
 if (koment2.value.length>2)
 {
   kom3=kom3.replace(/"/g,"&quot;");
   kom3=kom3.replace(/'/g,"&quot;");
    document.getElementById(komlauka_nos).value=kom3;
   komaut=komaut.replace(/"/g,"&quot;");
   komaut=komaut.replace(/'/g,"&quot;");
    document.getElementById(komautors).value=komaut;

    document.getElementById(formas_nos).submit();
 }
 else
     document.getElementById(virsr_nos).innerHTML='Ievadi vismaz 3 simbolus!';
}

function skats()
{
  var lapas_adr=document.location.href;
  var param_sak=lapas_adr.search('?');
  var jlapa=lapas_adr.substr(param_sak);
  var vec_nos='atputies_skaties.php';
  document.location.href=vec_nos.concat(jlapa);
}

function ievadit_skaitu()
{
document.getElementById('atlasit_cik').disabled=false;
}

function nevajag_skaitu()
{
document.getElementById('atlasit_cik').disabled=true;
}

function aplink_logs()
{
  Logs=window.open("/daba/ledurgas_dp.php","_self","","");
  Logs.document.write ("<HTML><HEAD><TITLE>Attēli</TITLE></HEAD>");
  Logs.document.write ("<body bgcolor='#EEEEEE'>");
  Logs.document.write ("</BODY></HTML>");
}


function ver_linklapu(id_nos, lapas_adr)
{
  if (document.getElementById(id_nos).style.display=="none")
    {
    location.href=lapas_adr;
    document.getElementById(id_nos).style.display="block";
    }
  else
    {
    document.getElementById(id_nos).style.display="none";
    }
}

function ver_aplinku(id_nos)
{
  if (document.getElementById(id_nos).style.display=="none")
    {
    document.getElementById(id_nos).style.display="block";
    }
  else
    {
    document.getElementById(id_nos).style.display="none";
    }
}


function aplinkam(id_nos)
{
document.getElementById(id_nos).style.display="block";
}


function ver_lapu(lapas_adr)
{
//  if (document.getElementById(id_nos).style.display=="none")
    location.href=lapas_adr;
}


function atzime_vienlinku()
{
  visi_linki=document.getElementsByTagName("a");
  var shii_lapa=window.location.href;
  var i=0;
  for (i=0;i<=visi_linki.length-1;i++)
  {
    if (visi_linki[i].href==shii_lapa)
    {
       visi_linki[i].style.backgroundColor="#FFFFE0";
    };
  };
}


function atzime_linku()
{
  visi_linki=document.getElementsByTagName("a");
  var shii_lapa=window.location.href;
  mekl_lapa=saknes_lapa(shii_lapa);
  var i=0;
  for (i=0;i<=visi_linki.length-1;i++)
  {
//    if visi_linki[i].href.indexOf(mekl_lapa)>0

//    if mekl_lapa.indexOf(visi_linki[i].href)>0
    if (visi_linki[i].href==mekl_lapa)
    {
       visi_linki[i].style.backgroundColor="#FFFFE0";
    };
    if (visi_linki[i].href==shii_lapa)
    {
       visi_linki[i].style.backgroundColor="#FFFFE0";
    };
  };
}


function saknes_lapa(lapa)
{
// nomet apakšdirektorijas, ja tādas ir
  var simb_nr=lapa.lastIndexOf('=');
  var slipstr_nr=lapa.indexOf('/',simb_nr);
  var p_lapa=lapa;
  if (slipstr_nr>0)
  {
    p_lapa=lapa.substr(0,slipstr_nr);
  }
  return p_lapa;
}


function visa_karte(param)
{
 document.getElementById('karte').src='apraksti/karte_novadi.jpg';
 document.getElementById("nov_apr").innerHTML='';
}

function karte_skaidro(param)
{
  switch(param)
  {
   case 'vidz':
     kartes_nos='apraksti/karte_vidzeme.jpg';
     txt='Vidzeme robežojas Latgali, Zemgali un Rīgas apkaimi. Vidzemē pierobežā atrodas: Alūksnes, Gulbenes, Lubānas, Madonas, Ērgļu, Ogres, Mālpils, Siguldas, Inčukalna, Sējas un Saulkrastu novadi';
     break;    
   case 'zemg':
     kartes_nos='apraksti/karte_zemgale.jpg';
     txt='Zemgale robežojas ar visiem Latvijas novadiem; Zemgalē pierobežā atrodas: Aknīstes, Jēkabpils, Krustpils, Pļaviņu, Kokneses, Aizkraukles, Skrīveru, Lielvārdes, Ķeguma, Baldones, Iecavas, Ozolnieku, Jelgavas, Tukuma, Jaunpils, Dobeles un Auces novadi';
//  (izņemot Zentenes, Pūres un Sēmes pagastus)
     break;
   case 'eng':
     kartes_nos='apraksti/karte_engure.jpg';
     txt='Engures novadā ietilpst Smārdes pagasts, Lapmežciema novads, kā arī Engures pagasts - Engure, Abragciems, Plieņciems, Apšuciems, Klapkalnciems, Ķesterciems, Bērzciems un Ezermuiža, kā arī daļa Engures ezera.';
     break;
   case 'kurz':
     kartes_nos='apraksti/karte_kurzeme.jpg';
     txt='Kurzemē, pierobežā ar Zemgali - Rojas, Kandavas, Brocēnu un Saldus novadi. Engures novads nav minēts, jo kartē ir izdalīts atsevišķi.';
// , kā arī Tukuma novada Zentenes, Pūres un Sēmes pagasti
     break;
   case 'latg':
     kartes_nos='apraksti/karte_latgale.jpg';
     txt='Latgale R pusē robežojas ar Vidzemi un Zemgali. Latgales malējie novadi šajā pierobežas joslā - Viļakas, Balvu, Rugāju, Rēzeknes, Viļānu, Varakļānu, Riebiņu, Līvānu, Daugavpils un Ilūkstes novadi.';
     break;
   case 'riga':
     kartes_nos='apraksti/karte_riga.jpg';
     txt='Rīga un apkaime: Rīga, Jūrmala, kā arī Babītes, Ķekavas, Mārupes, Olaines, Ādažu, Carnikavas, Garkalnes, Ropažu, Salaspils, Stopiņu un Ikšķiles novadi.';
     break;
  }
  document.getElementById('karte').src=kartes_nos;
  document.getElementById("nov_apr").innerHTML=txt;
}

function en_karte_skaidro(param)
{
  switch(param)
  {
   case 'vidz':
     kartes_nos='apraksti/karte_vidzeme.jpg';
     txt='Vidzeme includes Aluksne, Cesis, Gulbene, Limbazi, Madona, Ogre, Valka, Valmiera districts, as well as the Riga District Incukalns, Seja and Saulkrasti regions, Krimulda, Malpils, Sigulda parishes.';
     break;    
   case 'zemg':
     kartes_nos='apraksti/karte_zemgale.jpg';
     txt='Zemgale includes Aizkraukle, Bauska, Dobele, Jelgava, Riga districts, Tukums region (excluding Kandava county, Zentene and Engure parishes), as well as the Riga District Daugmale Parish and Baldone.';
     break;
   case 'eng':
     kartes_nos='apraksti/karte_engure.jpg';
     txt='Engure parish includes Engure, Abragciems, Plienciems, Apshuciems, Klapkalnciems, Kesterciems, Berzciems and Ezermuiza, as well as share Engure lake.';
     break;
   case 'kurz':
     kartes_nos='apraksti/karte_kurzeme.jpg';
     txt='Kurzeme includes Kuldiga, Liepaja, Saldus, Talsi, Ventspils districts, as well as the Tukums district Kandava region and Zentene parish. Tukums district Engure parish is not mentioned because it is distributed separately.';
     break;
   case 'latg':
     kartes_nos='apraksti/karte_latgale.jpg';
     txt='Latgale includes Daugavpils, Kraslava, Ludza, Preili and Rezekne districts.';
     break;
   case 'riga':
     kartes_nos='apraksti/karte_riga.jpg';
     txt='Riga & co includes Riga, Jurmala, and part of the Riga region - Babite, Kekava, Marupe, Olaine, Sala parishes, Adazi, Carnikava, Garkalne, Ropazi, Salaspils, Stopini districts.';
     break;
  }
  document.getElementById('karte').src=kartes_nos;
  document.getElementById("nov_apr").innerHTML=txt;
}

function mainat_pogu(pogas_id,krasa,izmers,vai_bold)
{
  document.getElementById(pogas_id).style.color=krasa;
  document.getElementById(pogas_id).style.fontSize=izmers;
  if (vai_bold)
     document.getElementById(pogas_id).style.fontWeight="bold";
  else
     document.getElementById(pogas_id).style.fontWeight="normal";
}


function maina_pogu(pogas_id)
{
document.getElementById(pogas_id).style.color="#990099";
document.getElementById(pogas_id).style.fontSize="15";
// document.getElementById(pogas_id).style.background="#FFFFFF";
}

function karte_nvip(divid)
{
aizver_nvip();
document.getElementById('nvip').style.display="none";
document.getElementById(divid).style.display="block";
}

function aizver_nvip()
{
document.getElementById('nvip1').style.display="none";
document.getElementById('nvip2').style.display="none";
document.getElementById('nvip3').style.display="none";
document.getElementById('nvip4').style.display="none";
document.getElementById('nvip5').style.display="none";
}

function atmaina_pogu(pogas_id)
{
document.getElementById(pogas_id).style.color="#5500aa";
document.getElementById(pogas_id).style.fontSize="12";
// document.getElementById(pogas_id).style.background="#fbfdc1";
}

function salabo_izveles(nos_id,vtid)
{
  if (document.getElementById(nos_id).options[0].selected==false)
  {
    document.getElementById('fnovads').options[0].selected=true;
    if (vtid>4 && vtid!=13)
    {
      document.getElementById('fjnov').options[0].selected=true;
      document.getElementById('fvieta').options[0].selected=true;
    }
//    if (vtid==8)
//       document.getElementById('koka_suga').options[0].selected=true;
  }
  if (document.getElementById('fvieta').options[0].selected==false)
  {
    document.getElementById('fjnov').options[0].selected=true;
    document.getElementById('fnovads').options[0].selected=true;
  }
  else 
   if (document.getElementById('fjnov').options[0].selected==false)
    document.getElementById('fnovads').options[0].selected=true;

  document.forms["karto"].submit();
}

function salabo_izveles_diza(nos_id,vtid)
{
  if (document.getElementById(nos_id).options[0].selected==false)
  {
    document.getElementById('fnovads').options[0].selected=true;
    document.getElementById('fjnov').options[0].selected=true;
    document.getElementById('fvieta').options[0].selected=true;
  }
  if (document.getElementById('fvieta').options[0].selected==false)
  {
    document.getElementById('fjnov').options[0].selected=true;
    document.getElementById('fnovads').options[0].selected=true;
  }
  else 
   if (document.getElementById('fjnov').options[0].selected==false)
    document.getElementById('fnovads').options[0].selected=true;
    // otrādi nekā dižkokiem; 1 nozīmēs dižus akmeņus.
    document.getElementById('di').value=1;
  document.forms['karto'].submit();
}

function jaun_virina()
{
  if (document.getElementById('jpoga').value=="  Rādīt arī vecākus jaunumus")
  {
    document.getElementById('jaunumi').style.display="block";
    document.getElementById('jpoga').value="  Minimizēt jaunumus";
  }
  else
  {
    document.getElementById('jaunumi').style.display="none";
    document.getElementById('jpoga').value="  Rādīt arī vecākus jaunumus";
  }
}

