var posX,posY,infoTxt;

function showHideBox(boxId)
	{
		
		if ($(boxId).style.display=='none')
			{
	
				Effect.BlindDown($(boxId));
			}
			else
			{
				Effect.BlindUp($(boxId));
			}
	}

function pokazPopup(ident)
		{
		
		window.open('pokazPopup.php?ident='+ident,'','toolbar=0,status=0,location=0, scrollbars=yes,resizable=no,width=800,height=630');
		}
		
		
function setGoogleVariables(SetPosX,SetPosY,SetInfoTxt)
{
	posX=SetPosX;
	posY=SetPosY;
	infoTxt=SetInfoTxt;
}

function googleMapLoad()
 {	
	 if (GBrowserIsCompatible()) 
	 	{
    	var map = new GMap2(document.getElementById("mainSWF"));
    	map.addControl(new GLargeMapControl());   	
    	map.setCenter(new GLatLng(posX,posY), 11);
    	    	
    	var marker = new GMarker(map.getCenter());
    	GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(infoTxt); });    	
    	map.addOverlay(marker);    	
		}
 }


function loadPhoto(sr,file)
{
	
	$('mainSWF').innerHTML='<img src="'+file+'">';
	//$(sr).style.display='block';
}

function changeWariant(selectField)
	{
	if (selectField==undefined)
		{
			selectField=document.getElementById('wariantForm').wariant;
		}	
	document.getElementById('pole_ceny').innerHTML=selectField.options[selectField.selectedIndex].getAttribute('szczegoly');	
	document.getElementById('pakietForm').id_wariantu.value=selectField.options[selectField.selectedIndex].getAttribute('id_wariantu');	
	}
	
function showPakietyForm()
	{		
		
		if (document.getElementById('showPakietyBtn').className=='buton_rezerwacja')
			{
			document.getElementById('rezDiv').style.display='block';	
			document.getElementById('showPakietyBtn').className='buton_rezerwacja_gray';
			}
			else
			{
			document.getElementById('rezDiv').style.display='none';	
			document.getElementById('showPakietyBtn').className='buton_rezerwacja';	
			}
			
	}
	
	
function changeData()
	{
	document.getElementById('pakietForm').data_przyjazdu.value=document.getElementById('terminForm').data_przyjazdu.value;
	}	
