/*
BEGIN -- openPopup
---------------------------------------------------------------------------------------------------------------------------------
aanroepen van dit script gebeurt op de volgende manier:
href="normaleurl.html" onclick="return openPopup(this.href,800,600, 1, 1, 1, 1, 1, 1);"

openPopup(url, width, height, location, menubar, resizable, scrollbars, status, toolbar)
---------------------------------------------------------------------------------------------------------------------------------
*/
function openPopup(i, width, height, location, menubar, resizable, scrollbars, status, toolbar) {
	window.open(i, 'popup', 'width='+width+',height='+height+',location='+location+',menubar='+menubar+',resizable='+resizable+',scrollbars='+scrollbars+',status='+status+',toolbar='+toolbar);
	return false;
}
/*
END -- openPopup
*/

/* findObj function */
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;
}
/* end - findObj function */


/* ANWB bereken route function */
/*
	Deze functie is geschreven door André Hoogendam, op 25 januari 2004.
	Op deze functie berust een copyright &copy;2004.

UITLEG >>
	Deze functie heeft alleen als invoer een input nodig, met een postcode als waarde.
	Voorbeeld functieaanroep:
		onclick="ANWBroutePlanner(document.forms['routeform'].pc1.value)"
	
*/
function ANWBroutePlanner(postcode) {
	theURL = 'http://anwb.tms.tensingsks.com/tms/scripts/tgigw.dll?countryid1=Nederland&amp;country2=Nederland&amp;seltype1=1&amp;seltype2=1&amp;pc2=6732+BL&amp;straat1=&amp;straat2=&amp;plaats1=&amp;plaats2=Harskamp&amp;poicatid1=-1&amp;poicatid2=-1&amp;poiplaats1=&amp;poiplaats2=&amp;poi1=&amp;poi2=&amp;countryid2=0&amp;plaatsid2=67320&amp;CONFIG=ANWB&amp;REDIRURL=http%3A%2F%2Fanwb.tms.tensingsks.com%2Ftms%2Fscripts%2Ftgigw.dll%3FAPP%3DTMS%26CMD%3DROUTE%26OUTPUT%3DHTML%26&amp;CMD=RESOLVE2&amp;ACTION=1&amp;APP=resolve&amp;CONTENT_TYPE=application%2Fx-www-form-urlencoded&amp;RMODE=FAST&amp;rmode=fast&amp;pc1=';
	RedirectURL = theURL + postcode;
	if (postcode == '') {
		alert('Er is geen postcode ingevuld. Vult u deze alstublieft in.');
		return false;
	} else {
		openPopup(RedirectURL, 750, 550, 0, 0, 1, 1, 0, 1);
		return false;
	}
}
/* end ANWB bereken route function */
