function planRoute(){
	location.href = controller + "?action=1";
}

function findLocation(){
	location.href = controller + "?action=10";
}

function newRoute(){
	location.href = controller + "?action=1";
}

function nextRoute(){
	location.href = controller + "?action=6";
}

function reverseRoute(){
	location.href = controller + "?action=2";
}

function changeRoute(){
	location.href = controller + "?action=8";
}

function printRoute(view){
  url = controller + "?action=7&view=" + view;
  win = window.open(url, 'RoutePrint', "toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,width=750,height=460" );
  win.focus();
}

function getTrafficInfoCode()
{
  var sURL;
  if (domestic && usingHighway){
    sURL = 'http://code.mobiel.anwb.nl/routecodeprint.asp';
    sURL += '?resx1=' + Math.round(x1 * (10368.0 / 10419.0));
    sURL += '&resy1=' + Math.round(y1 * (10368.0 / 10419.0));
    sURL += '&resx2=' + Math.round(x2 * (10368.0 / 10419.0));
    sURL += '&resy2=' + Math.round(y2 * (10368.0 / 10419.0));
    sURL += '&type=' + pmode;
    window.frames['ifTrafficInfoCode'].location.href = sURL;
  }
}

function getSend2Mobile()
{
  var sURL;
  sURL = '/rp/send2mobile.jsp';
  sURL += '?depx=' + x1;
  sURL += '&depy=' + y1;
  sURL += '&arrx=' + x2;
  sURL += '&arry=' + y2;
  window.frames['ifSend2Mobile'].location.href = sURL;
}

function smsInfoPresent()
{
	try
	{
		if ( window.frames['ifTrafficInfoCode'].document.body.innerHTML == '' )
		{
			document.getElementById( 'divTrafficInfo' ).style.visibility = 'hidden';
		}
		else
		{
			document.getElementById( 'divTrafficInfo' ).style.visibility = 'visible';
		}
	}
	catch(e)
	{
		document.getElementById( 'divTrafficInfo' ).style.visibility = 'visible';
	}
}

