function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
  document.write('<img src="http://www.sektariatet.dk/sizetest.gif?w='+myWidth+'&h='+myHeight+'&maxw='+screen.width+'&maxh='+screen.height+'" height=10 widtdh=10>');
}


//document.write('<META HTTP-EQUIV="Refresh" CONTENT="600; URL= ../index.html">');

today = new Date()
a = today.getDate()+today.getMonth()*30
b = (a/7)
indexSelector = (a%2)

// hack:
indexSelector = 0

function goForside() {
  if(indexSelector==0) {
    parent.location.href = 'http://www.sektariatet.dk/index.html'
  } else {
    parent.location.href = 'http://www.sektariatet.dk/index-forside.html'
  }
}

function goArtikler() {
  if(indexSelector==0) {
    parent.location.href = 'http://www.sektariatet.dk/index.html#artikler'
  } else {
    parent.location.href = 'http://www.sektariatet.dk/index-artikler.html'
  }
}

function goKirker() {
  if(indexSelector==0) {
    parent.location.href = 'http://www.sektariatet.dk/index.html#kirker'
  } else {
    parent.location.href = 'http://www.sektariatet.dk/index-kirker.html'
  }
}

function goFiktion() {
  if(indexSelector==0) {
    parent.location.href = 'http://www.sektariatet.dk/index.html#fiktion'
  } else {
    parent.location.href = 'http://www.sektariatet.dk/index-fiktion.html'
  }
}

orderCount=0

function forklaringReset() {
  orderCount--
  if (orderCount==0) {
    //forklaring.innerText="Strejfere kortlægger kristenheden"
    //forklaring.innerHTML="<br><b>S</b>ektariatets <b>A</b>genter <b>K</b>alder"
    seFilm();
  }
}


function seFilm() {
    forklaring.innerHTML="<br><-- <b>T</b>o sekterer mødes.."
}


function orden() {
  //orderCount--
  setTimeout("forklaringReset()", 1500)
}

function omBarmhjertighed() {
  orderCount++
  // not space for this when film
  //forklaring.innerHTML='<b><font color="af0000">Tilgiv os i kirkebranchen, for vi ved ikke, hvad vi gør</font></b>'
}

function omForside() {
  orderCount++
  forklaring.innerHTML="<br>Gå til forside"
}

function omArtikler() {
  orderCount++
  forklaring.innerHTML="<br>Læs Sektariatets artikler"
}

function omKirker() {
  orderCount++
  forklaring.innerHTML="<br>Kirkeanmeldelser, må vi overleve.."
}

function omFiktion() {
  orderCount++
  forklaring.innerHTML="<br>Læs kun, hvis du virkeligt tør!"
}



document.write('<table width=100% border=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR="#cccccc" BACKGROUND="../symbols/metal/metal.png" ><tr><td>');
document.write('<FONT COLOR="#800000"><A ONCLICK="exit=false;goForside()" onMouseOver="omBarmhjertighed()" onMouseOut="orden()"><FONT COLOR="#800000"><IMG SRC="http://www.sektariatet.dk/st.gif" NAME="Graphic1" ALIGN=BOTTOM WIDTH=308 HEIGHT=71 BORDER=1></FONT></A></FONT>');




document.write('');
//document.write('<param name="filename" value="http://www.sektariatet.dk/film/60x80.wmv">');
document.write('<param name="filename" value="http://arcane.web.surftown.dk/60x80.wmv">');
document.write('<param name="Showcontrols" value="False">');
document.write('<param name="autoStart" value="True">');
document.write('</object>');
document.write('');
document.write('');


document.write('</td>');

document.write('<td>');
document.write('<table border=0><tr>');
document.write('<td width=15></td>');

document.write('<TD BACKGROUND="../symbols/metal/metal-red.png" WIDTH=44 VALIGN=TOP BGCOLOR="#cccccc"><P><FONT FACE="Courier New, monospace"><A ONCLICK="exit=false; goForside()" onMouseOver="omForside()" onMouseOut="orden()"><b>Forside</b></FONT></P></TD>');

document.write('<td width=15></td>');

document.write('<TD BACKGROUND="../symbols/metal/metal-red.png" WIDTH=44 VALIGN=TOP BGCOLOR="#cccccc"><P><FONT FACE="Courier New, monospace"><A ONCLICK="exit=false;goArtikler()" onMouseOver="omArtikler()" onMouseOut="orden()"><b>Artikler</b></FONT></P></TD>');

document.write('<td width=15></td>');

document.write('<TD BACKGROUND="../symbols/metal/metal-red.png" WIDTH=44 VALIGN=TOP BGCOLOR="#cccccc"><P><FONT FACE="Courier New, monospace"><A ONCLICK="exit=false;goFiktion()" onMouseOver="omFiktion()" onMouseOut="orden()"><b>Fiktion</b></FONT></P></TD>');

document.write('<td width=15></td>');

document.write('<TD BACKGROUND="../symbols/metal/metal-red.png" WIDTH=44 VALIGN=TOP BGCOLOR="#cccccc"><P><FONT FACE="Courier New, monospace"><A ONCLICK="exit=false;goKirker()" onMouseOver="omKirker()" onMouseOut="orden()"><b>Kirker</b></FONT></P></TD>');

//document.write('<td width=15></td>');
document.write('</tr></table>');


//nye linier:

//document.write('<br><FONT FACE="Courier New, monospace"><CENTER><a ONCLICK="exit=false;goForside()"  href="../film.html">')
document.write('<FONT FACE="Courier New, monospace"><CENTER><a onMouseOver="seFilm()"  href="../film/index.html" name=forklaring>')
document.write('<br>Sektariatets Agenter Kalder');
alertSize()

document.write('</a></CENTER></font>');


document.write('</td>');
document.write('<tr>');





document.write('</tr>');
document.write('</table>');
document.write('');
document.write('');


//little gimmic
orderCount++
orden()


//Popup Window Script
//By JavaScript Kit ( w.html?javascriptkit.com)
//JavaScript tutorials and over 400+ free scripts

function openpopup(){
//do not NN
//winpops=window.open("http://www.sektariatet.dk/pop/givagt.html", "")
}


function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
   end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
   }
  return returnvalue;
}

function loadornot(){
if (get_cookie('poppedup')==''){
openpopup()
document.cookie="poppedup=yes"
SetCookie('poppedup', 'yes') //maybe this helps Jpe
}
}

loadornot()



