<!--
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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function clearField(theField){
        theField.value="";
}
//-->
<!--
function buildQueryString(theFormName) {
  theForm = document.forms[theFormName];
  var qs = ''
  for (e=0;e<theForm.elements.length;e++) {
    if (theForm.elements[e].name!='') {
      qs+=(qs=='')?'?':'&'
      qs+=theForm.elements[e].name+'='+escape(theForm.elements[e].value)
      }
    }
  return qs
}

var IFrameObj; // our IFrame object
function callToServer(theFormName, URL) { //this is the version of the function called by forms
  if (!document.createElement) {return true};
  var IFrameDoc;
  URL = URL + buildQueryString(theFormName);
  if (!IFrameObj && document.createElement) {
    // create the IFrame and assign a reference to the
    // object to our global variable IFrameObj.
    // this will only happen the first time 
    // callToServer() is called
   try {
      var tempIFrame=document.createElement('iframe');
      tempIFrame.setAttribute('id','RSIFrame');
      tempIFrame.style.border='0px';
      tempIFrame.style.width='0px';
      tempIFrame.style.height='0px';
      IFrameObj = document.body.appendChild(tempIFrame);
      
      if (document.frames) {
        // this is for IE5 Mac, because it will only
        // allow access to the document object
        // of the IFrame if we access it through
        // the document.frames array
        IFrameObj = document.frames['RSIFrame'];
      }
    } catch(exception) {
      // This is for IE5 PC, which does not allow dynamic creation
      // and manipulation of an iframe object. Instead, we'll fake
      // it up by creating our own objects.
      iframeHTML='\<iframe id="RSIFrame" style="';
      iframeHTML+='border:0px;';
      iframeHTML+='width:0px;';
      iframeHTML+='height:0px;';
      iframeHTML+='"><\/iframe>';
      document.body.innerHTML+=iframeHTML;
      IFrameObj = new Object();
      IFrameObj.document = new Object();
      IFrameObj.document.location = new Object();
      IFrameObj.document.location.iframe = document.getElementById('RSIFrame');
      IFrameObj.document.location.replace = function(location) {
        this.iframe.src = location;
      }
    }
  }
  
  if (navigator.userAgent.indexOf('Gecko') !=-1 && !IFrameObj.contentDocument) {
    // we have to give NS6 a fraction of a second
    // to recognize the new IFrame
    setTimeout('callToServer()',50);
    return false;
  }
  
  if (IFrameObj.contentDocument) {
    // For NS6
    IFrameDoc = IFrameObj.contentDocument; 
  } else if (IFrameObj.contentWindow) {
    // For IE5.5 and IE6
    IFrameDoc = IFrameObj.contentWindow.document;
  } else if (IFrameObj.document) {
    // For IE5
    IFrameDoc = IFrameObj.document;
  } else {
    return true;
  }
  
  IFrameDoc.location.replace(URL);
  return false;
}

var IFrameObj; // our IFrame object
function callToServerX(theFormName, URL, id) { //this is the version of the function called by comment editor forms (JW only)
  
  subPrep=function () {
	  	//these three lines are the only change
  		theForm = document.forms[theFormName];
  		var newCommentText = getEditorValue ('NewComment' + id + '');
  		theForm.elements['NewCommentTEXT'].value='' + newCommentText + '';
  }
  
  if (!document.createElement) {return true};
  var IFrameDoc;
  URL = URL + buildQueryString(theFormName);
  if (!IFrameObj && document.createElement) {
    // create the IFrame and assign a reference to the
    // object to our global variable IFrameObj.
    // this will only happen the first time 
    // callToServer() is called
   try {
      var tempIFrame=document.createElement('iframe');
      tempIFrame.setAttribute('id','RSIFrame');
      tempIFrame.style.border='0px';
      tempIFrame.style.width='0px';
      tempIFrame.style.height='0px';
      IFrameObj = document.body.appendChild(tempIFrame);
      
      if (document.frames) {
        // this is for IE5 Mac, because it will only
        // allow access to the document object
        // of the IFrame if we access it through
        // the document.frames array
        IFrameObj = document.frames['RSIFrame'];
      }
    } catch(exception) {
      // This is for IE5 PC, which does not allow dynamic creation
      // and manipulation of an iframe object. Instead, we'll fake
      // it up by creating our own objects.
      iframeHTML='\<iframe id="RSIFrame" style="';
      iframeHTML+='border:0px;';
      iframeHTML+='width:0px;';
      iframeHTML+='height:0px;';
      iframeHTML+='"><\/iframe>';
      document.body.innerHTML+=iframeHTML;
      IFrameObj = new Object();
      IFrameObj.document = new Object();
      IFrameObj.document.location = new Object();
      IFrameObj.document.location.iframe = document.getElementById('RSIFrame');
      IFrameObj.document.location.replace = function(location) {
        this.iframe.src = location;
      }
    }
  }
  
  if (navigator.userAgent.indexOf('Gecko') !=-1 && !IFrameObj.contentDocument) {
    // we have to give NS6 a fraction of a second
    // to recognize the new IFrame
    setTimeout('callToServer()',50);
    return false;
  }
  
  if (IFrameObj.contentDocument) {
    // For NS6
    IFrameDoc = IFrameObj.contentDocument; 
  } else if (IFrameObj.contentWindow) {
    // For IE5.5 and IE6
    IFrameDoc = IFrameObj.contentWindow.document;
  } else if (IFrameObj.document) {
    // For IE5
    IFrameDoc = IFrameObj.document;
  } else {
    return true;
  }
  
  IFrameDoc.location.replace(URL);
  return false;
}

function callToServer2(URL) { //this is the version of the function called by links and the initial onLoad
  if (!document.createElement) {return true};
  var IFrameDoc;
  var URL = URL;
  if (!IFrameObj && document.createElement) {
    // create the IFrame and assign a reference to the
    // object to our global variable IFrameObj.
    // this will only happen the first time 
    // callToServer() is called
   try {
      var tempIFrame=document.createElement('iframe');
      tempIFrame.setAttribute('id','RSIFrame');
      tempIFrame.style.border='0px';
      tempIFrame.style.width='0px';
      tempIFrame.style.height='0px';
      IFrameObj = document.body.appendChild(tempIFrame);
      
      if (document.frames) {
        // this is for IE5 Mac, because it will only
        // allow access to the document object
        // of the IFrame if we access it through
        // the document.frames array
        IFrameObj = document.frames['RSIFrame'];
      }
    } catch(exception) {
      // This is for IE5 PC, which does not allow dynamic creation
      // and manipulation of an iframe object. Instead, we'll fake
      // it up by creating our own objects.
      iframeHTML='\<iframe id="RSIFrame" style="';
      iframeHTML+='border:0px;';
      iframeHTML+='width:0px;';
      iframeHTML+='height:0px;';
      iframeHTML+='"><\/iframe>';
      document.body.innerHTML+=iframeHTML;
      IFrameObj = new Object();
      IFrameObj.document = new Object();
      IFrameObj.document.location = new Object();
      IFrameObj.document.location.iframe = document.getElementById('RSIFrame');
      IFrameObj.document.location.replace = function(location) {
        this.iframe.src = location;
      }
    }
  }
  
  if (navigator.userAgent.indexOf('Gecko') !=-1 && !IFrameObj.contentDocument) {
    // we have to give NS6 a fraction of a second
    // to recognize the new IFrame
    setTimeout('callToServer()',50);
    return false;
  }
  
  if (IFrameObj.contentDocument) {
    // For NS6
    IFrameDoc = IFrameObj.contentDocument; 
  } else if (IFrameObj.contentWindow) {
    // For IE5.5 and IE6
    IFrameDoc = IFrameObj.contentWindow.document;
  } else if (IFrameObj.document) {
    // For IE5
    IFrameDoc = IFrameObj.document;
  } else {
    return true;
  }
  
  IFrameDoc.location.replace(URL);
  return false;
}

function hideItem() {
  var theItemDiv = document.getElementById('theItem');
  theItemDiv.style.display = 'none';
  document.getElementById('hideLink').innerHTML="<a onclick='return showItem();' href='javascript:;' class='grayOutLink'>&rarr;Show full text</a>";
}

function showItem() {
  var theEssayDiv = document.getElementById('theItem');
  theEssayDiv.style.display = 'block';
  document.getElementById('hideLink').innerHTML="<a onclick='return hideItem();' href='javascript:;' class='grayOutLink'>&darr;Hide text</a><br><br>";
}

//THIS IS THE ONE THAT'S BEING USED!
function RefreshComments(comments) {
	document.getElementById('CommentsContainer').innerHTML="";
	document.getElementById('CommentsContainer').innerHTML="" + comments + "";
}

function RefreshAuthorDiv(box) {
	//document.getElementById('AuthorBoxContainer').innerHTML="";
	document.getElementById('AuthorBoxContainer').innerHTML="" + box + "";
}

function RefreshWelcomeBox(box) {
	//document.getElementById('AuthorBoxContainer').innerHTML="";
	document.getElementById('WelcomeContainer').innerHTML="" + box + "";
}

function RefreshImageBox(box) {
	//document.getElementById('AuthorBoxContainer').innerHTML="";
	document.getElementById('ImageBoxContainer').innerHTML="" + box + "";
}

function RefreshArchiveBox(box) {
	//document.getElementById('AuthorBoxContainer').innerHTML="";
	document.getElementById('ArchiveBoxContainer').innerHTML="" + box + "";
}

function RefreshLatestPosts(box) {
	//document.getElementById('AuthorBoxContainer').innerHTML="";
	document.getElementById('LatestPostsContainer').innerHTML="" + box + "";
}

function RefreshLatestJosh(box) {
	//document.getElementById('AuthorBoxContainer').innerHTML="";
	document.getElementById('LatestJoshContainer').innerHTML="" + box + "";
}

function RefreshLatestVids(box) {
	//document.getElementById('AuthorBoxContainer').innerHTML="";
	document.getElementById('LatestVideosContainer').innerHTML="" + box + "";
}

function RefreshTypeBox(box) {
	//document.getElementById('AuthorBoxContainer').innerHTML="";
	document.getElementById('LatestTypeContainer').innerHTML="" + box + "";
}

function RefreshAlmostNews(box) {
	//document.getElementById('AuthorBoxContainer').innerHTML="";
	document.getElementById('AlmostNewsContainer').innerHTML="" + box + "";
}

function RefreshAggBox(box) {
	//document.getElementById('AuthorBoxContainer').innerHTML="";
	document.getElementById('AggContainer').innerHTML="" + box + "";
}

function RefreshTwitterBox(box) {
	//document.getElementById('AuthorBoxContainer').innerHTML="";
	document.getElementById('TwitterContainer').innerHTML="" + box + "";
}

function RefreshLatestComments(box) {
	//document.getElementById('AuthorBoxContainer').innerHTML="";
	document.getElementById('LatestCommentsContainer').innerHTML="" + box + "";
}

function RefreshNowPlaying(box) {
	//document.getElementById('AuthorBoxContainer').innerHTML="";
	document.getElementById('NowPlayingContainer').innerHTML="" + box + "";
}

function RefreshWhosOnline(box) {
	//document.getElementById('AuthorBoxContainer').innerHTML="";
	document.getElementById('WhosOnlineContainer').innerHTML="" + box + "";
}

//THIS IS THE ONE THAT'S BEING USED!!
function CommentEditor(id, commentEditor) {
	var commentDiv = 'CommentArea' + id + '' ;
	var commentEditDiv = 'CommentEditArea' + id + '' ;
	document.getElementById('' + commentDiv + '').style.display = 'none';
	document.getElementById('' + commentEditDiv+ '').innerHTML="" + commentEditor + "";
}

function CancelCommentEditor(commentID) {
	var commentDiv = "CommentArea" + commentID + "";
	var commentEditDiv = "CommentEditArea" + commentID + "";
	document.getElementById('' + commentDiv + '').style.display = 'block';
	document.getElementById('' + commentEditDiv + '').innerHTML = '';
}

//THESE ARE FOR COMMENT EDIT IN IE ONLY
function CommentEditIE(commentID) {
	var commentDiv = "CommentArea" + commentID + "";
	var commentEditDiv = "CommentEditArea" + commentID + "";
	document.getElementById('' + commentDiv + '').style.display = 'none';
	document.getElementById('' + commentEditDiv + '').style.display = 'block';
}

function CancelCommentEditIE(commentID) {
	var commentDiv = "CommentArea" + commentID + "";
	var commentEditDiv = "CommentEditArea" + commentID + "";
	document.getElementById('' + commentDiv + '').style.display = 'block';
	document.getElementById('' + commentEditDiv + '').style.display = 'none';
}

/* DOESN'T WORK
function SetNewCommentValue(commentID) {
	var newCommentText = getEditorValue ('NewComment' + commentID + '');
	var FieldName = 'NewComment_TEXT' ;
	document.getElementById('' + FieldName + '').value = '' + newCommentText + '' ;
}*/

function EditSubmitPrep(id, theFormName) {
	theForm = document.forms[theFormName];
	var newCommentText = getEditorValue ('NewComment' + id + '');
	theForm.elements['NewCommentTEXT'].value='' + newCommentText + '';
}

function UpdateComment(commentID, commentText) {
	//commentText = unescape(commentText);
	var commentDiv = "CommentArea" + commentID + "";
	var commentEditDiv = "CommentEditArea" + commentID + "";
	document.getElementById('' + commentDiv + '').innerHTML = '' + commentText + '';
	document.getElementById('' + commentDiv + '').style.display = 'block';
	document.getElementById('' + commentEditDiv + '').innerHTML = '';
	document.getElementById('' + commentEditDiv + '').style.display = 'none';
}

function displayComics(page) {
	document.getElementById('comicPage').innerHTML="" + page + "";
}

function updateLatestComments(newLatestComments) {
	document.getElementById('latestDiv').innerHTML="" + newLatestComments + "";
}

function updateWhosOn(whosOnContent) {
	document.getElementById('whosonDiv').innerHTML="" + whosOnContent + "";
}

function updateNowPlaying(nowPlayingContent) {
	document.getElementById('nowPlayingDiv').innerHTML="" + nowPlayingContent + "";
}

function editComment(commentID) {
	var commentDiv = "CommentArea" + commentID + "";
	var commentEditDiv = "CommentEditArea" + commentID + "";
	document.getElementById('' + commentDiv + '').style.display = 'none';
	document.getElementById('' + commentEditDiv + '').style.display = 'block';
	
}

function cancelEditComment(commentID) {
	var commentDiv = "CommentArea" + commentID + "";
	var commentEditDiv = "CommentEditArea" + commentID + "";
	document.getElementById('' + commentDiv + '').style.display = 'block';
	document.getElementById('' + commentEditDiv + '').style.display = 'none';
}

/*function updateComment(commentID, commentText) {
	commentText = unescape(commentText);
	var theCommentDiv = "commentArea" + commentID + "";
	var theCommentEditDiv = "commentEditArea" + commentID + "";
	document.getElementById('' + theCommentEditDiv + '').style.display = 'none';
	document.getElementById('' + theCommentDiv + '').style.display = 'block';
	document.getElementById('' + theCommentDiv + '').innerHTML="" + commentText + "";
}*/

function QuoteComment2006(author, comment) {
	commentText = document.getElementById('CommentArea' + comment).innerHTML;
	boxText=getEditorValue ('Comment');
	newText= '' + boxText + '<blockquote><i>' + author + ' wrote:</i><br /><br />' + commentText + '</blockquote>&nbsp;';
	setEditorValue('Comment', newText); 
	setEditorFocus('Comment');
}

//THESE TWO FUNCTIONS MAKE THE QUOTE COMMENT FEATURE WORK!
function getEditorValue( instanceName ) {  
  // Get the editor instance that we want to interact with.
  var oEditor = FCKeditorAPI.GetInstance( instanceName ) ;
  // Get the editor contents as XHTML.
  return oEditor.GetXHTML( true ) ;  // "true" means you want it formatted.
}  

function setEditorValue( instanceName, text ) {  
  // Get the editor instance that we want to interact with.
  var oEditor = FCKeditorAPI.GetInstance( instanceName ) ;
  // Set the editor contents.
  oEditor.SetHTML( text ) ;
}  

function setEditorFocus( instanceName ) {  
  // Get the editor instance that we want to interact with.
  var oEditor = FCKeditorAPI.GetInstance( instanceName ) ;
  // Set the editor contents.
  oEditor.Focus() ;
}  

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
		if(el.style.display != "block"){ 
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}
//-->
function toggleAll(toggleBox) {
     var currForm = toggleBox.form;
     var isChecked = toggleBox.checked;
     for (var elementIdx=0; elementIdx<currForm.elements.length; elementIdx++) {
          if (currForm.elements[elementIdx].type == 'checkbox') {
              currForm.elements[elementIdx].checked = isChecked;
           }
     }
}
<!--
function SwitchButton(ButtonOff, ButtonOn){
	var OnDiv = "" + ButtonOn + "";
	document.getElementById('' + OnDiv + '').style.display = 'block';
	var OffDiv = "" + ButtonOff + "";
	document.getElementById('' + OffDiv + '').style.display = 'none';
}
//-->
<!--
function JustSoPicWindow(imageName,imageWidth,imageHeight,alt,bgcolor,hugger,hugMargin) {
// by E Michael Brandt of ValleyWebDesigns.com - Please leave these comments intact.
// version 3.0.4  

	if (bgcolor=="") {
		bgcolor="#FFFFFF";
	}
	var adj=10
	var w = screen.width;
	var h = screen.height;
	var byFactor=1;

	if(w<740){
	  var lift=0.90;
	}
	if(w>=740 & w<835){
	  var lift=0.91;
	}
	if(w>=835){
	  var lift=0.93;
	}
	if (imageWidth>w){	
	  byFactor = w / imageWidth;			
	  imageWidth = w;
	  imageHeight = imageHeight * byFactor;
	}
	if (imageHeight>h-adj){
	  byFactor = h / imageHeight;
	  imageWidth = (imageWidth * byFactor);
	  imageHeight = h; 
	}
	   
	var scrWidth = w-adj;
	var scrHeight = (h*lift)-adj;

	if (imageHeight>scrHeight){
  	  imageHeight=imageHeight*lift;
	  imageWidth=imageWidth*lift;
	}

	var posLeft=0;
	var posTop=0;

	if (hugger == "hug image"){
	  if (hugMargin == ""){
	    hugMargin = 0;
	  }
	  var scrHeightTemp = imageHeight - 0 + 2*hugMargin;
	  if (scrHeightTemp < scrHeight) {
		scrHeight = scrHeightTemp;
	  } 
	  var scrWidthTemp = imageWidth - 0 + 2*hugMargin;
	  if (scrWidthTemp < scrWidth) {
		scrWidth = scrWidthTemp;
	  }
	  
	  if (scrHeight<100){scrHeight=100;}
	  if (scrWidth<100){scrWidth=100;}

	  posTop =  ((h-(scrHeight/lift)-adj)/2);
	  posLeft = ((w-(scrWidth)-adj)/2);
 	}

	if (imageHeight > (h*lift)-adj || imageWidth > w-adj){
		imageHeight=imageHeight-adj;
		imageWidth=imageWidth-adj;
	}
	posTop = parseInt(posTop);
	posLeft = parseInt(posLeft);		
	scrWidth = parseInt(scrWidth); 
	scrHeight = parseInt(scrHeight);
	
	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("opera") != -1){
	  var args= new Array();
	  args[0]='parent';
	  args[1]=imageName;
	  var i ; document.MM_returnValue = false;
	  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
	} else {
	newWindow = window.open("vwd_justso.htm","newWindow","width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor='+bgcolor+' onBlur="self.close()" onClick="self.close()">');  
	newWindow.document.write('<table width='+imageWidth+' border="0" cellspacing="0" cellpadding="0" align="center" height='+scrHeight+' ><tr><td>');
	newWindow.document.write('<img src="'+imageName+'" width='+imageWidth+' height='+imageHeight+' alt="Click screen to close" >'); 
	newWindow.document.write('</td></tr></table></body></html>');
	newWindow.document.close();
	newWindow.focus();
	}
}
//-->
<!--
function copy_clip(meintext)
{
 if (window.clipboardData) 
   {
   
   // the IE-manier
   window.clipboardData.setData("Text", meintext);
   
   // waarschijnlijk niet de beste manier om Moz/NS te detecteren;
   // het is mij echter onbekend vanaf welke versie dit precies werkt:
   }
   else if (window.netscape) 
   { 
   
   // dit is belangrijk maar staat nergens duidelijk vermeld:
   // you have to sign the code to enable this, or see notes below 
   netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
   
   // maak een interface naar het clipboard
   var clip = Components.classes['@mozilla.org/widget/clipboard;1']
                 .createInstance(Components.interfaces.nsIClipboard);
   if (!clip) return;
   
   // maak een transferable
   var trans = Components.classes['@mozilla.org/widget/transferable;1']
                  .createInstance(Components.interfaces.nsITransferable);
   if (!trans) return;
   
   // specificeer wat voor soort data we op willen halen; text in dit geval
   trans.addDataFlavor('text/unicode');
   
   // om de data uit de transferable te halen hebben we 2 nieuwe objecten 
   // nodig om het in op te slaan
   var str = new Object();
   var len = new Object();
   
   var str = Components.classes["@mozilla.org/supports-string;1"]
                .createInstance(Components.interfaces.nsISupportsString);
   
   var copytext=meintext;
   
   str.data=copytext;
   
   trans.setTransferData("text/unicode",str,copytext.length*2);
   
   var clipid=Components.interfaces.nsIClipboard;
   
   if (!clip) return false;
   
   clip.setData(trans,null,clipid.kGlobalClipboard);
   
   }
   //alert("Following info was copied to your clipboard:\n\n" + meintext);
   return false;
}
//-->

