var _aRoomBalanceElements={};function calculateBestRoomBalance(){var pE=document.getElementById(_aRoomBalanceElements.m);var pDZ=document.getElementById(_aRoomBalanceElements.dz);var pEZ=document.getElementById(_aRoomBalanceElements.ez);var pEChild=_aRoomBalanceElements.child!=null?document.getElementById(_aRoomBalanceElements.ez):null;pEZ.value=0;pEZ.selectedIndex=null;pDZ.value=0;pDZ.selectedIndex=null;if(pEChild!=null){pEChild.value=0;pEChild.selectedIndex=null;}if((pE.value%2)!=0){dzRoom=pE.value-1;ezRoom=pE.value-dzRoom;_helper_choice_element_selecter(pDZ,dzRoom);_helper_choice_element_selecter(pEZ,ezRoom);if(pEChild!=null){_helper_choice_element_selecter(pEChild,0);}}else{_helper_choice_element_selecter(pDZ,pE.value);}}function requestPrePriceCalculation(pParam){new Ajax.Request(pParam.url,{methode:"post",parameters:new Hash(pParam.p).toQueryString(),onSuccess:pParam.onsuccess});}function _helper_choice_element_selecter(pE,pVal){pE.value=pVal;for(var i=0;i<pE.options.length;i++){if(pE.options[i].value==pVal){pE.selectedIndex=i;break;}}}
