// JavaScript Document

<!--

function verify()
{
 if (document.forms[0].title.value == '')
     {
     alert("Vul een titel in.")
	 document.forms[0].title.focus();
     return false
     }
if (document.forms[0].story.value == '')
     {
     alert("Vul een bericht in.")
	  document.forms[0].story.focus();
     return false
     }
	
	 
return
}





function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=600,left = 376,top = 232');");
}

function writeImgTag(code)
{
var cache = document.comments.story.value;
this.code = code;
document.comments.story.value = cache +  code;

}

function emoticon(theSmilie) { 
   theSmilie = ' ' + theSmilie + ' '; 
   if (document.comments.story.createTextRange && document.comments.story.caretPos) { 
      var caretPos = document.comments.story.caretPos; 
      caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? theSmilie + ' ' : theSmilie; 
   } else { 
      document.comments.story.value  += theSmilie; 
   } 
   document.comments.story.focus(); 
   theSmilie = ''; 
} 

function wherecursor (textEl) {
if (textEl.createTextRange) 
         textEl.caretPos = document.selection.createRange().duplicate();
         
}
function insertAtCursor (textEl, text) {
       if (textEl.createTextRange && textEl.caretPos) {
         var caretPos = textEl.caretPos;
         caretPos.text =
           caretPos.text.charAt(caretPos.text.length - 1) == ' ' ?
           text + ' ' : text
       }
       else
         textEl.value  = text;
     }
function writeBBTag(code)
{

var cache = document.comments.story.value;
this.code = code;
document.comments.story.value = cache +  code;
document.comments.story.focus();
}


function writeImgTag2(code)
{
var cache = document.comments.comment.value;
this.code = code;
document.comments.comment.value = cache +  code;
document.comments.comment.focus();
}
function writeImgTag3(code)
{
var cache = document.comments.commentaar.value;
this.code = code;
document.comments.commentaar.value = cache +  code;
document.comments.commentaar.focus();
}

function NewWindow(mypage, myname, w, h, scroll) {
var myname = 'pic';
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


vote=0;
function checkSelected()
{
if(vote) return true;
else
{
alert('Selecteer aub een antwoord.');
return false;
}
}


var dom = (document.getElementById) ? 1 : 0; 
var ie4x = (document.all && !document.getElementById ) ? 1 : 0; 
var ns4x = (document.layers) ? 1 : 0; 
var other = (!dom && !ie4x && !ns4x ) ? 1 : 0; 
var opera   = (navigator.userAgent.indexOf('Opera')!=-1);
function nobox(){ 
if (opera || other){return false;}
if (ie4x){window.focus();} 
if (dom){document.getElementById("fixbox").focus();} 
} 

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//MENU OPTIONS

		// the number you pass to initLeft doesn't matter since it will get
		// changed onactivate
		var myMenu1 = new ypSlideOutMenu("menu1", "down", -1000, 55, 110, 194)
		var myMenu2 = new ypSlideOutMenu("menu2", "down", -1000, 55, 110, 194)
		var myMenu3 = new ypSlideOutMenu("menu3", "down", -1000, 55, 110, 194)
		var myMenu4 = new ypSlideOutMenu("menu4", "down", -1000, 55, 110, 194)
     	var myMenu5 = new ypSlideOutMenu("menu5", "down", -1000, 55, 110, 194)
		var myMenu6 = new ypSlideOutMenu("menu6", "down", -1000, 191, 194, 194)
		var myMenu7 = new ypSlideOutMenu("menu7", "down", -1000, 204, 194, 194)
		var myMenu8 = new ypSlideOutMenu("menu8", "down", -1000, 217, 194, 194)
		var myMenu9 = new ypSlideOutMenu("menu9", "down", -1000, 230, 194, 194)
		var myMenu10 = new ypSlideOutMenu("menu10", "down", -1000, 243, 194, 194)
		var myMenu11 = new ypSlideOutMenu("menu11", "down", -1000, 256, 194, 194)
		var myMenu12 = new ypSlideOutMenu("menu12", "down", -1000, 269, 194, 194)
		var myMenu13 = new ypSlideOutMenu("menu13", "down", -1000, 282, 194, 194)
		var myMenu14 = new ypSlideOutMenu("menu14", "down", -1000, 295, 194, 194)
		var myMenu15 = new ypSlideOutMenu("menu15", "down", -1000, 308, 194, 194)
		var myMenu16 = new ypSlideOutMenu("menu16", "down", -1000, 321, 194, 194)
		var myMenu17 = new ypSlideOutMenu("menu17", "down", -1000, 334, 194, 194)
		var myMenu18 = new ypSlideOutMenu("menu18", "down", -1000, 347, 194, 194)
		var myMenu19 = new ypSlideOutMenu("menu19", "down", -1000, 360, 194, 194)
		var myMenu20 = new ypSlideOutMenu("menu20", "down", -1000, 373, 194, 194)
		var myMenu21 = new ypSlideOutMenu("menu21", "down", -1000, 386, 194, 194)
		
		
    // for each menu, we set up hte onactivate event to call repositionMenu with the amount offset from center, in pixels
		myMenu1.onactivate = function() { repositionMenu(myMenu1, -185); }
		myMenu2.onactivate = function() { repositionMenu(myMenu2, -120); }
		myMenu3.onactivate = function() { repositionMenu(myMenu3, -39); }
		myMenu4.onactivate = function() { repositionMenu(myMenu4, 28); }
		myMenu5.onactivate = function() { repositionMenu(myMenu5, 108); }
		myMenu6.onactivate = function() { repositionMenu(myMenu6, -190); }
		myMenu7.onactivate = function() { repositionMenu(myMenu7, -190); }
		myMenu8.onactivate = function() { repositionMenu(myMenu8, -190); }
		myMenu9.onactivate = function() { repositionMenu(myMenu9, -190); }
		myMenu10.onactivate = function() { repositionMenu(myMenu10, -190); }
		myMenu11.onactivate = function() { repositionMenu(myMenu11, -190); }
		myMenu12.onactivate = function() { repositionMenu(myMenu12, -190); }
		myMenu13.onactivate = function() { repositionMenu(myMenu13, -190); }
		myMenu14.onactivate = function() { repositionMenu(myMenu14, -190); }
		myMenu15.onactivate = function() { repositionMenu(myMenu15, -190); }
		myMenu16.onactivate = function() { repositionMenu(myMenu16, -190); }
		myMenu17.onactivate = function() { repositionMenu(myMenu17, -190); }
		myMenu18.onactivate = function() { repositionMenu(myMenu18, -190); }
		myMenu19.onactivate = function() { repositionMenu(myMenu19, -190); }
		myMenu20.onactivate = function() { repositionMenu(myMenu20, -190); }
		myMenu21.onactivate = function() { repositionMenu(myMenu21, -190); }
		
		
    // this function repositions a menu to the speicified offset from center
		function repositionMenu(menu, offset)
		{
      // the new left position should be the center of the window + the offset
			var newLeft = getWindowWidth() / 2 + offset;

      // setting the left position in netscape is a little different than IE
			menu.container.style ? menu.container.style.left = newLeft + "px" : menu.container.left = newLeft;
		}
		 
    // this function calculates the window's width - different for IE and netscape
		function getWindowWidth()
		{
			return window.innerWidth ? window.innerWidth : document.body.offsetWidth;
		}

//-->
