function editRoute(theURL) { //v2.0
  // bepaal nu het centrum
  var twin;
  
 
  features='scrollbars=yes,toolbars=no,status=no';
  
 // w = (screen.width -40);
  //h = (screen.height -30)
  w = 1024 - 20;
  h = 768 - 30;

  mleft = (screen.width - w) / 2;
 	 mtop = (screen.height - h) / 2;

    features = features + ',top=' + mtop + ',left=' + mleft + ',width=' + w + ',height=' + h ;

 
 
  twin = window.open(theURL,"win_edit_foute",features);
  twin.focus();
}

function favRoute(theURL)
{
	
		
	
		
		var twin;
  
 
  features='scrollbars=yes,toolbars=no,status=no';
  
  w = 400;
  h = 300;

  mleft = (screen.width - w) / 2;
 	 mtop = (screen.height - h) / 2;

    features = features + ',top=' + mtop + ',left=' + mleft + ',width=' + w + ',height=' + h ;

 
 
  twin = window.open(theURL,"route_action",features);
  twin.focus();
		
		
	
}

function printRoute(theURL) { //v2.0
  // bepaal nu het centrum
  var twin;
  
 
  features='scrollbars=yes,toolbars=no,status=no';
  
 // w = (screen.width -40);
  //h = (screen.height -30)
  w = 1024 - 20;
  h = 768 - 30;

  mleft = (screen.width - w) / 2;
 	 mtop = (screen.height - h) / 2;

    features = features + ',top=' + mtop + ',left=' + mleft + ',width=' + w + ',height=' + h ;

 
 
  twin = window.open(theURL,"win_print_foute",features);
  twin.focus();
}

function group_member_try(theURL) { //v2.0
  // bepaal nu het centrum
  var twin;
  
 
  features='scrollbars=auto,toolbars=no,status=no';
  
  w = 400;
  h = 300;

  mleft = (screen.width - w) / 2;
 	 mtop = (screen.height - h) / 2;

    features = features + ',top=' + mtop + ',left=' + mleft + ',width=' + w + ',height=' + h ;

 
 
  twin = window.open(theURL,"win_member_try",features);
  twin.focus();
}

function uploadLogo(theURL) { //v2.0
  // bepaal nu het centrum
  var twin;
  
 
  features='scrollbars=auto,toolbars=no,status=no';
  
  w = 400;
  h = 300;

  mleft = (screen.width - w) / 2;
 	 mtop = (screen.height - h) / 2;

    features = features + ',top=' + mtop + ',left=' + mleft + ',width=' + w + ',height=' + h ;

 
 
  twin = window.open(theURL,"upload_logo",features);
  twin.focus();
}



function group_action(theURL) { //v2.0
  // bepaal nu het centrum
  var twin;
  
 
  features='scrollbars=auto,toolbars=no,status=no';
  
  w = 400;
  h = 300;

  mleft = (screen.width - w) / 2;
 	 mtop = (screen.height - h) / 2;

    features = features + ',top=' + mtop + ',left=' + mleft + ',width=' + w + ',height=' + h ;

 
 
  twin = window.open(theURL,"group_action",features);
  twin.focus();
}


function removeRoute(id, group_id)
{
	
	verder = confirm("Deze route echt verwijderen?")
	
	if (verder == true)
	{
		document.location.href="index.php?action=remove_route&route_id=" + id + "&group_id=" + group_id;
	}
}



function deelbaarRoute(id,group_id, deel)
{
	if (deel == true)
	{
		
		verder = confirm("Deze route mag gekopieerd worden?")
	}
	else
	{
		
		verder = confirm("Deze route mag niet gekopieerd worden?")
	}
	
	
	if (verder == true)
	{
		if (deel == true)
		{
		document.location.href="index.php?action=deel_route&value=Y&route_id=" + id + "&group_id=" + group_id;
		}
		else
		{
		document.location.href="index.php?action=deel_route&value=N&route_id=" + id + "&group_id=" + group_id;
		}
		
	}
}


function maakpubliekRoute(id,group_id, deel)
{
	if (deel == true)
	{
		
		verder = confirm("Deze route publiek zichtbaar maken?")
	}
	else
	{
		
		verder = confirm("Deze route niet-publiek zichtbaar maken?")
	}
	
	
	if (verder == true)
	{
		if (deel == true)
		{
		document.location.href="index.php?action=maakpubliek_route&value=Y&route_id=" + id + "&group_id=" + group_id;
		}
		else
		{
		document.location.href="index.php?action=maakpubliek_route&value=N&route_id=" + id + "&group_id=" + group_id;
		}
		
	}
}


function downloadbaarRoute(id,group_id, deel)
{
	if (deel == true)
	{
		
		verder = confirm("Deze route downloadbaar maken?")
	}
	else
	{
		
		verder = confirm("Deze route niet laten downloaden?")
	}
	
	
	if (verder == true)
	{
		if (deel == true)
		{
		document.location.href="index.php?action=downloadbaar_route&value=Y&route_id=" + id + "&group_id=" + group_id;
		}
		else
		{
		document.location.href="index.php?action=downloadbaar_route&value=N&route_id=" + id + "&group_id=" + group_id;
		}
		
	}
}

function copyRoute(id, home)
{
	var theurl;
		
		verder = confirm("Deze route naar uw profiel kopiëren ?")
	
	
	
	if (verder == true)
	{
		
		
		
		 var twin;
  
 
  features='scrollbars=yes,toolbars=no,status=no';
  
  w = 400;
  h = 300;

  mleft = (screen.width - w) / 2;
 	 mtop = (screen.height - h) / 2;

    features = features + ',top=' + mtop + ',left=' + mleft + ',width=' + w + ',height=' + h ;

  if (home != null)
  {
	  theurl = "public/route_builder/index.php?action=copy&route_id=" + id;
  }
  else
  {
	 theurl = "../route_builder/index.php?action=copy&route_id=" + id; 
  }
  
  twin = window.open(theurl,"route_action",features);
  twin.focus();
		
		
	}
}



function remove_group_news(id,tab)
{
	verder = confirm("Dit nieuwsbericht echt verwijderen?")
	
	if (verder == true)
	{
		document.location.href="../news/index.php?action=remove_group_news&news_id=" + id +"&tab="+tab;

	}
}

function remove_group_agenda(id,tab)
{
	verder = confirm("Dit agendapunt echt verwijderen?")
	
	if (verder == true)
	{
		document.location.href="../agenda/index.php?action=remove_group_agenda&agenda_id=" + id +"&tab="+tab;

	}
}


function update_group_news(id){ //v2.0
  // bepaal nu het centrum
  var twin;
  
 
  features='scrollbars=yes,toolbars=no,status=no';
  
  w = 800;
  h = 400;

  mleft = (screen.width - w) / 2;
 	 mtop = (screen.height - h) / 2;

    features = features + ',top=' + mtop + ',left=' + mleft + ',width=' + w + ',height=' + h ;

 
 
  twin = window.open("../news/index.php?action=group_news_update&news_id=" + id,"news_action",features);
  twin.focus();
}

function update_group_agenda(id){ //v2.0
  // bepaal nu het centrum
  var twin;
  
 
  features='scrollbars=yes,toolbars=no,status=no';
  
  w = 800;
  h = 400;

  mleft = (screen.width - w) / 2;
 	 mtop = (screen.height - h) / 2;

    features = features + ',top=' + mtop + ',left=' + mleft + ',width=' + w + ',height=' + h ;

 
 
  twin = window.open("../agenda/index.php?action=group_agenda_update&agenda_id=" + id,"agenda_action",features);
  twin.focus();
}