
//var url="atlas/cityHelper.php5";
		var url="sky4fly/qbe2/atlas/cityHelper_outer.php5";
		
			
			//var urld=url+def;
				var aver = 'PL';	
						
		var dsMiasta=new Spry.Data.XMLDataSet(url, 'miasta/miasto');
		var dsMiasta2=new Spry.Data.XMLDataSet(url, 'miasta/miasto');
		var dsMiasta3=new Spry.Data.XMLDataSet(url, 'miasta/miasto');
		var dsMiasta4=new Spry.Data.XMLDataSet(url, 'miasta/miasto');
		var dsMiasta5=new Spry.Data.XMLDataSet(url, 'miasta/miasto');
		var dsMiasta6=new Spry.Data.XMLDataSet(url, 'miasta/miasto');
		var dsMiasta7=new Spry.Data.XMLDataSet(url, 'miasta/miasto');
		var dsMiasta8=new Spry.Data.XMLDataSet(url, 'miasta/miasto');
							
		var helper1=new CityHelper(url,aver,dsMiasta,'miasto_z',
		'w_kod_z','helperList','helperTable','helperToolTip',
		'helperLoading',true,'unselectedRow','selectedRow',2,'debugPanel');
		
		var helper2=new CityHelper(url,aver,dsMiasta2,'miasto_d',
		'w_kod_d','helperList2','helperTable2','helperToolTip2',
		'helperLoading2',true,'unselectedRow','selectedRow',2,'debugPanel');

		var helper3=new CityHelper(url,aver,dsMiasta3,'miasto_z2',
		'w_kod_z2','helperList3','helperTable3','helperToolTip3',
		'helperLoading3',true,'unselectedRow','selectedRow',2,'debugPanel');

		var helper4=new CityHelper(url,aver,dsMiasta4,'miasto_d2',
		'w_kod_d2','helperList4','helperTable4','helperToolTip4',
		'helperLoading4',true,'unselectedRow','selectedRow',2,'debugPanel');

		var helper5=new CityHelper(url,aver,dsMiasta5,'miasto_z3',
		'w_kod_z3','helperList5','helperTable5','helperToolTip5',
		'helperLoading5',true,'unselectedRow','selectedRow',2,'debugPanel');

		var helper6=new CityHelper(url,aver,dsMiasta6,'miasto_d3',
		'w_kod_d3','helperList6','helperTable6','helperToolTip6',
		'helperLoading6',true,'unselectedRow','selectedRow',2,'debugPanel');

		var helper7=new CityHelper(url,aver,dsMiasta7,'miasto_z4',
		'w_kod_z4','helperList7','helperTable7','helperToolTip7',
		'helperLoading7',true,'unselectedRow','selectedRow',2,'debugPanel');
		
		var helper8=new CityHelper(url,aver,dsMiasta8,'miasto_d4',
		'w_kod_d4','helperList8','helperTable8','helperToolTip8',
		'helperLoading8',true,'unselectedRow','selectedRow',2,'debugPanel');

		helper1.onShowList=function(isVisible)
		{ 
			sopen(isVisible);
			wlacz_select(isVisible);
		}
					
		helper2.onShowList=function(isVisible)
		{ 
			sopen(isVisible);
			wlacz_select(isVisible);
		}
		
		helper1.onChangeValue=function()
		{ 
			document.getElementById('w_kod_z').value=' ';				
		}
		
		helper2.onChangeValue=function()
		{ 
			document.getElementById('w_kod_d').value=' ';
		}


		
		

		helper3.onShowList=function(isVisible)
		{ 
			sopen(isVisible);
		}
					
		helper4.onShowList=function(isVisible)
		{ 
			sopen(isVisible);
		}
		
		helper3.onChangeValue=function()
		{ 
			document.getElementById('w_kod_z2').value=' ';				
		}
		
		helper4.onChangeValue=function()
		{ 
			document.getElementById('w_kod_d2').value=' ';
		}

		helper5.onShowList=function(isVisible)
		{ 
			sopen(isVisible);
		}
					
		helper6.onShowList=function(isVisible)
		{ 
			sopen(isVisible);
		}
		
		helper5.onChangeValue=function()
		{ 
			document.getElementById('w_kod_z3').value=' ';				
		}
		
		helper6.onChangeValue=function()
		{ 
			document.getElementById('w_kod_d3').value=' ';
		}

		helper7.onShowList=function(isVisible)
		{ 
			sopen(isVisible);
		}
					
		helper8.onShowList=function(isVisible)
		{ 
			sopen(isVisible);
		}
		
		helper7.onChangeValue=function()
		{ 
			document.getElementById('w_kod_z4').value=' ';				
		}
		
		helper8.onChangeValue=function()
		{ 
			document.getElementById('w_kod_d4').value=' ';
		}

		function init()
		{		
			document.body.onclick=function()
			{			
				if (helper1.isSelecting)
				{
					helper1.findMatchingCity();
				}
				if (helper2.isSelecting)
				{
					helper2.findMatchingCity();
				}
				if (helper3.isSelecting)
				{
					helper3.findMatchingCity();
				}
				if (helper4.isSelecting)
				{
					helper4.findMatchingCity();
				}
				if (helper5.isSelecting)
				{
					helper5.findMatchingCity();
				}
				if (helper6.isSelecting)
				{
					helper6.findMatchingCity();
				}
				if (helper7.isSelecting)
				{
					helper7.findMatchingCity();
				}
				if (helper8.isSelecting)
				{
					helper8.findMatchingCity();
				}
			}			
		}

		
	
	