
  function detalii_1(){  GB_showCenter('Comunicat', 'comunicat_13012009.php' , 900 , 960 , this.href); }

  function detalii_2(){  GB_showCenter('Comunicat', 'comunicat_09022009.php' , 480 , 900 , this.href); }

  function detalii_3(){  GB_showCenter('Din grija pentru parintii nostri', 'comunicat_17022009.php' , 1260 , 940 , this.href); }

  function detalii_4(){
     GB_showCenter('Obiective cuprinse in programul de reabilitare al orasului Simleu Silvaniei','comunicat_21052009.php',1080,940,this.href);
  }
  function detalii_5(){
     GB_showCenter('Reamenajarea parcului situat la intersectia strazilor Tudor Vladimirescu si Horea - Galerie foto','comunicate/20090604_1/photo_album.php',560,800,this.href);
  }

  function detalii_10(){
     GB_showCenter("Fotografii - Parteneriat Comenius Bright Ideas On Solar Energy","comunicate/20100216_1/photo_album.php",560,960,this.href);
  }


  function gal_com_17022009(){
       /*GB_showCenter('Din grija pentru parintii nostri', 'minishowcase/index.php' , 900 , 940 , this.href);*/
      GB_showCenter('Aspecte din timpul lucrarilor efectuate la Centrul Pentru Varstnici SILVANIA', 'images/comunicate_presa/comunicat_17022009/galerie_foto.php', 900, 900, this.href)
      /*GB_showCenter('Din grija pentru parintii nostri', 'images/comunicate_presa/galerie_17022009/index.php', 900, 900, this.href)*/
  }


  function prezentare(i){
       for(j=1;j<=5;j++){document.getElementById("dprez"+j).style.display="none";}
       document.getElementById("dprez"+i).style.display="block";
  }

  // Ajax
  var ajaxdestination="";

  function getdata(what,where) { // get data from source (what)
       try {
           xmlhttp = window.XMLHttpRequest?new XMLHttpRequest():
           new ActiveXObject("Microsoft.XMLHTTP");
       }
       catch (e) { /* do nothing */ }

       document.getElementById(where).innerHTML ="<center><img src='images/loading.gif' width='40'></center>";
       ajaxdestination=where;
       xmlhttp.onreadystatechange = triggered;
       xmlhttp.open("GET", what);
       xmlhttp.send(null);
       return false;
  }

  function triggered() {
       if (xmlhttp.readyState == 4) if (xmlhttp.status == 200)
       document.getElementById(ajaxdestination).innerHTML =xmlhttp.responseText;
  }


      // Ajax  2nd
      var ajaxdestination2="";

      function getdata2(what2,where2) { // get data from source (what)
         try {
           xmlhttp2 = window.XMLHttpRequest?new XMLHttpRequest():
           new ActiveXObject("Microsoft.XMLHTTP");
         }
         catch (e) { /* do nothing */ }

         document.getElementById(where2).innerHTML ="<center><img src='images/loading.gif' width='40'></center>";
         // we are defining the destination DIV id, must be stored in global variable (ajaxdestination)
         ajaxdestination2=where2;
         xmlhttp2.onreadystatechange = triggered2; // when request finished, call the function to put
                                                 // result to destination DIV
         xmlhttp2.open("GET", what2);
         xmlhttp2.send(null);
         return false;
      }

      function triggered2() { // put data returned by requested URL to selected DIV
           if (xmlhttp2.readyState == 4) if (xmlhttp2.status == 200)
           document.getElementById(ajaxdestination2).innerHTML =xmlhttp2.responseText;
      }


      // Ajax 3rd
      var http_request = null;
      var gOutputType = null;
      function getContent(fname) {
        if (window.XMLHttpRequest) {
                http_request = new XMLHttpRequest();
                 if (http_request.overrideMimeType) {
                        http_request.overrideMimeType('text/xml');
                }
          } else if (window.ActiveXObject){
              http_request = new ActiveXObject("Microsoft.XMLHTTP");
          } else {  return;   }
        if (fname) { fname = fname.toLowerCase(); }
        var uri=fname;
        document.getElementById("div_content").innerHTML ="<center><img src='images/loading.gif' width='40'></center>";
        http_request.onreadystatechange = setContent;

        http_request.open ('GET', uri, true);
        http_request.send (null);
      }

      function setContent() {
        if (http_request.readyState == 4) {
           var loc = document.getElementById("div_content");
           if (http_request.status == 200) {
                var newData = http_request.responseText;
                loc.innerHTML=newData;
                // initContent(loc);
           } else {  loc.innerHTML="<h2>No Content</h2>";  }
        }
      }

      // Ajax  4th
      var ajaxdestination4="";

      function getdata4(what4,where4){
         try {
           xmlhttp4 = window.XMLHttpRequest?new XMLHttpRequest():
           new ActiveXObject("Microsoft.XMLHTTP");
         }
         catch (e) { /* do nothing */ }

         document.getElementById(where4).innerHTML ="<center><img src='images/loading.gif' width='40'></center>";
         ajaxdestination4=where4;
         xmlhttp4.onreadystatechange = triggered4;

         xmlhttp4.open("GET", what4);
         xmlhttp4.send(null);
         return false;
      }

      function triggered4() { // put data returned by requested URL to selected DIV
           if (xmlhttp4.readyState == 4) if (xmlhttp4.status == 200)
           document.getElementById(ajaxdestination4).innerHTML =xmlhttp4.responseText;
      }

      // Ajax  5th
      var ajaxdestination5="";

      function getdata5(what5,where5){
         try {
           xmlhttp5 = window.XMLHttpRequest?new XMLHttpRequest():
           new ActiveXObject("Microsoft.XMLHTTP");
         }
         catch (e) { /* do nothing */ }

         document.getElementById(where5).innerHTML ="<center><img src='images/loading.gif' width='40'></center>";
         ajaxdestination5=where5;
         xmlhttp5.onreadystatechange = triggered5;

         xmlhttp5.open("GET", what5);
         xmlhttp5.send(null);
         return false;
      }

      function triggered5() { // put data returned by requested URL to selected DIV
           if (xmlhttp5.readyState == 4) if (xmlhttp5.status == 200)
           document.getElementById(ajaxdestination5).innerHTML =xmlhttp5.responseText;
      }

      // Ajax  ev
      var ajaxdestination_ev="";

      function getdata_ev(what_ev,where_ev){
         try {
           xmlhttp_ev = window.XMLHttpRequest?new XMLHttpRequest():
           new ActiveXObject("Microsoft.XMLHTTP");
         }
         catch (e) { /* do nothing */ }

         document.getElementById(where_ev).innerHTML ="<center><img src='images/loading.gif' width='40'></center>";
         ajaxdestination_ev=where_ev;
         xmlhttp_ev.onreadystatechange = triggered_ev;

         xmlhttp_ev.open("GET", what_ev);
         xmlhttp_ev.send(null);
         return false;
      }

      function triggered_ev() { // put data returned by requested URL to selected DIV
           if (xmlhttp_ev.readyState == 4) if (xmlhttp_ev.status == 200)
           document.getElementById(ajaxdestination_ev).innerHTML =xmlhttp_ev.responseText;
      }

      // Ajax consiliu locl
      var ajaxdestination_con="";

      function getdata_con(what_con,where_con) { // get data from source (what)
       try {
           xmlhttp_con = window.XMLHttpRequest?new XMLHttpRequest():
           new ActiveXObject("Microsoft.XMLHTTP");
       }
       catch (e) { /* do nothing */ }

       document.getElementById(where_con).innerHTML ="<center><img src='images/loading.gif' width='40'></center>";
       ajaxdestination_con=where_con;
       xmlhttp_con.onreadystatechange = triggered_con;
       xmlhttp_con.open("GET", what_con);
       xmlhttp_con.send(null);
       return false;
  }

  function triggered_con() {
       if (xmlhttp_con.readyState == 4) if (xmlhttp_con.status == 200)
       document.getElementById(ajaxdestination_con).innerHTML =xmlhttp_con.responseText;
  }

  // Ahah
  function ahah(url, target, delay) {
     var req;
     //  document.getElementById(target).innerHTML = 'waiting...';
     if (window.XMLHttpRequest) { req = new XMLHttpRequest(); }
     else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP");  }
     if (req != undefined) {
         req.onreadystatechange = function() {ahahDone(req, url, target, delay);};
         req.open("GET", url, true);
         req.send("");
     }
  }

     function ahahDone(req, url, target, delay) {
        if (req.readyState == 4) { // only if req is "loaded"
            if (req.status == 200) { // only if "OK"
                document.getElementById(target).innerHTML = req.responseText;
            } else {
                document.getElementById(target).innerHTML="ahah error:\n"+req.statusText;
            }
            if (delay != undefined) {
                setTimeout("ahah(url,target,delay)", delay); // resubmit after delay
                //server should ALSO delay before responding
            }
        }
     }

    // HCL page
    function show_hcl(hcl_file){
         GB_showCenter('HCL', hcl_file , 900 , 960 , this.href);
/*
         document.getElementById("hcl_"+id).style.display="block";
         document.getElementById("fhcl_"+id).src="hcl_show.php?hcl_id="+id;
*/
    }

    function hide_hcl(id){document.getElementById("hcl_"+id).style.display="none"; }

    function pagina_sel(){

       pg=document.getElementById("SEL_PG").value;
       w=document.getElementById("words").value;
       r=document.getElementById("rpp").value;
       n1=document.getElementById("nr_min").value;
       n2=document.getElementById("nr_max").value;
       d1=document.getElementById("data_min").value;
       d2=document.getElementById("data_max").value;

       var rsa=Math.floor(Math.random()*3333);
    ahah("hcl.php?n1="+n1+"&n2="+n2+"&d1="+d1+"&d2="+d2+"&w="+w+"&r="+r+"&pg="+pg+"&rnd="+rsa,"div_ob");
    }

    function pagina_down(){
      pg=document.getElementById("SEL_PG").value;
      pg=pg-1;
      if(pg>0){
         w=document.getElementById("words").value;
         r=document.getElementById("rpp").value;
         n1=document.getElementById("nr_min").value;
         n2=document.getElementById("nr_max").value;
         d1=document.getElementById("data_min").value;
         d2=document.getElementById("data_max").value;
         var rspd=Math.floor(Math.random()*3333);
    ahah("hcl.php?n1="+n1+"&n2="+n2+"&d1="+d1+"&d2="+d2+"&w="+w+"&r="+r+"&pg="+pg+"&rnd="+rspd,"div_ob");
      }
    }

    function pagina_up(){
      var pagina_max=document.getElementById("PG_MAX").value;
      pg=document.getElementById("SEL_PG").value;
      pg=pg - (-1);
      if(pg>0){
        w=document.getElementById("words").value;
        r=document.getElementById("rpp").value;
        n1=document.getElementById("nr_min").value;
        n2=document.getElementById("nr_max").value;
        d1=document.getElementById("data_min").value;
        d2=document.getElementById("data_max").value;
        var rspu=Math.floor(Math.random()*3333);
   ahah("hcl.php?n1="+n1+"&n2="+n2+"&d1="+d1+"&d2="+d2+"&w="+w+"&r="+r+"&pg="+pg+"&rnd="+rspu,"div_ob");
      }
   }

   function start_cautare(rand){
       pg=1;
       w=document.getElementById("words").value;
       r=document.getElementById("rpp").value;
       n1=document.getElementById("nr_min").value;
       n2=document.getElementById("nr_max").value;
       d1=document.getElementById("data_min").value;
       d2=document.getElementById("data_max").value;
       var rs=Math.floor(Math.random()*3333);
     ahah("hcl.php?n1="+n1+"&n2="+n2+"&d1="+d1+"&d2="+d2+"&w="+w+"&r="+r+"&pg="+pg+"&rnd="+rs,"div_HCL");
   }

   function show_event(evid){
       var rnd_event=Math.floor(Math.random()*1111)
       getdata_ev("eveniment.php?evId="+evid+"&rnd="+rnd_event,"div_event")
   }

   function submenu_hide(i){ document.getElementById("submenu_"+i).style.display="none";  }
   function submenu_show(i){ document.getElementById("submenu_"+i).style.display="block";  }

   function show_hsubmenu(i){
         var rnd_hs=Math.floor(Math.random()*1111)
         getdata("hsubmenu.php?current="+i+"&rnd="+rnd_hs,"div_horizontalcssmenu")
   }

   function submenu_hide(i){ document.getElementById("submenu_"+i).style.display="none";  }
   function submenu_show(i){  document.getElementById("submenu_"+i).style.display="block";  }

   function show_content(i,j){
       var rs2=Math.floor(Math.random()*3333);
       getdata2("show_content.php?tab="+i+"&opt="+j+"&rand="+rs2,"div_content");
   }

   function show_content2(content){ getContent(content+"?rnd="+Math.floor(Math.random()*9999));   }

   //  Tab menu
   function show_tabmenu(i){
         var rnd_tb=Math.floor(Math.random()*1111)
         getdata4("tab_menu.php?current="+i+"&rnd="+rnd_tb,"div_tabmenu");
   }

   function show_div_content(i){
         var rnd_i=Math.floor(Math.random()*1111)

/*         if(i==1){ getdata5("articole/articol_240109.php?rnd_i="+rnd_i,"div_content"); }*/
         if(i==1){ getdata5("home_1.php?rnd_i="+rnd_i,"div_content"); }
         if(i==2){ getdata5("administratie_organigrama.php?rnd_i="+rnd_i,"div_content"); }
         if(i==3){ getdata5("agenti_economici.htm?rnd_i="+rnd_i,"div_content"); }
         if(i==4){ getdata5("educatie_cultura.php?rnd_i="+rnd_i,"div_content"); }
         if(i==5){ getdata5("evenimente_s.php?rnd_i="+rnd_i,"div_content"); }
         if(i==6){ getdata5("evenimente.php?rnd_i="+rnd_i,"div_content"); }
         if(i==7){ getdata5("galerie.php?rnd_i="+rnd_i,"div_content"); }
   }

   function show_declaratie_avere(i){
      if(i==0){document.getElementById("declaratii_frame").src="declaratie.php?tip=0&demnitar=1"; }

      document.getElementById("declaratii_div").style.display="block";

//        alert(document.getElementById("doc_pdf").data);

   }

   function photo_20100509(){  GB_showCenter('Eveniment', 'evenimente/20100509_1/photo_album.php' , 555 , 800 , this.href); }
