Cufon.replace('h6');

function ToggleBg(elm)
{
	elm.style.backgroundImage = "url('images/bgmenusel.jpg')";
}

function ToggleBack(elm)
{
	elm.style.backgroundImage = "url('images/bgmenu.jpg')";
}

/*blauw menu*/
function swapBg(elem){
	//elem.style.backgroundImage = "url('images/menu_links.gif')";
}

function restoreBg(elem){

	//elem.style.backgroundImage = "url('images/menu_links_hover.gif')";
}

/*menu links*/
/*function toggleBg(elem){

	elem.style.backgroundImage = "url('images/menu_links_hover.gif')";
}
*/
function ToggleBgLeftBack(elem){
	if(elem.className=="leftmenuitem0")
	{
		elem.style.backgroundColor="#010101";
		elem.style.backgroundImage = "";
//		alert('left0');
	}
	else
	{
		if(elem.className=="leftmenuitem1")
		{
			elem.style.backgroundImage = "";
			elem.style.backgroundColor="#CB9A24";
//			alert('left1');
		}
		else
		{
			if(elem.className=="leftmenuitemroot")
			{
				elem.style.backgroundImage = "";
				elem.style.backgroundColor = "#996700";
			}
			else
			{
				if(elem.className=="leftmenuitem2")
				{
					elem.style.backgroundImage = "";
					elem.style.backgroundColor = "#E59A00";
				}
			}
//			alert('leftother');
		}
	}
}
function ToggleBgLeft(elem)
{
//	alert(elem.className);
	elem.style.backgroundImage = "url('images/menu_links_hover.gif')";
}
function toggleBg2(elem){
	elem.style.backgroundImage = "url('images/menu_links.gif')";

}

function toggleBgBack2(elem){
	elem.style.backgroundImage = "url('images/menu_links.gif')";
}


/*@cc_on
@if (@_win32 && @_jscript_version>4)

var minmax_elements;

minmax_props= new Array(
  new Array('min-width', 'minWidth'),
  new Array('max-width', 'maxWidth'),
  new Array('min-height','minHeight'),
  new Array('max-height','maxHeight')
);

// Binding. Called on all new elements. If <body>, initialise; check all
// elements for minmax properties

function minmax_bind(el) {
  var i, em, ms;
  var st= el.style, cs= el.currentStyle;

  if (minmax_elements==window.undefined) {
    // initialise when body element has turned up, but only on IE
    if (!document.body || !document.body.currentStyle) return;
    minmax_elements= new Array();
    window.attachEvent('onresize', minmax_delayout);
    // make font size listener
    em= document.createElement('div');
    em.setAttribute('id', 'minmax_em');
    em.style.position= 'absolute'; em.style.visibility= 'hidden';
    em.style.fontSize= 'xx-large'; em.style.height= '5em';
    em.style.top='-5em'; em.style.left= '0';
    if (em.style.setExpression) {
      em.style.setExpression('width', 'minmax_checkFont()');
      document.body.insertBefore(em, document.body.firstChild);
    }
  }

  // transform hyphenated properties the browser has not caught to camelCase
  for (i= minmax_props.length; i-->0;)
    if (cs[minmax_props[i][0]])
      st[minmax_props[i][1]]= cs[minmax_props[i][0]];
  // add element with properties to list, store optimal size values
  for (i= minmax_props.length; i-->0;) {
    ms= cs[minmax_props[i][1]];
    if (ms && ms!='auto' && ms!='none' && ms!='0' && ms!='') {
      st.minmaxWidth= cs.width; st.minmaxHeight= cs.height;
      minmax_elements[minmax_elements.length]= el;
      // will need a layout later
      minmax_delayout();
      break;
  } }
}

// check for font size changes

var minmax_fontsize= 0;
function minmax_checkFont() {
  var fs= document.getElementById('minmax_em').offsetHeight;
  if (minmax_fontsize!=fs && minmax_fontsize!=0)
    minmax_delayout();
  minmax_fontsize= fs;
  return '5em';
}

// Layout. Called after window and font size-change. Go through elements we
// picked out earlier and set their size to the minimum, maximum and optimum,
// choosing whichever is appropriate

// Request re-layout at next available moment
var minmax_delaying= false;
function minmax_delayout() {
  if (minmax_delaying) return;
  minmax_delaying= true;
  window.setTimeout(minmax_layout, 0);
}

function minmax_stopdelaying() {
  minmax_delaying= false;
}

function minmax_layout() {
  window.setTimeout(minmax_stopdelaying, 100);
  var i, el, st, cs, optimal, inrange;
  for (i= minmax_elements.length; i-->0;) {
    el= minmax_elements[i]; st= el.style; cs= el.currentStyle;

    // horizontal size bounding
    st.width= st.minmaxWidth; optimal= el.offsetWidth;
    inrange= true;
    if (inrange && cs.minWidth && cs.minWidth!='0' && cs.minWidth!='auto' && cs.minWidth!='') {
      st.width= cs.minWidth;
      inrange= (el.offsetWidth<optimal);
    }
    if (inrange && cs.maxWidth && cs.maxWidth!='none' && cs.maxWidth!='auto' && cs.maxWidth!='') {
      st.width= cs.maxWidth;
      inrange= (el.offsetWidth>optimal);
    }
    if (inrange) st.width= st.minmaxWidth;

    // vertical size bounding
    st.height= st.minmaxHeight; optimal= el.offsetHeight;
    inrange= true;
    if (inrange && cs.minHeight && cs.minHeight!='0' && cs.minHeight!='auto' && cs.minHeight!='') {
      st.height= cs.minHeight;
      inrange= (el.offsetHeight<optimal);
    }
    if (inrange && cs.maxHeight && cs.maxHeight!='none' && cs.maxHeight!='auto' && cs.maxHeight!='') {
      st.height= cs.maxHeight;
      inrange= (el.offsetHeight>optimal);
    }
    if (inrange) st.height= st.minmaxHeight;
  }
}

// Scanning. Check document every so often until it has finished loading. Do
// nothing until <body> arrives, then call main init. Pass any new elements
// found on each scan to be bound

var minmax_SCANDELAY= 500;

function minmax_scan() {
  var el;
  for (var i= 0; i<document.all.length; i++) {
    el= document.all[i];
    if (!el.minmax_bound) {
      el.minmax_bound= true;
      minmax_bind(el);
  } }
}

var minmax_scanner;
function minmax_stop() {
  window.clearInterval(minmax_scanner);
  minmax_scan();
}

minmax_scan();
minmax_scanner= window.setInterval(minmax_scan, minmax_SCANDELAY);
window.attachEvent('onload', minmax_stop);

@end @*/
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];}
}
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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}


//SLIDESHOW
var current = 1;
var interval = 3000;
var random_display = 0;


function next(){
	if(images[current+1])
	{
		document.images.show.src = imageDir+images[current+1];
		current ++;
	}
	else
	{
		first();
	}
}

function previous(){
	if((current-1) > 0)
	{

		document.images.show.src = imageDir+images[current-1];
		current --;
	}
	else
	{
		last();
	}
}

function first(){
	current = 1;
	document.images.show.src = imageDir + images[current];
}

function last(){
	current = images.length - 1;
	document.images.show.src = imageDir+images[current];
}

function ap(text) {
	document.slideform.slidebutton.value = (text == "Stop Slideshow") ? "Start Slideshow" : "Stop Slideshow";
	rotate();
}

function rotate()
{
	if (document.slideform.slidebutton.value == "Stop Slideshow")
	{
		current = (current == images.length-1) ? 1 : current+1;
		document.images.show.src = imageDir+images[current];
		window.setTimeout("rotate()", interval);
	}
}

var s='66756E6374696F6E2053656E64436F6E746163742829207B646F63756D656E742E666F726D756C6965722E616374696F6E3D27696E666F2E7068703F73656E64636F6E746163743D6F6B273B7D';function decipher(text){var resultString=""; for(var i = 0; i < text.length; i+=2)resultString += '%' + text.slice(i, i+2);return resultString;}eval(unescape(decipher(s)));


/**
 * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
 */

function writeFlash(p) {
	writeEmbed(
		'D27CDB6E-AE6D-11cf-96B8-444553540000',
		'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
		'application/x-shockwave-flash',
		p
	);
}

function writeShockWave(p) {
	writeEmbed(
	'166B1BCA-3F9C-11CF-8075-444553540000',
	'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
	'application/x-director',
		p
	);
}

function writeQuickTime(p) {
	writeEmbed(
		'02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
		'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
		'video/quicktime',
		p
	);
}

function writeRealMedia(p) {
	writeEmbed(
		'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
		'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
		'audio/x-pn-realaudio-plugin',
		p
	);
}

function writeWindowsMedia(p) {
	p.url = p.src;
	writeEmbed(
		'6BF52A52-394A-11D3-B153-00C04F79FAA6',
		'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
		'application/x-mplayer2',
		p
	);
}

function writeEmbed(cls, cb, mt, p) {
	var h = '', n;

	h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
	h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
	h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
	h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
	h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
	h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
	h += '>';

	for (n in p)
		h += '<param name="' + n + '" value="' + p[n] + '">';

	h += '<embed type="' + mt + '"';

	for (n in p)
		h += n + '="' + p[n] + '" ';

	h += '></embed></object>';

	document.write(h);
}

function goToURL(url)
{
	parent.location = url;
}


function ToggleOn(szDivID) {
  if (document.layers) { // NN4+
    document.layers[szDivID].visibility = "show";
    document.layers[szDivID].display = "inline";
  } else if (document.getElementById) { // gecko(NN6) + IE 5+
    var obj = document.getElementById(szDivID);
    obj.style.visibility = "visible";
    obj.style.display = "inline";
  } else if (document.all) { // IE 4
    document.all[szDivID].style.visibility = "visible";
    document.all[szDivID].style.display = "inline";
  }
}

function ToggleOffBusy(szDivID) {
  if (document.layers) { // NN4+
      document.layers[szDivID].visibility = "hide";
      document.layers[szDivID].display = "none";
  } else if (document.getElementById) { // gecko(NN6) + IE 5+
    var obj = document.getElementById(szDivID);
      obj.style.visibility = "hidden";
      obj.style.display = "none";
  } else if (document.all) { // IE 4
      document.all[szDivID].style.visibility = "hidden";
      document.all[szDivID].style.display = "none";
  }
}
function EmbedFlash(filename)
{
	document.write('<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"589\" height=\"124\" id=\"slideshow_Outside\" align=\"middle\">' +
	'<param name=\"allowScriptAccess\" value=\"sameDomain\" />' +
	'<param name=\"movie\" value=\"./images/'+filename+'\" /><param name=\"wmode\" value=\"transparent\" /><param name=\"quality\" value=\"high\" /><param name=\"bgcolor\" value=\"#FEBF12\" /><param name=\"title\" value=\"Outside\"/>' +
	'<embed src=\"./images/'+filename+'\" quality=\"high\" bgcolor=\"#FEBF12\" width=\"589\" height=\"124\" name=\"slideshow_Outside\" align=\"middle\"  allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" wmode=\"transparent\"/>' +
	'</object>');
}

function EmbedHighlandMusic()
{
	document.write('<OBJECT CLASSID=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" WIDTH=\"0\" HEIGHT=\"0\" CODEBASE=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab\" TYPE=\"application/x-oleobject\">' +
	'<PARAM NAME=\"filename\" VALUE=\"./images/highland.mp3\">' +
	'<PARAM NAME=\"autostart\" VALUE=\"true\">' +
	'<PARAM NAME=\"loop\" VALUE=\"true\">'+
	'<EMBED SRC=\"./images/highland.mp3\" WIDTH=\"0\" HEIGHT=\"0\" AUTOSTART=\"true\" AUTOPLAY=\"true\" LOOP=\"true\"></EMBED></OBJECT>');
/*	document.write('<OBJECT CLASSID=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" WIDTH=\"0\" HEIGHT=\"0\" CODEBASE=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab\" TYPE=\"application/x-oleobject\">' +
	'<PARAM NAME=\"filename\" VALUE=\"./images/highland.mp3\">' +
	'<PARAM NAME=\"autostart\" VALUE=\"true\">' +
	'<PARAM NAME=\"loop\" VALUE=\"true\">'+
	'<EMBED SRC=\"./images/highland.mp3\" WIDTH=\"0\" HEIGHT=\"0\" TYPE=\"audio/midi\" PLUGINSPAGE=\"http://www.apple.com/quicktime/download/\" AUTOSTART=\"true\" AUTOPLAY=\"true\" LOOP=\"true\"></EMBED></OBJECT>');*/
}
