function movr(src) {
src.style.background= '#cedae1';
src.style.border= '1px solid #197ad2';
src.style.color='#000000';
}
function mout(src) {
src.style.background = '#FFFFFF';
src.style.border= '1px solid #ccccce';
src.style.color='#000000';
}

function movr2(src) {
src.style.background= '#FFFFFF';
src.style.cursor = 'pointer';
}
function mout2(src) {
src.style.background= '#f5fbfe';
src.style.cursor = 'default';
}

function movrtr(src,clrOver) {
src.style.cursor = 'pointer';
src.bgColor= clrOver;
}
function mouttr(src,clrIn) {
src.style.cursor = 'default';
src.bgColor= clrIn;
}

function movrtr2(src,clrOver) {
src.style.cursor = 'pointer';
src.style.background= clrOver;
}
function mouttr2(src,clrIn) {
src.style.cursor = 'default';
src.style.background= clrIn;
}

function movrtr3(src) {
src.style.cursor = 'pointer';
src.style.background= "#FFFFFF";
}
function mouttr3(src) {
src.style.cursor = 'default';
src.style.background= "";
}

function checkroute1(){
	if (document.flymask.ART[0].checked == true){
		document.getElementById('flybackframe').style.display="block";
	}
	if (document.flymask.ART[1].checked == true){
		document.getElementById('flybackframe').style.display="none";
	}
}
function checkroute2(){
		if (document.flymask.ART[0].checked == true){
		document.getElementById('flybackframe').style.width="230px";
		document.getElementById('flybackframe').style.visibility="visible";
		document.getElementById('flybackframe').style.overflow="visible";
		
	}
	if (document.flymask.ART[1].checked == true){
		document.getElementById('flybackframe').style.visibility="hidden";
		document.getElementById('flybackframe').style.overflow="hidden";
		document.getElementById('flybackframe').style.width="5px";
	}
}

function checkdates(field){
var hintag="";
var hinmonat="";
var zurtag="";
var zurmonat="";

hintag=document.flymask.flytodateday.options[document.flymask.flytodateday.selectedIndex].value;
hinmonat=document.flymask.flytodatemonth.options[document.flymask.flytodatemonth.selectedIndex].value;
zurtag=document.flymask.flybackdateday.options[document.flymask.flybackdateday.selectedIndex].value;
zurmonat=document.flymask.flybackdatemonth.options[document.flymask.flybackdatemonth.selectedIndex].value;


var dhin=hinmonat.split(".");
var dzur=zurmonat.split(".");
var d1datum=new Date(parseInt(dhin[1],10),(parseInt(dhin[0],10)-1),hintag,0,0,0);
var d1time=Date.parse(d1datum);
var d2datum=new Date(parseInt(dzur[1],10),(parseInt(dzur[0],10)-1),zurtag,0,0,0);
var d2time=Date.parse(d2datum);


if (field==1){
if (parseInt(d2time,10)-parseInt(d1time,10)<=0){
	var d3time=parseInt(d1time+86400000,10);
	var d3datum=new Date(d3time);
	var tagneu=d3datum.getDate();
	var monatneu=d3datum.getMonth();
	var jahrneu=d3datum.getFullYear();
	var selectstatus1=false;
	var selectstatus2=false;
	
	
	if (tagneu<10){tagneu="0"+tagneu;}
	monatneu++;
	if (monatneu<10){monatneu="0"+monatneu;}
	
	var valuemonat=monatneu+"."+jahrneu;
	
	for (h=0;h<document.flymask.flybackdateday.length;h++){
		if (document.flymask.flybackdateday.options[h].value==tagneu){
			document.flymask.flybackdateday.options[h].selected=true;
			selectstatus1=true;
		}
	}
	for (k=0;k<document.flymask.flybackdatemonth.length;k++){
		if (document.flymask.flybackdatemonth.options[k].value==valuemonat){
			document.flymask.flybackdatemonth.options[k].selected=true;
			selectstatus2=true;
		}
	}
	if (selectstatus1==false || selectstatus2==false){
		document.flymask.flybackdateday.options[h-1].selected=true;
		document.flymask.flybackdatemonth.options[k-1].selected=true;
	}
		
	
}
}
if (field==2){
if (parseInt(d2time,10)-parseInt(d1time,10)<=0){
	var d3time=parseInt(d2time-86400000,10);
	var d3datum=new Date(d3time);
	var tagneu=d3datum.getDate();
	var monatneu=d3datum.getMonth();
	var jahrneu=d3datum.getFullYear();
	
	if (tagneu<10){tagneu="0"+tagneu;}
	monatneu++;
	if (monatneu<10){monatneu="0"+monatneu;}
	
	var valuemonat=monatneu+"."+jahrneu;
	
	for (h=0;h<document.flymask.flytodateday.length;h++){
		if (document.flymask.flytodateday.options[h].value==tagneu){
			document.flymask.flytodateday.options[h].selected=true;
		}
	}
	for (h=0;h<document.flymask.flytodatemonth.length;h++){
		if (document.flymask.flytodatemonth.options[h].value==valuemonat){
			document.flymask.flytodatemonth.options[h].selected=true;
		}
	}
}
}
}