
function refreshObject(refreshType,urlPrefix,selectValue)	{
	location.href= urlPrefix + '/' + selectValue;
}


function closePopup() {
if (parent.myLightWindow)                 
{parent.myLightWindow.deactivate();}
else if (meervaart.test(document.referrer)) {history.back();}
else {location.href='./';}
}

function getHTTPObject() {
  var req;
  if(window.XMLHttpRequest) {
    try {
    	req = new XMLHttpRequest();
    } catch(e) {
    	req = false;
    }
  // branch for IE/Windows ActiveX version
  } else if(window.ActiveXObject) {
   	try {
    	req = new ActiveXObject("Msxml2.XMLHTTP");
  	} catch(e) {
    	try {
    		req = new ActiveXObject("Microsoft.XMLHTTP");
    	} catch(e) {
  		  req = false;
      }
    }
  }
  return req;		
}

	function showPicture(picture,title) {
		var thislink = '/pic.cfm?picture=' + picture + '&title=' + title;
			tempWin=window.open(thislink,"MVTicketBox","height=475,width=780,scrollbars=no,resize=no,status=yes")
		}
	
	
function deactiveerScroller()	{
		/* if (navigator.appName.indexOf("Microsoft") != -1) { 
		//window.voorstellingen.deactiveerScroller();
		}
		else {window.document.voorstellingen.deactiveerScroller();}
		*/
	}
	
function reactiveerScroller()	{
		/*
		if (navigator.appName.indexOf("Microsoft") != -1) {
		//window.voorstellingen.reactiveerScroller();
		}
		else {window.document.voorstellingen.reactiveerScroller();}
		*/
		}
	
	
function checkAvail()	{
	setTimeout('toggleBox("checkForm",0);toggleBox("confirmForm",1);',3000)
}
		
function doAjax(page,div) {
	if (!div)	{div = 'mediaInfoBox'}
	var contentDiv = document.getElementById(div);
	if (getAJAX.readyState == 4 || getAJAX.readyState == 0) { 
		
		getAJAX.open("GET", page, true);
        getAJAX.onreadystatechange = function () {
		if (getAJAX.readyState == 4)
    	   contentDiv.innerHTML = getAJAX.responseText;
     	}
  		getAJAX.send(null);

    }
}


function displayShow(item)	{
	if (!parent.myLightWindow)	{
		setTimeout ('displayShow(\'+item+\')', 50)
	}
	else	{
	myLightWindow.activateWindow(
		{
		href: './theater/popup.cfm/voorstellingen/'+item,
		type: 'external', width: '718px', height: '450px'
		}
	); 
	//return false;
}
}


function openLightWindow(url)	{
	if (!myLightWindow)	{
		setTimeout ('openLightWindow(\''+url+'\')', 50)
	}
	else	{
	myLightWindow.activateWindow(
		{
		href: url,
		type: 'external', width: '718px', height: '450px'
		}
	); 
	//return false;
}
}

function openSplash(url)	{
	if (!myLightWindow)	{
		setTimeout ('openSplash(\''+url+'\')', 50)
	}
	else	{
	myLightWindow.activateWindow(
		{
		href: url,
		type: 'external', width: '637px', height: '450px'
		}
	); 
	//return false;
}
}



function displayPage(url)	{
	if (!parent.myLightWindow)	{
		setTimeout ("displayPage('"+url+"')", 50)
	}
	else	{
	myLightWindow.activateWindow(
		{
		href: url,
		type: 'external', width: '718px', height: '450px'
		}
	); 
	return false;
}
}



function doSignup(email)	{
	myLightWindow.activateWindow(
		{
		href: './theater/popup.cfm/nieuwsbrief/?email='+email,
		type: 'external', width: '718px', height: '450px'
		}
	); 
	return false;
}

function doCheckout(id,ks)	{
	showSoft(id,ks);
	// location.href='./theater/popup.cfm/bestellen/bestellen/'
	/* parent.myLightWindow.activateWindow(
		{
		href: './theater/showsoft.cfm?id='+id,
		type: 'external', width: '800px', height: '600px'
		}
	); */
	return false;
}

function newsletterfocus(value)	{
	if ((value =='uw e-mail adres') || (value =='your e-mail address') || (value =='e-mail address'))	document.newsletterform.email.value = '';
}

function newsletterblur(value)	{
	if (value =='')	document.newsletterform.email.value = 'uw e-mail adres';
}

function doSearch(what)	{
	myLightWindow.activateWindow(
		{
		href: './theater/popup.cfm/voorstellingen?zoekstring='+what,
		type: 'external', width: '718px', height: '450px'
		}
	); 
	return false;
}

function doInfoSearch(what)	{
	myLightWindow.activateWindow(
		{
		href: './theater/popup.cfm/infozoekresultaten?zoekstring='+what,
		type: 'external', width: '718px', height: '450px'
		}
	); 
	return false;
}

function validateValues(what) {
    if (!what.agree.checked)
      {  alert('Please read and agree to our Terms and Conditions'); return false }
	  else {return true;}
}



function showSlides(which, where) {
	  whichflash = './swf/slideshows/'+which+'.swf'
    var so = new SWFObject(whichflash, "flashslideshow", "420", "315", "8.0.23", "##", true); 
  	so.addParam("wmode", "transparent");
	  so.write(where);
}

function updateVisual(newimage,status) {
	document.mainvisual.src=newimage;
	toggleBox('laddervisualsubcontainer',status) ;
}



function updateContent(div,desc) {
	var popobj=document.all? document.all[div] : document.getElementById? document.getElementById(div) : ""
	if (popobj)	popobj.innerHTML= desc;
}


function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    	{ document.layers[szDivID].visibility = iState ? "show" : "hide";}
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    	{	var obj = document.getElementById(szDivID); obj.style.visibility = iState ? "visible" : "hidden";}
    else if(document.all)	// IE 4
    	{ document.all[szDivID].style.visibility = iState ? "visible" : "hidden";}
}

function showSoft(id,ks)	{window.open("/theater/showsoft.cfm?id="+id+"&ks="+ks, "deMeervaartShowSoft", "width=800,height=600");}

function showRoute()	{window.open("/route.html", "deMeervaartRoute", "width=693,height=546");}
function printRoute()	{window.open("/printroute.html", "deMeervaartRoute", "width=693,height=546");}

function showPrint(page)	{window.open(page, "deMeervaartPrint", "width=720,height=546");}

function showOrderform()	{
	window.open("bestelformulier.html", "MeervaartBestelFormulier", "width=780,height=550,scrollbars=yes");
}


function addbookmark(title,url){
    
    if (window.sidebar) window.sidebar.addPanel(title, url,"");

    else if( window.opera && window.print )
    {
    var mbm = document.createElement('a');
    mbm.setAttribute('rel','sidebar');
    mbm.setAttribute('href',url);
    mbm.setAttribute('title',title);
    mbm.click();
    }

    else if( document.all ) window.external.AddFavorite( url, title);

}

function doPrint() {
	if (window.print){window.print();}
	else {alert("U kunt deze pagina afdrukken d.m.v. de toetsencombinatie Apple+P")}
	}

var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}

	
