

/*
function CloseWebsite()
{
	return;

	var loc = String(i.contentWindow.document.location);
	if(loc!=null)
	{
		if(loc.indexOf('user.aspx')>0){
			if (window.event.clientX < 0 && window.event.clientY < 0)
			{
				window.open("http://www.vertrekpunt.nl/webfront/forms/", "Questions", "width:400,height:600");
	 		}
		}
	}
}
*/

theObjects = document.getElementsByTagName("object");
for (var i = 0; i < theObjects.length; i++) { theObjects[i].outerHTML = theObjects[i].outerHTML; }

document.domain="vertrekpunt.nl";



function buildOptionsMenu(){

	var o = document.getElementById('traveloptions');
	var i = document.getElementById('iframeresult');
	var loc = String(i.contentWindow.document.location);	

	if(o){
	
		if(loc.indexOf('details.aspx')>0){
			viewAcco();
		}
	}
	
	var i = document.getElementById('bookinginfoBox');	
	var z = document.getElementById('searchBox');
	var b = document.getElementById('adviceBox');
	var s = document.getElementById('sacont');
	var v = document.getElementById('vicont');	
	var r = document.getElementById('inforequest');
	
	//if(b)b.style.display = 'block';
	if(s)s.style.display = 'block';
	if(i)i.style.display = 'none';	
	if(r)s.style.display = 'block';
	if(v)v.style.display = 'block';
	if(z)z.style.display = 'block';
	if(o)o.style.display = 'block';

	//if(loc.indexOf('price.aspx')>0)if(b)b.style.display = 'none';
	//if(loc.indexOf('price.aspx')>0)if(s)s.style.display = 'none';	
	if(loc.indexOf('user.aspx')>0)if(b)
	{
		b.innerHTML = "<a href='http://livechat.boldchat.com/aid/3225878549337557591/bc.chat?cwdid=2523417250394561357&amp;vr=&amp;vn=&amp;vi=&amp;ve=&amp;vp=&amp;iq=&amp;curl=' target='_blank' onClick='this.newWindow = window.open('http://livechat.boldchat.com/aid/3225878549337557591/bc.chat?cwdid=2523417250394561357&amp;vr=&amp;vn=&amp;vi=&amp;ve=&amp;vp=&amp;iq=&amp;curl=&amp;url=' + escape(document.location.href), 'Chat1135019171995521306', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=640,height=480');this.newWindow.focus();this.newWindow.opener=window;return false;'><img alt='Live chat by BoldChat' src='http://cbi.boldchat.com/aid/3225878549337557591/bc.cbi?cbdid=4139182829323568221' border='0' /></a>";
	}
	else
	{
		b.innerHTML = "<a href='http://livechat.boldchat.com/aid/3225878549337557591/bc.chat?cwdid=2523417250394561357&amp;vr=&amp;vn=&amp;vi=&amp;ve=&amp;vp=&amp;iq=' target='_blank'><img alt='Live chat by Boldchat' src='http://cbi.boldchat.com/aid/3225878549337557591/bc.cbi?cbdid=231913870014077020' border='0'></a>";
	}
	
	if(loc.indexOf('user.aspx')>0)if(o)o.style.display = 'none';	
	if(loc.indexOf('user.aspx')>0)if(v)v.style.display = 'none';	
	if(loc.indexOf('user.aspx')>0)if(s)s.style.display = 'none';
	if(loc.indexOf('user.aspx')>0)if(r)r.style.display = 'none';
	if(loc.indexOf('user.aspx')>0)if(z){z.style.display = 'none';}
	if(loc.indexOf('user.aspx')>0)if(i){i.style.display = 'block';}	
	
	

}



function getProperties(){var i = document.getElementById('iframeresult');}



function printAcco(){
	
	var i = document.getElementById('iframeresult');
	var locurl = String(i.contentWindow.document.location);
	
	if(locurl.indexOf('details.aspx')>0){
		var locarray  = locurl.split("?");
		locurl = "http://www.vertrekpunt.nl/sync/printacco.aspx?print=true&" + locarray[1];
		window.open(locurl);
	}else{
		i.contentWindow.print();
	}
}



function addBookmark(){
	
	var i = document.getElementById('iframeresult');
	var locurl = String(i.contentWindow.document.location);
	var locarray  = locurl.split("?");
	
	locurl = "http://www.vertrekpunt.nl/webfront/base.asp?" + locarray[1];
	locurl += "&osadcampaign=bookmark";
	addtit = i.contentWindow.document.title;
	
	if (window.sidebar) { 
		window.sidebar.addPanel(addtit, locurl, '');
	} else if( window.external ) { 
		window.external.AddFavorite(locurl, addtit); 
	} else if(window.opera && window.print) { 
	return true; 
	}
				  
}






function showImagePopUp(strImageUrl){
	window.open("image.asp?img="+strImageUrl,"ImagePopUp",'width=200,height=200,location=no,toolbar=no,scrollbars=no,resizable=no,left=100,top=100');
}

function printPage(PageId){
	window.open("base.asp?print=true&pageid=" + PageId);
}

function setSearchHeight(vHeight){
	document.getElementById("searchFrame").height = vHeight;
}

function doTop(){
	return true;
	//document.getElementById('iframeresult').location="#top";	
}

function setHeight(){

	var d = document.getElementById('loading');
	var i = document.getElementById('iframeresult');
	var height = i.contentWindow.document.body.scrollHeight;
	if(document.all){
		i.height =  height + 260;
	}else{
		i.height =  height + 260;
	}
	
	window.scrollTo(0,0);
	var parentDiv = document.getElementById('contentArea');
	var childDiv = document.getElementById('loading');
	if(childDiv)parentDiv.removeChild(childDiv);
	
	buildOptionsMenu();
	
	
}

function setFrameHeight(){
	
	if(document.all){
		
		document.getElementById("formFrame").height = formFrame.document.getElementById("mainDiv").offsetHeight;
	}else{
		document.getElementById("formFrame").height = formFrame.document.getElementById("mainDiv").offsetHeight + 20;
	}
	
	buildOptionsMenu();
		
	
}

function PopPrivacy(){
	var x = (screen.width  / 2) - 190;
	var y = (screen.height / 2) - 116;
	window.open('../priv_pop.asp','Privacy','width=380,height=232,location=no,toolbar=no,scrollbars=no,resizable=no,left='+x+',top='+y+'');
}

function checkNewsLetterForm(){
	if(document.getElementById("VoorNaam").value=="Voornaam"||document.getElementById("VoorNaam").value==""){
		alert("Naam is een verplicht veld");
		document.getElementById("VoorNaam").focus();
		return false
	}
	if(document.getElementById("AchterNaam").value=="Achternaam"||document.getElementById("AchterNaam").value==""){
		alert("Achternaam is een verplicht veld");
		document.getElementById("AchterNaam").focus();
		return false
	}
	if(document.getElementById("EmailAdres").value=="Email adres"||document.getElementById("EmailAdres").value==""){
		alert("E-mail is een verplicht veld");
		document.getElementById("EmailAdres").focus();
		return false
	}
	var str=document.getElementById("EmailAdres");
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	if (!filter.test(str.value)){
		alert("\"" + str.value + "\" is geen geldig email adres!");
		str.focus();
		return false;
	}
	return true;
}

function setIFR(){
	if(typeof sIFR == "function"){
		//(sSelector, sFlashSrc, sColor, sLinkColor, sHoverColor, sBgColor, nPaddingTop, nPaddingRight, nPaddingBottom, nPaddingLeft, sFlashVars, sCase, sWmode);
		sIFR.replaceElement(named({sSelector:"#searchBox h1", 	sFlashSrc:"http://www.vertrekpunt.nl/webfront/swf/vp.swf", sColor:"#ffffff", sWmode:"transparent"}));
		sIFR.replaceElement(named({sSelector:"#adviceBox h1", 	sFlashSrc:"http://www.vertrekpunt.nl/webfront/swf/vp.swf", sColor:"#ffffff", sWmode:"transparent"}));
		sIFR.replaceElement(named({sSelector:"#headerBox h1", 	sFlashSrc:"http://www.vertrekpunt.nl/webfront/swf/vp.swf", sColor:"#ffffff", sWmode:"transparent"}));
		sIFR.replaceElement(named({sSelector:"#sfeerArea h1", 	sFlashSrc:"http://www.vertrekpunt.nl/webfront/swf/vp.swf", sColor:"#e30a73", sWmode:"transparent"}));
		sIFR.replaceElement(named({sSelector:"#contentArea h1", sFlashSrc:"http://www.vertrekpunt.nl/webfront/swf/vp.swf", sColor:"#e30a73", sWmode:"transparent"}));
		sIFR.replaceElement(named({sSelector:".pinkBox h1", 	sFlashSrc:"http://www.vertrekpunt.nl/webfront/swf/vp.swf", sColor:"#ffffff", sWmode:"transparent"}));
		sIFR.replaceElement(named({sSelector:".yellowBox h1", 	sFlashSrc:"http://www.vertrekpunt.nl/webfront/swf/vp.swf", sColor:"#ffffff", sWmode:"transparent"}));
		sIFR.replaceElement(named({sSelector:".blueBox h1", 	sFlashSrc:"http://www.vertrekpunt.nl/webfront/swf/vp.swf", sColor:"#ffffff", sWmode:"transparent"}));
		sIFR.replaceElement(named({sSelector:".grayBox h1", 	sFlashSrc:"http://www.vertrekpunt.nl/webfront/swf/vp.swf", sColor:"#e30a73", sWmode:"transparent"}));
		sIFR.replaceElement(named({sSelector:".pinkTable h1", 	sFlashSrc:"http://www.vertrekpunt.nl/webfront/swf/vp.swf", sColor:"#ffffff", sWmode:"transparent"}));
		sIFR.replaceElement(named({sSelector:".yellowTable h1",	sFlashSrc:"http://www.vertrekpunt.nl/webfront/swf/vp.swf", sColor:"#ffffff", sWmode:"transparent"}));
		sIFR.replaceElement(named({sSelector:".blueTable h1", 	sFlashSrc:"http://www.vertrekpunt.nl/webfront/swf/vp.swf", sColor:"#ffffff", sWmode:"transparent"}));
		sIFR.replaceElement(named({sSelector:".grayTable h1", 	sFlashSrc:"http://www.vertrekpunt.nl/webfront/swf/vp.swf", sColor:"#e30a73", sWmode:"transparent"}));
		sIFR.replaceElement(named({sSelector:"h1", 				sFlashSrc:"http://www.vertrekpunt.nl/webfront/swf/vp.swf", sColor:"#e30a73", sWmode:"transparent"}));
	}
}

/** EXTERN FRAME ***************************************************************************************************************/

// Check if it's an Internet Explorer browser
// returns a boolean
function isIE()
{
	
    return (navigator.userAgent.indexOf("MSIE") != -1);
}

// Check if it's a Netscape / Mozilla browser
// returns a boolean
function isNS()
{
    return ((navigator.userAgent.indexOf("Mozilla") != -1) &&
        (navigator.userAgent.indexOf("Gecko") != -1));
}


//function calcIFrameHeight(){
//    // Set the header height for all browsers.
//    var headerHeight = 137; //126=headerheight
//    
//    // Set the header for Mozilla if necessary.
//    /*if (isNS()){
//     headerHeight = 145; //126=headerheight 
//    }*/
//    
//    var the_height;
//    
//    // check if the document runs in strict mode
//    if (document.compatMode=="CSS1Compat"){
//        the_height = document.documentElement.clientHeight - headerHeight;
//    }else{
//        // find the height of the internal page
//        the_height = document.body.clientHeight - headerHeight;
//    }
//    
//    // check if the the_iframe element exists
//    if (document.getElementById('the_iframe')){
//        // check wether to use internet explorer or mozilla DOM
//        /*if (isNS()){
//            // change the height of the iframe.
//            document.getElementById('the_iframe').height = the_height;
//        }else{*/
//            document.getElementById('the_iframe').style.height = the_height;
//        //}
//    }
//}
 
// calculates and sets the new height for the Affiliate iframe
function calcAffiliateIFrameHeight(){
  var theHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    theHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    theHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    theHeight = document.body.clientHeight;
  }
  
  //subtract other header / footer / etc.
  
  /*theHeight = theHeight - 228;
    if (document.getElementById('the_affiliate_iframe'))
    {
        // check wether to use internet explorer or mozilla DOM
        if (isNS())
        {
            // change the height of the iframe.
            document.getElementById('the_affiliate_iframe').height = theHeight;
        }
        else
        {
            document.getElementById('the_affiliate_iframe').style.height = theHeight;
        }
    }*/
 
}

function placeBoldChat(){
	document.getElementById("adviceBox").innerHTML = "<a href='http://livechat.boldchat.com/aid/3225878549337557591/bc.chat?cwdid=2523417250394561357&amp;vr=&amp;vn=&amp;vi=&amp;ve=&amp;vp=&amp;iq=' target='_blank'><img alt='Live chat by Boldchat' src='http://cbi.boldchat.com/aid/3225878549337557591/bc.cbi?cbdid=231913870014077020' border='0'></a>";
}

function OneStat_Pageview()
{
    var d=document;
    var sid="365682";
    var CONTENTSECTION="";
    var osp_ACTION="";
    var osp_TRANSACTION="";
    var osp_AMOUNT="";
    var osp_PRODUCTCODE="";
    var osp_PRODUCTGROUP="";
    var osp_ADCAMPAIGN="";
    var osp_CUSTOMER="";
    var osp_CUST0 = "";
    var osp_CUST1 = "";
    var osp_CUST2 = "";
    var osp_CUST3 = "";
    var osp_CUST10 = "";
    var osp_CUST11 = "";
    var osp_URL=d.URL;
    var osp_Title=d.title;
    var t=new Date();
    var p="http"+(d.URL.indexOf('https:')==0?'s':'')+"://stat.onestat.com/stat.aspx?tagver=2&sid="+sid;
    p+="&url="+escape(osp_URL);
    p+="&ti="+escape(osp_Title);
    p+="&section="+escape(CONTENTSECTION);
    p+="&cma="+escape(osp_ACTION);
    p+="&cmt="+escape(osp_TRANSACTION);
    p+="&cmm="+escape(osp_AMOUNT);
    p+="&cmp="+escape(osp_PRODUCTCODE);
    p+="&cmg="+escape(osp_PRODUCTGROUP);
    p+="&cmad="+escape(osp_ADCAMPAIGN);
    p+="&cmc="+escape(osp_CUSTOMER);
    p+="&cu0="+escape(osp_CUST0);
    p+="&cu1="+escape(osp_CUST1);
    p+="&cu2="+escape(osp_CUST2);
    p+="&cu3="+escape(osp_CUST3);
    p+="&cu10="+escape(osp_CUST10);
    p+="&cu11="+escape(osp_CUST11);
    p+="&rf="+escape(parent==self?document.referrer:top.document.referrer);
    p+="&tz="+escape(t.getTimezoneOffset());
    p+="&ch="+escape(t.getHours());
    p+="&js=1";
    p+="&ul="+escape(navigator.appName=="Netscape"?navigator.language:navigator.userLanguage);
    if(osp_URL!=d.URL) p+="&ol="+escape(d.URL);
    if(typeof(screen)=="object"){
       p+="&sr="+screen.width+"x"+screen.height;p+="&cd="+screen.colorDepth;
       p+="&jo="+(navigator.javaEnabled()?"Yes":"No");
    }
    d.write('<img id="ONESTAT_TAG" border="0" width="1" height="1" src="'+p+'" >');
}

var dbug =0; 
function d_a(ary) {
	var beg = next_entry(ary) - 1; 
	for (var i = beg ; i > -1; i--) {ary[i] = null;}
} 

function init_array() {
	if (dbug) alert('init_cookie');  
	var ary = new Array(null); 
	return ary;
}

function set_cookie(name,value,expires) {
	if (dbug) alert('set_cookie'); 
	if (!expires) expires = new Date();
	document.cookie = name + '=' + escape(value) + '; expires=' + expires.toGMTString() + '; path=/'; 
} 

function get_cookie(name) {
	if (dbug) alert('get_cookie'); 
	var dcookie = document.cookie; 
	var cname = name + "="; 
	var clen = dcookie.length;
	var cbegin = 0; 
	while (cbegin < clen) {
		var vbegin = cbegin + cname.length;
		if (dcookie.substring(cbegin, vbegin) == cname) {
			var vend = dcookie.indexOf (";", vbegin); 
			if (vend == -1) vend = clen; 
			return unescape(dcookie.substring(vbegin, vend));
		} 
		
		cbegin = dcookie.indexOf(" ", cbegin) + 1; 
		if (cbegin == 0) break;
	} 
	return null;
	} 
	
function del_cookie(name) {
	if (dbug) alert('del_cookie');
	document.cookie = name + '=' + '; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/';
} 

function get_array(name, ary) {
	if (dbug) alert('get_array'); d_a(ary); 
	var ent = get_cookie(name); 
	if (ent) {
	i = 1; 
		while (ent.indexOf('^') != '-1') {
		ary[i] = ent.substring(0,ent.indexOf('^')); i++;
		ent = ent.substring(ent.indexOf('^')+1, ent.length);
		}
	}
}

function set_array(name, ary, expires) {
	if (dbug) alert('set_array');
	var value = ''; 
	for (var i = 1; ary[i]; i++) {
		value += ary[i] + '^';
	} 
	set_cookie(name, value, expires);
}

function del_entry(name, ary, pos, expires) {
	if (dbug) alert('del_entry');
	var value = ''; 
	get_array(name, ary); 
	for (var i = 1; i < pos; i++) {
		value += ary[i] + '^';
	} 
	for (var j = pos + 1; ary[j]; j++) 
	{
		value += ary[j] + '^';
	}
	
	set_cookie(name, value, expires);
}


function next_entry(ary) {
	if (dbug) alert('next_entry'); var j = 0;
	for (var i = 1; ary[i]; i++) {j = i} return j + 1;
}

function dump_cookies() {
	if (document.cookie == '') document.write('No Cookies Found'); 
	else {
		thisCookie = document.cookie.split('; '); 
		for (i=0; i<thisCookie.length; i++)
		{
			document.write(thisCookie[i] + '<br \/>');
		}
	}
}