<!--

function showPic(bild,scroll)
{
  graphic = window.open(' ',null,'width=700,height=700,toolbar=no,location=no,status=no,menubar=no,scrollbars=' + scroll +',resizable=yes');
  string = '<head><meta http-equiv="imagetoolbar" content="no"></head><body bgcolor="#F5EFDD" marginheight=0 marginwidth=0 rightmargin=0 leftmargin=0 topmargin=0>' +
           '<table width=100% height=100% border=0 cellpadding=0 cellspacing=0><tr><td align=center valign=center>' +
           '<image src="' + bild + '.jpg" onload="resizeTo(document.bild.width+45,document.bild.height+85)" name="bild" onclick="self.close()" border=1>' +
           '</td></tr></table></body>'
  graphic.document.write(string);
  graphic.moveTo(20,120)
  graphic.focus()
  graphic.document.close();
}

function fonster(sida,bredd,hojd) {
      open(sida, "nysida" , "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,scrolling=yes,width="+bredd+",height="+hojd+",resizable=no"); 
}


function openGraphic(bild,bredd,hojd)
{
     graphic = window.open('','Bilder','width=' + bredd + ',height=' + hojd +',resizable=yes');
     string = '<head></head><body marginheight=0 marginwidth=0 rightmargin=0 leftmargin=0 topmargin=0><image src="' + bild + '.jpg"></body>';
     graphic.document.write(string);
     graphic.resizeTo(bredd,hojd);
     graphic.focus();
     graphic.document.close();
}


var kursdiv = 0;

function dispKursanm()
{
  if (kursdiv==0)
   {
    document.getElementById('kursanm').style.display="block";
    kursdiv=1;
   }
  else
   {
    document.getElementById('kursanm').style.display="none";
    kursdiv=0;
   }
}

function dispItem(nr)
{
 for(i=1;i<6;i++)
  {
   document.getElementById('t'+i).style.display="none"
  }
 document.getElementById('t'+nr).style.display="";
}


function showAll(id)
{
	document.getElementById('toppnyhet').style.display="none";
  if (document.getElementById('d'+id).style.display=="")
    {
     for(i=1;i<6;i++)
      {document.getElementById('d'+i).style.display="none"}
     window.location="#topp1";
    }	   
  else
    {
     for(i=1;i<6;i++)
      {document.getElementById('d'+i).style.display="none"}
     document.getElementById('d'+id).style.display="";
     window.location="#topp"+id;
    }
}

function showAll2(id)
{
  if (document.getElementById('d'+id).style.display=="")
    {
      {document.getElementById('d'+id).style.display="none"}
    }	   
  else
    {
     document.getElementById('d'+id).style.display="";
    }
}

function clearSearch()
{
 if(document.searchfield.searchstring.value=="Sök nyhet..................... Skriv HELP för sökhjälp.")
  document.searchfield.searchstring.value=""
}

function sokHelp()
{
eval("document.location.href='index.php?hitta=1&searchstring=HELP'");
}


var namn;
var doman;
var suffix;

function antispam(namn, doman, suffix, browsertext)
{
 document.write('<a href="' + 'mailto:' + namn + '@' + doman + '.' + suffix + '">' + browsertext + '</a>');
}


function adminNyhet()
{
eval("document.location.href='nyhetedit.php'");
}

function adminProgram()
{
eval("document.location.href='escalAE.php'");
}

var equal=51;
function controlEntry(word)
{
  var e=0;
   for(i=0; i<word.length;i++)
     e=e ^ getSign(word.charAt(i))
	
  if(e==equal)
   fonster(word+'.htm',500,300)
  else
   alert("Fel lösenord.")
}

function getSign(sign)
{
 var string = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
 return string.indexOf(sign);
}
//-->
