//%%% S T R A N %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//%%%%S%T%R%A%N%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//D 
//R 17.12.2008
//S stabilno
//B 
//C (c)2008 Spletična.
//%%%%S%T%R%A%N%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

//=== S P R E M E N L J I V K E ===================================================================



//=== =============================================================================================

//=== F U N K C I J E =============================================================================

//### STR POKAZI SKRIJ KOMENTARJE -----------------------------------------------------------------
//#D 
//#R 17.08.2008
//#S stabilno
//#B 
function strPokaziSkrijKomentarje() {
   var komentarji = document.getElementById( "strkomentarji" );
   var tmp;
   
   if ( komentarji !== null ) {
      if ( komentarji.oldClassName === undefined ) {
         komentarji.oldClassName = komentarji.className;
         komentarji.className += " skrito";
         komentarji.status = false;
      } else {
         tmp = komentarji.className;
         komentarji.className = komentarji.oldClassName;
         komentarji.oldClassName = tmp;
         if ( komentarji.status ) {
            komentarji.status = false;
            //komentarji.scrollIntoView( komentarji.status );
         } else {
            komentarji.status = true;
            //komentarji.scrollIntoView( komentarji.status );
         }
      }
   }
   
   return komentarji.status;
}

//### STR PREDVAJALNIK INIT -----------------------------------------------------------------------
//#D 
//#R 17.08.2008
//#S stabilno
//#B 
function strPredvajalnikInit() {
   var telo = document.getElementById( "stdtelotelo" );
   var a;
   var i;
   var x, y;
   var href;
   var b;
   var flashvars, params, attributes;
   
   if ( telo !== null ) {
      a = telo.getElementsByTagName( "a" );
      if ( a !== null ) {
         for ( i = 0, k = 0; i < a.length; i++ ) {
            if ( a[i].className == "ddtavdioposnetek" ) {
               x, y;
               href = a[i].href;
               b = href.indexOf( "?" );
               if ( b != -1 ) {
                  x = href.substr( 0, b );
                  y = "&"+ href.substr( b + 1 );
               } else {
                  x = href;
                  y = "";
               }
               
               a[i].id = "ddtavdiopredvajalnik"+ k;
               
               flashvars = false;
               params = {
                  allowfullscreen: "false",
                  allowscriptaccess: "always",
                  wmode: "opaque",
                  flashvars: "&file="+ x +"&type=sound&stretching=none&backcolor=#ffffff&frontcolor=#3298ca&lightcolor=#3298ca&screencolor=#ffffff&icons=false"+ y
               };
               attributes = {
                  id: "ddtavdioposnetek"+ k,
                  name: "ddtavdioposnetek"+ k,
                  title: a[i].innerHTML
               };
               swfobject.embedSWF( "./js/player.swf", "ddtavdiopredvajalnik"+ k, "360", "20", "9.0.0", false, flashvars, params, attributes );
               k++;
            }
         }
      }
   }
   
   return;
}

//### STR EPOSTA ----------------------------------------------------------------------------------
//#D 
//#R 17.08.2008
//#S stabilno
//#B 
function strEposta() {
   var eposta = document.getElementsByTagName( "a" );
   var i;
   
   if ( eposta !== null ) {
      for ( i = 0; i < eposta.length; i++ ) {
         if ( eposta[i].href.substr( 0, 7 ) == "mailto:" ) {
            eposta[i].href = eposta[i].href.replace( "%20[pri]%20", "@" );
            eposta[i].href = eposta[i].href.replace( "%20[pika]%20", "." );
            eposta[i].href = eposta[i].href.replace( "%20[crtaspodaj]%20", "_" );
            eposta[i].href = eposta[i].href.replace( " [pri] ", "@" );
            eposta[i].href = eposta[i].href.replace( " [pika] ", "." );
            eposta[i].href = eposta[i].href.replace( " [crtaspodaj] ", "_" );
            eposta[i].innerHTML = eposta[i].innerHTML.replace( " [pri] ", "@" );
            eposta[i].innerHTML = eposta[i].innerHTML.replace( " [pika] ", "." );
            eposta[i].innerHTML = eposta[i].innerHTML.replace( " [crtaspodaj] ", "_" );
         }
      }
   }

   return;
}

//=== =============================================================================================
