// Browsercheck - IE oder NN
nn=document.layers
ie=document.all
function Loading_verstecken(){
 if(ie || nn){
  if(nn)
   document.waitDiv.visibility="hidden"
  else
   waitDiv.style.visibility="hidden"
 }
}

var __win = null;
function NewWindow(mypage,myname,w,h,scroll,resize){
//newWidth = parseInt((w * screen.width)/100);
//newHeight = parseInt((h * screen.height)/100);
newWidth = w;
newHeight = h;
    LeftPosition = (screen.width) ? (screen.width-newWidth)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-newHeight)/2 : 0;
    settings = 'height='+newHeight+',width='+newWidth+',top='+TopPosition+',left='+LeftPosition+'';
    if(scroll)
       settings = settings+',scrollbars='+scroll+'';
    if(resize)
       settings = settings+',resizable='+resize+'';
    __win = window.open(mypage,myname,settings)
}

function GalileoWindow(mypage,myname,w,h,scroll,resize){
//newWidth = parseInt((w * screen.width)/100);
//newHeight = parseInt((h * screen.height)/100);
newWidth = 900;
newHeight = 800;
    LeftPosition = (screen.width) ? (screen.width-newWidth)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-newHeight)/2 : 0;
    settings = 'height='+newHeight+',width='+newWidth+',top='+TopPosition+',left='+LeftPosition+', menubar=yes,toolbar=YES,statusbar=no,resizable=yes, ,scrollbars=yes';
//    if(scroll)
//       settings = settings+',scrollbars='+scroll+'';
//    if(resize)
//       settings = settings+',resizable='+resize+'';
    __win = window.open(mypage,myname,settings);
}

function popup(indice,w,h){
	var openWindow = self.open(indice,"","left=100,top=100,width="+w+",height="+h+",menubar=yes,toolbar=no,statusbar=no,resizable=yes");
}


function mOvr1(src,clrOver) {
		src.style.cursor = 'default';
		src.bgColor = clrOver;
}
function mOvr(src,clrOver) {
		src.style.cursor = 'hand';
		src.bgColor = clrOver;
}
function mOut(src,clrIn) {
		src.style.cursor = 'default';
		src.bgColor = clrIn;
}
function mURL(theURL,winName) {
  window.open(theURL,winName);
}


function daychange(dayvalue)
{
var str=new String();
str1=document.all('tr1_1').value;
str2=document.all('tr1_2').value;
str3=document.all('tr1_3').value;

var newd=new Date(str2 + '/'+str1+'/'+str3)
newd=addDays(newd,dayvalue);
var ay;
ay=newd.getMonth()+1;
var gun=newd.getDate();
var a=new String();
if(a<10)
	ay='0' + ''+ ay;
else
	ay=ay;
if(gun<10)
	gun='0' + newd.getDate();
else
	gun=newd.getDate();
document.all('tr2_1').value=gun+'.'+ ay +'.'+newd.getFullYear();
document.all('tr2_2').value=ay+'.'+ ay +'.'+newd.getFullYear();
document.all('tr2_3').value=newd.getFullYear();
}


function checktime(s) {
	if ( s.value.length == 1 )
		if (s.value > 0 && s.value < 10)
			s.value = "0" + s.value + ":00"			
	if ( s.value.length == 2 )
		if (s.value > 0 && s.value < 24) 
			s.value = s.value + ":00"		
	if ( s.value.length == 4 )
		if (s.value > 0 && s.value < 10000) 
			s.value = s.value.substr(0, 2) + ":" + s.value.substr(2, 2)			
}

<!--
function set_preis(erw_preis,chd_preis,inf_preis, tax_preis,erw_zahl, chd_zahl, inf_zahl, art, wert,sc_preis,anz_rec)
{
     var erw_preis1=0;	
     var erw_preis2=0;	
     var chd_preis1=0;	
     var chd_preis2=0;	
     var inf_preis1=0;	
     var inf_preis2=0;

     var erstezahl, zweitezahl, ergebnis;

	document.all.ERW_Z.innerHTML ="";
	document.all.CHD_Z.innerHTML ="";
	document.all.INF_Z.innerHTML ="";
	document.all.ERW_ZR.innerHTML ="";
	document.all.CHD_ZR.innerHTML ="";
	document.all.INF_ZR.innerHTML ="";

	if (erw_zahl>0 ) { document.all.ERW_Z.innerHTML =erw_zahl+" X";}
	if (chd_zahl>0 ) { document.all.CHD_Z.innerHTML =chd_zahl+" X";}
	if (inf_zahl>0 ) { document.all.INF_Z.innerHTML =inf_zahl+" X";}

	if (erw_zahl>0 ) { document.all.ERW_ZR.innerHTML =erw_zahl+" X";}
	if (chd_zahl>0 ) { document.all.CHD_ZR.innerHTML =chd_zahl+" X";}
	if (inf_zahl>0 ) { document.all.INF_ZR.innerHTML =inf_zahl+" X";}

//	ges_zahl=erw_zahl+chd_zahl+inf_zahl;
	ges_zahl=erw_zahl+chd_zahl;

	if (art==1 ) {
// Hinreise
	document.all.fl_recno1[wert].checked=true;
    var zeilennr=0;
	for (i=0;i<anz_rec;i++){
		var idwerthin="hin"+i;
		var rowto=document.getElementById(idwerthin);
		if (zeilennr == 0) 
		   {
  		   rowto.style.background="#FFFFFF";
		   zeilennr=1;
		   }	
		else
 		   {
			rowto.style.background="#f7f7f7";
		   zeilennr=0;
  		   }
	}	 
	
	var idwerthin="hin"+wert;
	rowto=document.getElementById(idwerthin);
	rowto.style.background="#6699cc";

	 erw_preis=Number(erw_preis);
	 sc_preis=Number(sc_preis);



     var erw_preis1=erw_zahl*erw_preis;	

	 ges_zahl=erw_zahl+chd_zahl;

	 chd_preis=Number(chd_preis);
     var chd_preis1=chd_zahl*chd_preis;	

	 var tax_preis1=ges_zahl*tax_preis;	
	 var tax_preis_net =tax_preis-sc_preis;	
	 var tax_preis1_net=ges_zahl*(tax_preis-sc_preis);	

	 var sc_preis1 =ges_zahl*sc_preis;	

	 inf_preis=Number(inf_preis);
     var inf_preis1=inf_zahl*inf_preis;	
	 if (erw_zahl>0 ) { 
	    document.all.ERW_H_PREIS.innerHTML = erw_preis.toFixed(2)+"  ="; 
	    document.all.ERW_GH_PREIS.innerHTML = erw_preis1.toFixed(2)+" &euro;"; 
		}
	 if (chd_zahl>0 ) { 
	    document.all.CHD_H_PREIS.innerHTML  = chd_preis.toFixed(2)+"  =";
	    document.all.CHD_GH_PREIS.innerHTML = chd_preis1.toFixed(2)+" &euro;";
		}
	 if (inf_zahl>0 ) { 
	    document.all.INF_H_PREIS.innerHTML = inf_preis.toFixed(2)+"  =";
	    document.all.INF_GH_PREIS.innerHTML = inf_preis1.toFixed(2)+" &euro;";
		}
	
	
	document.all.TAX_Z.innerHTML =ges_zahl+" X";
	document.all.TAX_H_PREIS.innerHTML    = tax_preis_net.toFixed(2)+"  ="; 
	document.all.TAX_GH_PREIS.innerHTML   = tax_preis1_net.toFixed(2)+" &euro;"; 

	document.all.SC_Z.innerHTML =ges_zahl+" X";
    document.all.SC_H_PREIS.innerHTML      = sc_preis.toFixed(2)+"  ="; 
	document.all.SC_GH_PREIS.innerHTML     = sc_preis1.toFixed(2)+" &euro;"; 

 	ges_hp=(ges_zahl*tax_preis)+erw_preis1+chd_preis1+inf_preis1;
	document.all.GES_H_PREIS.innerHTML = ges_hp.toFixed(2)+" &euro;";
	document.all.SUMME_HIN.value=ges_hp.toFixed(2);

//	ges_zahl=erw_zahl+chd_zahl+inf_zahl;

	}

	if (art==2 ) {
// Rückreise	
	document.all.fl_recno2[wert].checked=true;
    var zeilennr=0;
	for (i=0;i<anz_rec;i++){
		var idwerthin="rck"+i;
		var rowto=document.getElementById(idwerthin);
		if (zeilennr == 0) 
		   {
  		   rowto.style.background="#FFFFFF";
		   zeilennr=1;
		   }	
		else
 		   {
			rowto.style.background="#f7f7f7";
		   zeilennr=0;
  		   }
	}	 
	 
	
	var idwerthin="rck"+wert;
	rowto=document.getElementById(idwerthin);
	rowto.style.background="#6699cc";


	 erw_preis=Number(erw_preis);
     var erw_preis2=erw_zahl*erw_preis;	
	 sc_preis=Number(sc_preis);


	 chd_preis=Number(chd_preis);
     var chd_preis2=chd_zahl*chd_preis;	

	 inf_preis=Number(inf_preis);
     var inf_preis2=inf_zahl*inf_preis;

	 var tax_preis2=ges_zahl*tax_preis;	
	 var tax_preis_net =tax_preis-sc_preis;	
	 var tax_preis2_net=ges_zahl*(tax_preis-sc_preis);
	
	 var sc_preis2 =ges_zahl*sc_preis;
	 
	   if (erw_zahl>0 ) { 
	      document.all.ERW_R_PREIS.innerHTML  = erw_preis.toFixed(2)+"  ="; 
	      document.all.ERW_GR_PREIS.innerHTML = erw_preis2.toFixed(2)+" &euro;"; 
		  }
	   if (chd_zahl>0 ) { 
	      document.all.CHD_R_PREIS.innerHTML  = chd_preis.toFixed(2)+"  =" ; 
	      document.all.CHD_GR_PREIS.innerHTML = chd_preis2.toFixed(2)+" &euro;"; 
		  }
	   if (inf_zahl>0 ) { 
	      document.all.INF_R_PREIS.innerHTML  = inf_preis.toFixed(2)+"  ="; 
	      document.all.INF_GR_PREIS.innerHTML = inf_preis2.toFixed(2)+" &euro;"; 
		  }
 	  document.all.TAX_ZR.innerHTML =ges_zahl+" X";
	  document.all.TAX_R_PREIS.innerHTML      = tax_preis_net.toFixed(2)+"  ="; 
	  document.all.TAX_GR_PREIS.innerHTML     = tax_preis2_net.toFixed(2)+" &euro;"; 

 	  document.all.SC_ZR.innerHTML =ges_zahl+" X";
	  document.all.SC_R_PREIS.innerHTML      = sc_preis.toFixed(2)+"  ="; 
	  document.all.SC_GR_PREIS.innerHTML     = sc_preis2.toFixed(2)+" &euro;"; 

 	  ges_hr=(ges_zahl*tax_preis)+erw_preis2+chd_preis2+inf_preis2;
	  document.all.GES_R_PREIS.innerHTML = ges_hr.toFixed(2)+" &euro;";
	 document.all.SUMME_RUCK.value=ges_hr.toFixed(2);

	}


erstezahl=document.all.SUMME_HIN.value;
erstezahl=eval(erstezahl);
zweitezahl=document.all.SUMME_RUCK.value;
zweitezahl=eval(zweitezahl);
ergebnis=erstezahl+zweitezahl;
document.all.SUMME_TOTAL.innerHTML=ergebnis.toFixed(2)+" &euro;"; 


//	ERW_P = Number(document.all.ERW_GH_PREIS.innerHTML)+Number(document.all.ERW_GR_PREIS.innerHTML);
//	document.all.ERW_PREIS.innerHTML = ERW_P.toFixed(2);
	
//	CHD_P = Number(document.all.CHD_GH_PREIS.innerHTML)+Number(document.all.CHD_GR_PREIS.innerHTML;
//	document.all.CHD_PREIS.innerHTML = CHD_P.toFixed(2);
	
//	INF_P = Number(document.all.INF_GH_PREIS.innerHTML)+Number(document.all.INF_GR_PREIS.innerHTML);
//	document.all.INF_PREIS.innerHTML = INF_P.toFixed(2);
	
//	TAX_P = Number(document.all.TAX_GH_PREIS.innerHTML)+Number(document.all.TAX_GR_PREIS.innerHTML);
//	document.all.TAX_PREIS.innerHTML = TAX_P.toFixed(2);
	
//	GES_P = Number(document.all.GES_H_PREIS.innerHTML)+Number(document.all.GES_R_PREIS.innerHTML);
//	document.all.GES_PREIS.innerHTML = GES_P.toFixed(2);
	
	
}


