function getCK (name)
{
    var prefix = name + '=';
    var c = document.cookie + ";";
    var nullstring = '';
    var cookieStartIndex = c.indexOf(prefix);
    if (cookieStartIndex == -1)
        return nullstring;
    var cookieEndIndex = c.indexOf(";", cookieStartIndex + prefix.length);
    if (cookieEndIndex == -1)
        cookieEndIndex = c.length;
    return decodeURI(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}

function SH(varA1, varB1, varC1)
{
      var varA11 = ('meg_' + (varA1));
      var varB11 = ('meg_' + (varB1));
//      if ( document.getElementById ) {
//        if ( document.getElementById(varA11).style.display ) {
          if ( varC1 == 0 ) {
            document.getElementById(varA11).style.display = "none";
            document.getElementById(varB11).style.display = "block";
          } else {
            document.getElementById(varA11).style.display = "block";
            document.getElementById(varB11).style.display = "none";
          }
//        } else {
//          return true;
//        }
//      } else {
//        return true;
//      }
}

function getMGN(ckn)
{
  var meganisteName = getCK(ckn);
  if (meganisteName == '') {
     return;
  } else {
    document.write(meganisteName);
  }
}


function CKN(y, m, d, hh, mm, duration)
{
        var fileDate = new Date(y,m-1,d,hh,mm, 0);
        var nowDate = new Date();
        var days = Math.floor((nowDate.getTime() - fileDate.getTime())/(1000*24*60*60));
        if (days < duration) {
          document.write('<img src="/images/new.gif" border="0" width="13" height="13" align="bottom" />');
        }
}

