//JS ver. 09.12.2011   ####################################################
//##############################################################################

layer_index_array = new Array();
var layer_index=-1;

//VK-----------------------------------------------------------------------------
function layer_h_w(){
	   tmp_id_f = tmp_id + "_f";
	   frame_location=document.getElementById(tmp_id_f).contentWindow.location.href;
	   if(frame_location=="about:blank") return;
	 //### PROG SPERRE ########################
        for(i=0; i < prog_sperre.length; i++)
        {
         	if(frame_location.indexOf(prog_sperre[i])>0)
         	{
         	  view_alert(msg_prog_sperre_w,msg_prog_sperre);
         	  return;
         	}

        }
    //##################################################################
    
    if(ie) var h_minus_mozilla = 0; else var h_minus_mozilla = 40;
    	
    //##################################################################
        
     if(frame_location.indexOf("impressum")>0) layer_view(500,480);
     else if(frame_location.indexOf("about-bre")>0) layer_view(720,641);
	 else if(frame_location.indexOf("gruppentour_silvester")>0) layer_view(3100,850);
	 else if(frame_location.indexOf("programm_gt_M_109_02")>0) layer_view(5000,850);
     else if(frame_location.indexOf("programm_gt_MSW_98_27_03")>0) layer_view(5400,850);
     else if(frame_location.indexOf("programm_gt_MSW_98_03")>0) layer_view(5100,850);
     else if(frame_location.indexOf("programm_gt_M_98_27_03")>0) layer_view(5000,850);
     else if(frame_location.indexOf("programm_gt_MSW_87_28_04")>0) layer_view(5100,850);
     else if(frame_location.indexOf("programm_gt_MSW_87_04")>0) layer_view(4600,850);
     else if(frame_location.indexOf("programm_gt_M_87_27_04")>0) layer_view(4600,850);
 	 else if(frame_location.indexOf("programm_gt_M_87_02")>0) layer_view(4600,850);
	 else if(frame_location.indexOf("programm_gt_M_87_03")>0) layer_view(4600,850);
     else if(frame_location.indexOf("programm_gt_M_76_27_04")>0) layer_view(4200,850);
     else if(frame_location.indexOf("programm_gt_M_65_27_04")>0) layer_view(3700,850);
     else if(frame_location.indexOf("programm_gt_M_54_27_04")>0) layer_view(3300,850);
     else if(frame_location.indexOf("muenchen_silvesterprogramm")>0) layer_view(2100,850);
     else if(frame_location.indexOf("koeln_silvesterprogramm")>0) layer_view(1000,850);
     else if(frame_location.indexOf("hamburg_silvesterprogramm")>0) layer_view(1100,850);
     else if(frame_location.indexOf("berlin_silvesterprogramm")>0) layer_view(1100,850);
     else if(frame_location.indexOf("Gruppentour_Hamburg_87")>0) layer_view(2700,850);
     else if(frame_location.indexOf("Gruppentour_Berlin_87")>0) layer_view(2700,850);
     else if(frame_location.indexOf("Gruppentour_Duesseldorf_87")>0) layer_view(2700,850);

		   else if(frame_location.indexOf("flag.php")>0) layer_view(640,850);
		   else if(frame_location.indexOf("hotel_bestellung")>0) layer_view(640,700);
		   else if(frame_location.indexOf("find_hotel.php?step=2")>0) layer_view(260,800);
		   else if(frame_location.indexOf("find_hotel.php?step=3")>0) layer_view(850,800);
		   else if(frame_location.indexOf("find_hotel")>0) layer_view(800,800);
		   else if(frame_location.indexOf("tours_muenchen_bayern")>0) layer_view(800,850);
		   else if(frame_location.indexOf("octoberfest_fr")>0) layer_view(800,830);
		   else if(frame_location.indexOf("autovermittung_fr")>0) layer_view(800,830);
		   else if(frame_location.indexOf("munchen")>0) layer_view(800,750);
		   else if(frame_location.indexOf("registrierung.php?sp=ru")>0 ) layer_view(640-h_minus_mozilla,500);		
		   else if(frame_location.indexOf("registrierung.php?sp=de")>0 ) layer_view(740-h_minus_mozilla,500);	
		   else if(frame_location.indexOf("registrierung.php?sid")>0 && sp!="ru") layer_view(740-h_minus_mozilla,500);
		   else if(frame_location.indexOf("registrierung.php?sid")>0) layer_view(640-h_minus_mozilla,500);
		   else if(frame_location.indexOf("registrierung.php?edit")>0) layer_view(740-h_minus_mozilla,500);		   		
		   else if(frame_location.indexOf("katalog_bus")>0) layer_view(800,830)
		   else if(frame_location.indexOf("bus_online")>0) layer_view(550,600);
		   else if(frame_location.indexOf("s1_bus_online")>0) layer_view(550,600);
		   else if(frame_location.indexOf("rules")>0) layer_view(550,600);
		   else if(frame_location.indexOf("paytool")>0) layer_view(550,600);
		   else if(frame_location.indexOf("img_bestellung.php")>0) layer_view(970,860);	
}
//-----------------------------------------------------------------------------------------
function layer_view(h,w,t,l){
		tmp_id_f = tmp_id + "_f";
		zi=10;
		if(tmp_id_f=="tmp_view_f") zi=11; else zi=10;
			layers_schirma(zi);
        if(t)tf=t+'px'; else tf=div_top(h);
        if(l)lf=l+'px'; else lf=div_left(w);
      	window.document.getElementById(tmp_id).style.top=tf;
        window.document.getElementById(tmp_id).style.left=lf;
        window.document.getElementById(tmp_id).style.height=h+'px';
        window.document.getElementById(tmp_id).style.width=w+'px';
        window.document.getElementById(tmp_id_f).height=h;
        window.document.getElementById(tmp_id_f).width=w;
        window.document.getElementById(tmp_id).style.zIndex=zi;
		window.document.getElementById(tmp_id_f).style.zIndex=zi;
        window.document.getElementById(tmp_id).style.visibility='visible';
		window.document.getElementById(tmp_id_f).style.visibility='visible';
		var tmp_scroll = true;
		//window.document.body.scroll="yes";
        scroll(0,0);
}
//-----------------------------------------------------------------------------------------
function  fr_tmp(name,frame){
    if(frame) f=frame; else f="tmp_view_f";
    frame_location=document.getElementById(f).contentWindow.location.href;
    f_ok=frame_location.indexOf(name);
    if(f_ok>0)return true; else return false;
}
//-----------------------------------------------------------------------------------------
function layer_view_close4(){
	frame_location = document.getElementById("tmp_view4_f").contentWindow.location.href;
	if(frame_location=="about:blank") return;
	layers_schirma();
       window.document.getElementById("tmp_view4").style.visibility='hidden';
       window.document.getElementById("tmp_view4").style.width='0px';
       window.document.getElementById("tmp_view4_f").height='0px';
       window.document.getElementById("tmp_view4_f").width='0px';
       window.document.getElementById("tmp_view4").style.height='0px';
       window.document.getElementById("tmp_view4").style.zIndex=1;
       window.document.getElementById("tmp_view4").src="zero.php";
	   var tmp_scroll = false;
}

function layer_payment_close(){
	   frame_location = document.getElementById("payment_close_f").contentWindow.location.href;
	   if(frame_location=="about:blank") return;
	   //layers_schirma();
	   layers_schirma();
	   if(frame_location.indexOf("zero2")>0)
	   {
	   	r_num = window.document.getElementById("r_num_acc2").innerHTML;
	   	window.document.send_daten.action = "admin/bestellungen_online_hidden.php?sid="+ sid;
	   	window.document.send_daten.send_to_client.value = 1;
	   	window.document.send_daten.send_to_buch.value = 1;
	   	window.document.send_daten.send_to_mietarbeiter.value = 0;
	   	window.document.send_daten.submit();

	   	window.document.getElementById("booking_button").innerHTML = "";
	   	r_num = window.document.getElementById("r_num_acc2").innerHTML;
	   	window.document.getElementById("tmp_inv_nr").innerHTML  = r_num;
	   	str = window.document.getElementById("td_status_msg").innerHTML;
	   	if(str.indexOf("The payment is not accepted")>0)
	   	window.document.getElementById("td_status_msg").innerHTML  = msg_status;
	   	window.document.getElementById("payment_close_f").src="";
	   }
	   else
	   {
	   	msg_status = window.document.getElementById("td_status_msg").innerHTML;
	   	err_msg = $_399;

	   	window.document.getElementById("td_status_msg").innerHTML  = err_msg;

	   	window.document.send_daten.action = "admin/bestellungen_online_hidden.php?sid="+ sid;
	   	window.document.send_daten.send_to_client.value = 1;
	   	window.document.send_daten.send_to_buch.value = 0;
	   	window.document.send_daten.send_to_mietarbeiter.value = 0;
	   	window.document.send_daten.payment_link.value = 1;
	   	window.document.send_daten.submit();
	   	window.document.getElementById("payment_close_f").src="";
	   }
	   window.document.getElementById("payment_v").style.visibility='hidden';
       window.document.getElementById("payment_v").style.width='0px';
       window.document.getElementById("payment_f").height='0px';
       window.document.getElementById("payment_f").width='0px';
       window.document.getElementById("payment_v").style.height='0px';
       window.document.getElementById("payment_v").style.zIndex=1;
       window.document.getElementById("payment_v").src="zero.php";
	   var tmp_scroll = false;
}
function  go_to_end_booking(){
	window.document.getElementById('tmp_close_f').src='zero.php';
}
//-----------------------------------------------------------------------------------------
 function layer_view_close(tmp_id){		
	
	if( fr_tmp('zero','tmp_close_f') || fr_tmp('zero','tmp_close_all_f') )
	{		
		if(tmp_id==undefined)
		{
			if( fr_tmp('zero','tmp_close_f'))  tmp_id = "tmp_view";
			if( fr_tmp('zero2','tmp_close_f')) tmp_id = "tmp_view2";
			if( fr_tmp('zero3','tmp_close_f')) tmp_id = "tmp_view3";	
		}
		layers_schirma();
		
		tmp_id_f = tmp_id + "_f";

     frame_location = document.getElementById("tmp_close_f").contentWindow.location.href;
     if(frame_aktuel && frame_location.indexOf("next_anonce.php")>0 ){
			//window.document.getElementById("tmp_view2_f").src=werbung_array[werbung_begin] + ".php?layer=2&sid="+sid;
			werbung_prog_load();
			return;
	   }

     frame_location = document.getElementById(tmp_id_f).contentWindow.location.href;
     if(frame_aktuel && frame_location.indexOf("werbung")>0 )  frame_aktuel=false;


     window.document.getElementById(tmp_id).innerHTML = "";
     window.document.getElementById(tmp_id).style.visibility='hidden';
	   window.document.getElementById(tmp_id).style.width='0px';
	   window.document.getElementById(tmp_id).style.height='0px';
	   window.document.getElementById(tmp_id).style.zIndex=1;	 
     window.document.getElementById(tmp_id_f).src = "zero.php";
     window.document.getElementById(tmp_id_f).width = '0px';
	   window.document.getElementById(tmp_id_f).height = '0px';
     //window.document.body.scroll="yes";
     scroll(0,0);

	  if(tmp_id == "tmp_view")
	  {
	  	//window.document.getElementById("messen_filter").style.visibility='visible';
	  	window.document.getElementById("hotel_filter").style.visibility='visible';
	  }
    }
}
//------------------------------------------------------------------------------------------

function fensterauf_m(url) { 
  fenster = window.open(url,"f","fullscreen=1,toolbar=1,location=1,directories=0,status=1,menubar=1,top=0,left=0,resizable=yes,scrollbars=yes,status=no,alwaysRaised=yes");
  fenster.focus();
}

function fensterauf_m2(url) { 
	fenster2 = window.open(url,"f2","fullscreen=1,toolbar=1,location=1,directories=0,status=1,menubar=1,top=0,left=0,resizable=yes,scrollbars=yes,status=no,alwaysRaised=yes");
  fenster2.focus();      
}
//------------------------------------------------------------------------------------------


function layer_view_new(){
    tmp_id_f = tmp_id + "_f";
		tmp_id_t = tmp_id + "_t";
		frame_location = document.getElementById(tmp_id_f).contentWindow.location.href;
		if(frame_location=="about:blank" || frame_location.indexOf("zero")>0) return;

		if(frame_location.indexOf("werbung_start.php")>0) {
			werbung_begin = 0;
			werbung_end = werbung_end_all;
			frame_aktuel = true;
			//window.document.getElementById("tmp_view2_f").src = werbung_array[werbung_begin] + ".php?layer=2&sid="+sid;
			werbung_prog_load()
			return;
		}

		//### PROG SPERRE ########################
        if(check_prog_sperre)
		{
			//alert(frame_location)
	        for(i=0; i < prog_sperre.length; i++)
	        {
	         	if(frame_location.indexOf(prog_sperre[i])>0)
	         	{
	         	  view_alert(msg_prog_sperre_w,msg_prog_sperre);
	         	  return;
	         	}
	
	        }
		}        
		//########################################


		if(tmp_id=="tmp_view"){
			window.document.getElementById(tmp_id).innerHTML = tmp_view_f.document.body.innerHTML;
			zi=10;
			layer3[0]="tmp_view";
		}

		if(tmp_id=="tmp_view2"){
			window.document.getElementById(tmp_id).innerHTML = tmp_view2_f.document.body.innerHTML;
			zi=14;
			layer3[1]="tmp_view2";
		}

		if(tmp_id=="tmp_view3"){
			window.document.getElementById(tmp_id).innerHTML = tmp_view3_f.document.body.innerHTML;
			zi=16;
			layer3[2]="tmp_view3";
		}
	
		if(document.getElementById(tmp_id_t))
    {
			w=document.getElementById(tmp_id_t).offsetWidth;	
			h=document.getElementById(tmp_id_t).offsetHeight;		
	  }
	  else
	  {
	  		w=800;
	  		h=1000;
	  }

		 page_aktive=1;

		//alert(w+"/"+h);
		object_view(tmp_id, h, w, zi);
		window.document.getElementById(tmp_id).focus();
		//object_view(tmp_id+'_s', h, w, zi-1);	
		if(frame_location.indexOf("preloader=1")>0)
		{				
			window.document.preloader_form.submit();
	  }
	  
	   
	  if(frame_location.indexOf("find_hotel")>0)
		{					
			r_str=window.document.booking.value_select_info.value;
			if(r_str=="") 
			{
				r=0;
				while( window.document.getElementById('td_tumb_img'+r))
				{
					hotels_tab_img = window.document.getElementById('td_tumb_img'+r).innerHTML;
					hotels_tab_img=hotels_tab_img.substr(4, hotels_tab_img.length-13);
					//alert(hotels_tab_img)				
					window.document.getElementById('td_tumb_img'+r).innerHTML = hotels_tab_img;
					r++;
				}
			}
	  }	

    if(tmp_id == "tmp_view"){
		if(h > y ){
			//window.document.body.scroll="yes";
			//window.document.getElementById("messen_filter").style.visibility='hidden';
	    	window.document.getElementById("hotel_filter").style.visibility='hidden';
	    }
	    else{
        	//window.document.getElementById("messen_filter").style.visibility='visible';
	    	window.document.getElementById("hotel_filter").style.visibility='visible';
        	//window.document.body.scroll="no";
        }
	}
	//else if(h > y )window.document.body.scroll="yes";

	//if(frame_aktuel)window.document.body.scroll="yes";

        //if(frame_location.indexOf("check_bestellung_garantie.php")>0 )  window.document.body.scroll="yes";
        if(frame_location.indexOf("booking_hotel")>0 && window.document.getElementById("ih_payment_metod").innerHTML=="cc") go_to_payment();
        scroll(0,0);
//--------------------------------------
	if(frame_location.indexOf("messenger_view.php")>0) 
	{		
		window.document.getElementById("f_without_d").action = "messenger/messenger.php?sid=" + sid;
		window.document.getElementById("f_without_d").target = "messenger_f";
		window.document.getElementById("f_without_d").submit();
	}
}
//-------------------------------------------------------------------------------------------
function check_img(id)
{		
		window.document.getElementById(id).src="MIKI/images/img_unkn2.jpg"; 
}	
//-------------------------------------------------------------------------------------------
function unvisible_messen_hotel()
{
  unwt.stop();
  window.document.getElementById("messen_filter").style.visibility='hidden';
  window.document.getElementById("hotel_filter").style.visibility='hidden';
}
//------------------------------------------------------------------------------------------
function layer_view_main(){
    tmp_id ="main";
		tmp_id_f = tmp_id + "_f";
		tmp_id_t = tmp_id + "_t";
		frame_location = document.getElementById(tmp_id_f).contentWindow.location.href;

		if(frame_location=="about:blank" || frame_location.indexOf("zero")>0) return;

	  window.document.getElementById(tmp_id).innerHTML = main_f.document.body.innerHTML;
		w=document.getElementById(tmp_id_t).offsetWidth;
		h=document.getElementById(tmp_id_t).offsetHeight;
		window.document.getElementById(tmp_id).style.height=h+"px";
    window.document.getElementById(tmp_id).style.width=w+"px";
		window.document.getElementById("main_td").height=h+"px";
		//alert(w+"/"+h);
		window.document.getElementById(tmp_id).focus();
        scroll(0,0);
}
//-----------------------------------------------------------------------------------------
function rooms_view(){
		tmp_id ="rooms";
		tmp_id_f = tmp_id + "_f";
		tmp_id_t = tmp_id + "_t";
		frame_location = document.getElementById(tmp_id_f).contentWindow.location.href;

		if(frame_location=="about:blank" || frame_location.indexOf("zero")>0) return;
        //alert(frame_location);
	    window.document.getElementById(tmp_id).innerHTML = rooms_f.document.body.innerHTML;
		w=document.getElementById(tmp_id_t).offsetWidth;
		h=document.getElementById(tmp_id_t).offsetHeight;
		//alert(w+"/"+h);
		window.document.getElementById(tmp_id).style.height=h+"px";
    window.document.getElementById(tmp_id).style.width=w+"px";
    h_block_date = window.document.getElementById("block_date").style.height;
		h_block_rooms = window.document.getElementById("block_rooms").style.height;    
  
   //   ie-127; m - 122;
   //alert("h="+h);
     if(h>=122)
     {
     	dh = h - 130;
     	//alert("dh="+dh);
     	  
     	  if(ie)
     	  {	     	  
	     	  dh2 = 0;
		     	if( Number(h)>=152 ) dh2 = -5; else  dh2 = 0;
		     	h_block_date = 263 + dh;
				  h_block_rooms = 148 + dh;
				  h_hotel_filter = 332 + dh;
			     	
			   if(sp=="ru") 
     	    {
		     	  if(dh > 0) h_left = 1180 +  dh + 2; else  h_left = 1178;
				    //alert( "left="+ h_left  +"/"+  h_hotel_filter +"/"+ h_block_date+"/"+h_block_rooms+"/"+ h + "/" + dh2 +"/"+ dh);
		  	  }
		  	  else 
		  	  {
		  	  	if(dh > 0) h_left = 617 +  dh + 2; else  h_left = 616;
				    //alert( "left="+ h_left  +"/"+  h_hotel_filter +"/"+ h_block_date+"/"+h_block_rooms+"/"+ h + "/" + dh2 +"/"+ dh);
		  	  }
		  	}
		  	else
		  	 {
			  	 	h_block_date = 257 + dh;
					  h_block_rooms = 144 + dh;
					  h_hotel_filter = 292 + dh;
			  	 	
			  	 	if(sp=="ru") 
	     	    {
			     	  h_left = 1217 +  dh;
			  	  } 
			  	  else
			  	  {
			  	  	h_left = 622 +  dh;
			  	  }
		  	 }    	    
		
			 //alert( h_left  +"/"+  h_hotel_filter +"/"+ h_block_date+"/"+h_block_rooms+"/"+ h + "/" + dh2 +"/"+ dh);	
			 window.document.getElementById("block_date").style.height = h_block_date+"px";
			 window.document.getElementById("block_rooms").style.height = h_block_rooms+"px";
			 window.document.getElementById("hotel_filter").style.height = h_hotel_filter+"px";
			 window.document.getElementById("div_left_menu").style.height = h_left+"px";
		 }
		
    scroll(0,0);
}
//-----------------------------------------------------------------------------------------
function country_city_view(){
		tmp_id ="country_city";
		tmp_id_f = tmp_id + "_f";
		frame_location = document.getElementById(tmp_id_f).contentWindow.location.href;
		if(frame_location=="about:blank" || frame_location.indexOf("zero")>0) return;
        //alert(frame_location);
	    window.document.getElementById(tmp_id).innerHTML = country_city_f.document.body.innerHTML;
        scroll(0,0);
}
//-----------------------------------------------------------------------------------------
function messen_view(){
		tmp_id ="messen";
		tmp_id_f = tmp_id + "_f";
		frame_location = document.getElementById(tmp_id_f).contentWindow.location.href;
		if(frame_location=="about:blank" || frame_location.indexOf("zero")>0) return;
        //alert(frame_location);
	    window.document.getElementById(tmp_id).innerHTML = messen_f.document.body.innerHTML;
        scroll(0,0);
}

function login_view(){
		frame_location = document.getElementById("login_f").contentWindow.location.href;
		if(frame_location=="about:blank" || frame_location.indexOf("zero")>0) return;
        //alert(frame_location);
	    window.document.getElementById("div_login").innerHTML = login_f.document.body.innerHTML;
        scroll(0,0);
}

//-----------------------------------------------------------------------------------------
function object_view(tmp_id, h, w, zi) {
	 
	 layers_schirma(zi);
	 
	 window.document.getElementById(tmp_id).style.height=h+"px";
   window.document.getElementById(tmp_id).style.width=w+"px";
		//w_wh();
		if(w > x) { ml = 0; l = "0px";} else {l="50%"; ml=-w/2;}
		if(h > y) { mt = 0; t = "0px";} else {t="50%"; mt=-h/2;}

		window.document.getElementById(tmp_id).style.top = t;
    window.document.getElementById(tmp_id).style.left = l;    

		if(frame_aktuel && tmp_id == "tmp_view2")
		{
			ml_start=ml-w;
			ml_stop=ml;
			ml_timer = ml_start;
			ml = ml_start;			
			window.document.getElementById(tmp_id).style.backgroundColor = "transparent";
			window.document.getElementById(tmp_id).style.borderStyle  = "none";
		}
		else
		{			
			window.document.getElementById(tmp_id).style.backgroundColor = x7;		
			window.document.getElementById(tmp_id).style.borderStyle  = "solid";	
		}		

		window.document.getElementById(tmp_id).style.marginLeft = ml + "px";
		window.document.getElementById(tmp_id).style.marginTop = mt + "px";
    window.document.getElementById(tmp_id).style.zIndex=zi;
    window.document.getElementById(tmp_id).style.visibility='visible';

		if(frame_aktuel && tmp_id == "tmp_view2" && werbung_begin<=werbung_end ) {clearTimeout(zfrTO);	move_timer();}
}
//----------------------------------------------------------------------------------------
function move_timer(){
//alert(ml_timer+" #1 "+ml_stop)
   ml_timer=ml_timer+50;
	if(ml_timer>=ml_stop)
	{
		ml_timer=ml_stop;
		window.document.getElementById("tmp_view2").style.marginLeft = ml_timer + "px";		
		werbung_begin++;
		if(werbung_begin>werbung_end) 	frame_aktuel=false;
		clearTimeout(zfrTO);
		login = document.Anmeldung.click.value;
		if(werbung_begin==1 && login != "abmeldung" )
		{
			//window.document.getElementById("tmp_view3_f").src = "login_window.php?layer=3&sid="+sid;
		  //alert(sid document.open_login_window.action)
			document.open_login_window.submit();
		}
	}
	 else{

	  //alert(ml_timer+" #2 "+ml_stop)
		window.document.getElementById("tmp_view2").style.marginLeft = ml_timer + "px";
				zfrTO=setTimeout('move_timer()',10);
		//
		}
	}
//#########################################################################################
function object_view_hwtl(tmp_id, h, w, t, l, zi) {
layers_schirma(zi);	
	  window.document.getElementById(tmp_id).style.height=h+"px";
    window.document.getElementById(tmp_id).style.width=w+"px";
		window.document.getElementById(tmp_id).style.top = t+"px";
    window.document.getElementById(tmp_id).style.left = l+"px";
    window.document.getElementById(tmp_id).style.zIndex=zi;
    window.document.getElementById(tmp_id).style.visibility='visible';
}
//-----------------------------------------------------------------------------------------
var loader_w=0;
var goload=0;
var search_msg_vis = true;
var takt = 20;
//-----------------------------------------------------------
   function loader(){
   window.document.getElementById("view_progress").style.visibility='visible';
   
   max_loader_w = 209;

   if(search_msg_vis){
    search_msg_vis = false;
	vis="visible";
	}
    else
	{
	search_msg_vis = true;
	vis="hidden";
	}


	   if(loader_w<max_loader_w){
                document.f1.tf.style.width=loader_w+"px";
                loader_w=loader_w + 1;
				document.getElementById("search_msg").style.visibility = vis;
         }
        else {
                  loader_w  = 0;

             }
     goload=window.setTimeout('loader(209)',takt);
   }
//--------------------------------------------------------------
function ss_progress(){
	frame_location=document.getElementById('start_stop_progress').contentWindow.location.href;
	//alert(frame_location)
    if(frame_location.indexOf("hotel_search_progress.php")>0 && start_progress )
    {
    	//start
		window.document.getElementById("hotel_request").innerHTML = start_stop_progress.document.body.innerHTML;
		top_p = document.getElementById("main_td").offsetTop;
		left_p = document.getElementById("main_td").offsetLeft;
		width_p=document.getElementById("main_td").offsetWidth-2;
		height_p=document.getElementById("main_td").offsetHeight-10;
		//alert(top_p+"/"+left_p+"/"+width_p+"/"+height_p)
		top_b = document.getElementById("body_tab").offsetTop;
		left_b = document.getElementById("body_tab").offsetLeft;
		//alert(top_b+"/"+left_b)
		top_p  += top_b+10;
		left_p += left_b;
		//alert(top_p+"/"+left_p+"/"+width_p+"/"+height_p)
    	window.document.getElementById("tab_progress").style.height = height_p+"px";
        window.document.getElementById("tab_progress").style.width = width_p+"px";

		object_view_hwtl("view_progress", height_p,width_p, top_p, left_p, 12);
		
		scroll(0,0);
    	loader();
		//window.document.getElementById("messen_filter").style.visibility='hidden';
	    //window.document.getElementById("hotel_filter").style.visibility='hidden';
	    //window.document.body.scroll="no";	    
		  return;
    }
    if(frame_location.indexOf("zero2.php")>0 || start_progress_cancel)
    {
       //stop
	  if(start_progress_cancel){
	    layers_schirma();	
	   	tmp_id_f = tmp_id + "_f";
		  window.document.getElementById(tmp_id_f).src = "zero.php";
	   	window.document.getElementById("tmp_close_f").src = "zero.php";
	  }
		 layers_schirma(); 
     window.document.getElementById("view_progress").style.visibility='hidden';	 
     window.document.getElementById("view_progress").style.zIndex=1;	   
     window.clearTimeout(goload);
     loader_w=0;
     search_msg_vis = true;
     document.getElementById("search_msg").style.visibility = 'hidden';
	   start_progress_cancel = false;
	}
}
//-------------------------------------------------------------------
function insert_innerHTML(id, v){
	window.document.getElementById(id).innerHTML = v;
}
//-------------------------------------------------------------------
function  layers_schirma(zi) {  	  
	
		
	if(zi)
	{
			//alert("open:"+layer_index +"/" + layer_index_array[layer_index] +"/" + zi)
			if(layer_index_array[layer_index]!= zi)
			{
				layer_index++;
				layer_index_array[layer_index] = zi;				
			}			
				w_schirma = "100%";
			  h_schirma = "100%";
			  zi=zi-1;		 		
	}	
	else
	{				 
		 if(layer_index>=0)
		 {			 
			 layer_index_array.sort(); 
			 layer_index--;
			 if(layer_index<0)
			 {
			 		w_schirma = '0px';
		   		h_schirma = '0px';
		   		zi=1;
			 }
			 else
			 {
				 w_schirma = "100%";
			   h_schirma = "100%";
			   zi =	layer_index_array[layer_index]-1;	
		 	 }	  
		 }
		 else
		 {
		 		w_schirma = '0px';
		   	h_schirma = '0px';
		    layer_index=-1;
		   	zi=1;	
		 }	
	  //alert("close:"+layer_index +"/" + layer_index_array[layer_index] +"/" + zi)
	}
   //alert("w:"+w_schirma+"/h:"+h_schirma+"/"+ zi)
   window.document.getElementById("schirma").style.height=w_schirma;
	 window.document.getElementById("schirma").style.width=h_schirma;
	 window.document.getElementById("schirma").style.zIndex=zi;
}	 			
