var pageShadow = false;
if (screen.width > 1024) pageShadow=true;
var skyscrapPos = 0;
function getSkyPosition(){return skyscrapPos;}
var webfarm_ns = webfarm_ns ? webfarm_ns : new function(){
	var flashBarPath = "/xchanger/cars/img/posuvnik.swf";
	var currencyTxts = {"CZK":"K&#269;", "SKK":"Sk","EUR":"&euro;","USD":"&#36;"};
	var private = {};
	var public = {
		hpcarsMOver : false,
		carModelSpecEdited : false,
		carTypeSpecDefText : "",
		fullTxtDefValue : "",
		firmNameDefValue : "",
		firmNameEdited:false,
		popups750x600 : function(){return ['insFirmLink','faqLink','prodTips','prodCond','priceComp','common_cond','contFaq'];},
		popups750x600scroll : function(){return ['faqLink','prodTips','prodCond','priceComp','common_cond'];},
		popups750x600reload : function(){return ['insCarLink','insPartLink','carIns','carInsMyCars','carReq_hppromo','slevyBtn','reqCarLink','carIns_edit','insRecLink','insRecLinkRCol'];},
		popups750x600reloadClass : function(){return ['addRevPhoto','revEdit'];},
		popupsVarSize : {'shwCarLink':[400,300,false],'regBtn':[430,420,false],'fakeAdvertLink':[600,600,false],'contactProprietor':[425,400,false],'contactPriceOffer':[425,400,false],'contactSendTo':[425,400,false],'pdfBtn':[300,200,false],'printBtn':[300,200,false],'mailBtn':[620,470,false]},
		init : function(){
			try{
				checkFlashState();
			}catch(e){
				var msg = e.message;
			}
			webfarm_ns.initPopups();
			webfarm_ns.initLogin_Fulltext_Langs();
			webfarm_ns.initForms();
			webfarm_ns.initMycarsControll();
			webfarm_ns.initTopcars();
			webfarm_ns.scrollSkyInit();
			if($('showRating'))$('showRating').observe('click',function(e){
				if($('ratingForm')&& (!$('ratingMsg') || $('ratingMsg').innerHTML.length==0))$('ratingForm').style.display="block";Event.stop(e);return false;
				});
			if($('ratingForm'))$('ratingForm').observe('submit',function(e){
				$$('#ratingForm input').each(function(obj){if($(obj).checked){$('ratingForm').submit();Event.stop(e);}});Event.stop(e);return false;
				});
			if($('showRatingTop'))$('showRatingTop').observe('click',function(e){
				if($('ratingFormTop')&& (!$('ratingMsg') || $('ratingMsg').innerHTML.length==0))$('ratingFormTop').style.display="block";Event.stop(e);return false;
				});
			if($('ratingFormTop'))$('ratingFormTop').observe('submit',function(e){
				$$('#ratingFormTop input').each(function(obj){if($(obj).checked){$('ratingFormTop').submit();Event.stop(e);}});Event.stop(e);return false;
				});
			window.alert = function(message){webfarm_ns.innerWndAlert(message);};
		},
		submitSearchForm:function(){
			if($('webfarm_formCarModelTyp')){if(!webfarm_ns.carModelSpecEdited){$('webfarm_formCarModelTyp').value='';}}
			if($('searchformcont'))$('searchformcont').submit();
		},
		observeFlashBars:function(){
		},
		setFlashLabels:function(labType, val1, val2){
		},
		initPopups:function(){
			for ( var objId = 0; objId < webfarm_ns.popups750x600().length; objId++) {if($(webfarm_ns.popups750x600()[objId]))$(webfarm_ns.popups750x600()[objId]).observe('click',function(e){webfarm_ns.innerWnd(this,750,600);Event.stop(e);return false;});}
			for ( var objId = 0; objId < webfarm_ns.popups750x600scroll().length; objId++) {if($(webfarm_ns.popups750x600scroll()[objId]))$(webfarm_ns.popups750x600scroll()[objId]).observe('click',function(e){webfarm_ns.innerWnd(this,750,600,true);Event.stop(e);return false;});}
			for ( var objId = 0; objId < webfarm_ns.popups750x600reload().length; objId++) {if($(webfarm_ns.popups750x600reload()[objId]))$(webfarm_ns.popups750x600reload()[objId]).observe('click',function(e){webfarm_ns.innerWndwReload(this,750,600);Event.stop(e);return false;});}
			for ( var objId = 0; objId < webfarm_ns.popups750x600reloadClass().length; objId++) {if($$('.'+webfarm_ns.popups750x600reloadClass()[objId]))$$('.'+webfarm_ns.popups750x600reloadClass()[objId]).each(function(obj){obj.observe('click',function(e){webfarm_ns.innerWndwReload(this,750,600);Event.stop(e);return false;});});}
			for ( var objIdTxt in webfarm_ns.popupsVarSize){if($(objIdTxt)){
				if(webfarm_ns.popupsVarSize[objIdTxt][2])
					$(objIdTxt).observe('click',function(e){webfarm_ns.innerWndwReload(this,webfarm_ns.popupsVarSize[this.id][0],webfarm_ns.popupsVarSize[this.id][1]);Event.stop(e);return false;});
				else{
					$(objIdTxt).observe('click',function(e){webfarm_ns.innerWnd(this,webfarm_ns.popupsVarSize[this.id][0],webfarm_ns.popupsVarSize[this.id][1]);Event.stop(e);return false;});
				}
			}}
			if($('help')){$$('#help a').each(function(obj){obj.observe('click',function(e){webfarm_ns.innerWnd(obj,750,600,1);Event.stop(e);return false;});});}
			if($('sendToPropriatorBtn'))$('sendToPropriatorBtn').observe('click',function(e){webfarm_ns.submitToInnerWnd('sendToPropriator',425,400);Event.stop(e);return false;});
			$$('.commentForm').each(function(obj){
				if(obj.href.indexOf('parent')>-1)
					$(obj).observe('click',function(e){webfarm_ns.innerWndwReload(this,600,500);Event.stop(e);return false;});
				else
					$(obj).observe('click',function(e){webfarm_ns.innerWndwReload(this,600,400);Event.stop(e);return false;});
			});

		},
		initLogin_Fulltext_Langs:function(){
			try{
			if($('logPass') && $('logPass').type)$('logPass').type="text";
			}catch(e){}
			if($('logName'))$('logName').observe('click',function(){
				this.value='';this.style.color='#000';
				if($('lgnForm'))$('lgnForm').observe('submit',function(e){if($('logName').value!='' && $('logPass').value!='')$('lgnForm').submit();Event.stop(e);});this.stopObserving('click');
			});
			if($('logPass'))$('logPass').observe('click',function(){
				this.value='';this.style.color='#000';if(this.type)this.type='password';
				if($('lgnForm'))$('lgnForm').observe('submit',function(e){if($('logName').value!='' && $('logPass').value!='') $('lgnForm').submit();Event.stop(e);});this.stopObserving('click');
			});
			if($('logPass'))$('logPass').observe('focus',function(){
				this.value='';this.style.color='#000';if(this.type)this.type='password';
				if($('lgnForm'))$('lgnForm').observe('submit',function(e){if($('logName').value!='' && $('logPass').value!='') $('lgnForm').submit();Event.stop(e);});this.stopObserving('focus');
			});

			if($('fltxtIn')&&!$('fltxtStop')){
				$('fltxtIn').style.color='#666';
				$('fltxtIn').observe('click',function(){
					webfarm_ns.fullTxtDefValue=this.getValue();
					this.value='';this.style.color='#000';
					this.stopObserving('click');
				});
			}
			if($('fltxtIn')&&!$('fltxtStop'))
				$('fltxtIn').observe('blur',function(){
				if(this.getValue()==''){
					this.value=webfarm_ns.fullTxtDefValue;this.style.color='#666';
					this.observe('click',function(){webfarm_ns.fullTxtDefValue=this.getValue();this.value='';this.style.color='#000';this.stopObserving('click');});
				}else{
					if($('fullTxtForm')){
						$('fullTxtForm').stopObserving('submit');
						$('fullTxtForm').observe('submit',function(e){
							if($('fltxtIn').getValue().length()>0)
								return true;
						});
					}
				}
			});
			if($('fullTxtForm')&&!$('fltxtStop')){
				$('fullTxtForm').observe('submit',function(e){
						Event.stop(e);
						return false;
				});
			}


			if($('langMenu'))$('langMenu').observe('mouseover',function(){$('langSelect').style.display='block';});
			if($('langMenu'))$('langMenu').observe('mouseout',function(){$('langSelect').style.display='none';});
		},
		initForms:function(){
			if($('webfarm_formCarType'))$('webfarm_formCarType').observe('change',function(){chInput(this);});
			if($('webfarm_formCarSign'))$('webfarm_formCarSign').observe('change',function(){chInput(this);});
			if($('webfarm_formRegState'))$('webfarm_formRegState').observe('change',function(){chInput(this);});
			if($('webfarm_formRegDist'))$('webfarm_formRegDist').observe('change',function(){chInput(this);});
			if($('webfarm_formFirmName'))$('webfarm_formFirmName').observe('click',function(){webfarm_ns.firmNameDefValue=this.getValue();this.value='';this.style.color='#000';webfarm_ns.firmNameEdited=true;this.stopObserving('click');});
			if($('webfarm_formFirmName'))$('webfarm_formFirmName').observe('blur',function(){
				if(this.getValue()==''){
					this.value=webfarm_ns.firmNameDefValue;this.style.color='#666';
					this.observe('click',function(){webfarm_ns.firmNameDefValue=this.getValue();this.value='';this.style.color='#000';this.stopObserving('click');});
				}
			});

			if($('cTypeSelect'))$$('#cTypeSelect a').each(function(obj){
				$(obj).observe('click',function(e){
					if($('webfarm_formCarType')){
						$$('#cTypeSelect a').each(function(objX){objX.className="";});
						this.className="active";
						var ctype=obj.id.replace("cType","");
						if(ctype=='V'){
							$('webfarm_formCarType').value = '';
							var state = $('webfarm_state').value;
							$('webfarm_state').value=state.substr(0,2) + '1' + state.substr(3);
						}
						else{
							$('webfarm_formCarType').value = ctype;
							var state = $('webfarm_state').value;
							$('webfarm_state').value=state.substr(0,2) + '0' + state.substr(3);
						}
						chInput($('webfarm_formCarType'));
						if($('webfarm_formCarSign'))
							$('webfarm_formCarSign').focus();
						}
					Event.stop(e);return false;
					});
			});


			if($('advSearchBtn'))$('advSearchBtn').observe('click',function(){
				if($('searchformcont')){
					$('searchformcont').action=$('advSearchBtn').href;
					$('searchformcont').submit();
				}

			});



			if($('galIco')&&$('galIco').className!='act')$('galIco').observe('click',function(){
				$('galleryTypHid').setValue('G');if($('listIco').className=='act')$('listIco').className='';$('galIco').className='act';if(!$('profi')){$('maxHid').setValue('16');}webfarm_ns.submitSearchForm();
			});
			if($('listIco')&&$('listIco').className!='act')$('listIco').observe('click',function(){
				$('galleryTypHid').setValue('L');if($('galIco').className=='act')$('galIco').className='';$('listIco').className='act';if(!$('profi')){$('maxHid').setValue('20');}webfarm_ns.submitSearchForm();
			});

			if($('webfarm_formCarYearOd')){$('webfarm_formCarYearOd').observe('change',function(){limitToMade('webfarm_formCarYearOd','webfarm_formCarYearDo');});}
			if($('webfarm_formCarYearDo')){$('webfarm_formCarYearDo').observe('change',function(){limitFromMade('webfarm_formCarYearOd','webfarm_formCarYearDo');});}
			if($('webfarm_formCarPriceOd')){$('webfarm_formCarPriceOd').observe('change',function(){limitToPrice('webfarm_formCarPriceOd','webfarm_formCarPriceDo');});}
			if($('webfarm_formCarPriceDo')){$('webfarm_formCarPriceDo').observe('change',function(){limitFromPrice('webfarm_formCarPriceOd','webfarm_formCarPriceDo');});}

			if($('webfarm_formCarModelTyp'))$('webfarm_formCarModelTyp').observe('click',function(){
				webfarm_ns.carTypeSpecDefText=this.getValue();this.value='';this.style.color='#000';webfarm_ns.carModelSpecEdited=true;this.stopObserving('click');
			});
			if($('webfarm_formCarModelTyp'))$('webfarm_formCarModelTyp').observe('blur',function(){
				if(this.getValue()==''){
					this.value=webfarm_ns.carTypeSpecDefText;this.style.color='#666';webfarm_ns.carModelSpecEdited=false;
					this.observe('click',function(){webfarm_ns.carTypeSpecDefText=this.getValue();this.value='';this.style.color='#000';webfarm_ns.carModelSpecEdited=true;this.stopObserving('click');});
				}
			});
			if($('webfarm_formDescription')&&$('webfarm_formDescriptionHid')){
				if($('webfarm_formDescriptionHid').getValue().length > 0){
					webfarm_ns.carModelSpecEdited=true;
				}else{
					$('webfarm_formDescription').style.color='#666';
					$('webfarm_formDescription').observe('click',function(){this.value='';this.style.color='#000';webfarm_ns.carModelSpecEdited=true;this.stopObserving('click');});
				}
			}
			if($('searchformcont')){
				$('searchformcont').observe('submit',function(){
					if($('webfarm_formCarModelTyp')){if(!webfarm_ns.carModelSpecEdited){$('webfarm_formCarModelTyp').value='';}}
					if($('webfarm_formDescription')){if(!webfarm_ns.carModelSpecEdited){$('webfarm_formDescription').value='';}}
					if($('webfarm_formFirmName')){if(!webfarm_ns.firmNameEdited){$('webfarm_formFirmName').value='';}}
				});
				if($('orderListBy')&&$('orderListByHid')){
					$('orderListBy').observe('change',function(){$('orderListByHid').value=$('orderListBy').value;webfarm_ns.submitSearchForm();});
				}
				if($('advertsType')&&$('advertsTypeHid')){
					$('advertsType').observe('change',function(){$('advertsTypeHid').value=$('advertsType').value;webfarm_ns.submitSearchForm();});
				}
				if($('max')&&$('maxHid')){
					$('max').observe('change',function(){$('maxHid').value=$('max').value;webfarm_ns.submitSearchForm();});
				}
				if($('reSrchBtn')&&$('searchformcrits')){
					$('reSrchBtn').observe('click',function(e){$('searchformcrits').style.display='none';$('searchformcont').style.display='block';
					$('advSrchBtn').style.display="none";
					$$('.advItems').each(function(obj){obj.style.display='block';});
					if($('partGroupForm'))$('partGroupForm').style.display='block';
					setParamsValue();
					Event.stop(e);});
				}
				if($('newSrchBtn')&&$('searchformcrits')){
					$('newSrchBtn').observe('click',function(e){$('searchformcrits').style.display='none';$('searchformcont').style.display='block';
					if($('partGroupForm')){$('partGroupForm').style.display='block';resetCategoryAndParams();}
					$('searchformcont').reset();
					Event.stop(e);});
				}
				if($('resetSearchBtn')&&$('searchformcrits')){
					$('resetSearchBtn').observe('click',function(e){
						$('searchformcrits').style.display='none';$('searchformcont').style.display='block';$('searchformcont').reset();Event.stop(e);
					});
				}
			}
			if($('webfarm_newCarChck'))$('webfarm_newCarChck').observe('change',function(e){
				webfarm_ns.formRadioboxIndexesClick(e,'webfarm_state','webfarm_car.state.17','',16);
			});
			if($('webfarm_usedCarChck'))$('webfarm_usedCarChck').observe('change',function(e){
				webfarm_ns.formRadioboxIndexesClick(e,'webfarm_state','webfarm_car.state.17','',16);
			});
			if($('webfarm_car.state.17'))$('webfarm_car.state.17').observe('change',function(e){
				webfarm_ns.formRadioboxIndexesClick(e,'webfarm_state','webfarm_car.state.17','',16);
			});

			if($('partGroupSelect'))$$('#partGroupSelect a').each(function(obj){
				$(obj).observe('click',function(e){
					if(!this.className != "active"){$('groupIdHid').value = this.name.replace("group","");$('partGroupForm').submit();}
					Event.stop(e);
				});
			});

			if($('katId'))$('katId').observe('change',function(){fillParamFields(this.value,true);});
			if($('katId') && $('katId').value != 'XX') fillParamFields($('katId').value,false);


			if($('advSrchBtn')){
				$('advSrchBtn').observe('click',function(e){
					$('advSrchBtn').style.display="none";
					$$('.advItems').each(function(obj){obj.style.display='block';});
					Event.stop(e);
				});
			}
			if($('basicSrchBtn')){
				$('basicSrchBtn').observe('click',function(e){
					$$('.advItems').each(function(obj){obj.style.display='none';});
					$('advSrchBtn').style.display="block";
					Event.stop(e);
				});
			}
			if($('form_message'))$('form_message').observe('click',function(e){$('form_message').value="";this.stopObserving('click');Event.stop(e);});

		},
		initMycarsControll:function(){

			if($('itemlist'))$$('#itemlist .compAdd').each(function(e){
				$(e).observe('click',function(ev){var cookie = webfarm_ns.readCookie('comparedcars');if(cookie==null) cookie='';var value = this.id.replace('comp_add_','');if(cookie.length>0)cookie = cookie + "_"+value;else cookie = value;webfarm_ns.setCookie('comparedcars',cookie);
				this.className='smlBtn compAdd dispOff';
				$('comp_del_'+value).className='smlBtn compDel dispOn';Event.stop(ev);});
			});

			if($('itemlist'))$$('#itemlist .compDel').each(function(e){
				$(e).observe('click',function(ev){var cookie = webfarm_ns.readCookie('comparedcars');if(cookie==null) cookie='';var value = this.id.replace('comp_del_','');var regexp = new RegExp('^('+ value + '_?)|(_?' + value+')');cookie = cookie.replace(regexp,'');webfarm_ns.setCookie('comparedcars',cookie);
				this.className='smlBtn compDel dispOff';
				$('comp_add_'+value).className='smlBtn compAdd';Event.stop(ev);});
			});



			if($$('.parkAdd'))$$('.parkAdd').each(function(e){
				$(e).observe('click',function(ev){var value = this.id.replace('park_add_','');var url = '/xchanger/cars/loginpage.jsp';var pars = 'A_WCA=WCA&webusercid='+value;var target = 'output-div';var myAjax = new Ajax.Updater(target, url, {method: 'get', parameters: pars});
				this.className='smlBtn parkAdd dispOff';
				$('park_del_'+value).className='smlBtn parkDel dispOn';Event.stop(ev);});
			});

			if($$('.parkAddFirm'))$$('.parkAddFirm').each(function(e){
				$(e).observe('click',function(ev){var value = this.id.replace('park_add_','');var url = '/xchanger/cars/loginpage.jsp';var pars = 'A_WFA=WFA&webuserfid='+value;var target = 'output-div';var myAjax = new Ajax.Updater(target, url, {method: 'get', parameters: pars});this.hide();$('park_del_'+value).show();$('park_del_'+value).style.display='block';Event.stop(ev);});
			});

			if($$('.parkDel'))$$('.parkDel').each(function(e){
				$(e).observe('click',function(ev){var value = this.id.replace('park_del_','');var url = '/xchanger/cars/loginpage.jsp';var pars = 'A_WCR=WCR&webusercid='+value;var target = 'output-div';var myAjax = new Ajax.Updater(target, url, {method: 'get', parameters: pars});
				this.className='smlBtn parkDel dispOff';
				$('park_add_'+value).className='smlBtn parkAdd';Event.stop(ev);});
			});

			if($$('.parkDelFirm'))$$('.parkDelFirm').each(function(e){
				$(e).observe('click',function(ev){var value = this.id.replace('park_del_','');var url = '/xchanger/cars/loginpage.jsp';var pars = 'A_WFR=WFR&webuserfid='+value;var target = 'output-div';var myAjax = new Ajax.Updater(target, url, {method: 'get', parameters: pars});this.hide();$('park_add_'+value).show();$('park_add_'+value).style.display='block';Event.stop(ev);});
			});

			if($$('.remBtn'))$$('.remBtn').each(function(e){
				$(e).observe('click',function(){var cookie = webfarm_ns.readCookie('comparedcars');if(cookie!=null && cookie.length>0){var regexp = new RegExp('^('+ this.id + '_?)|(_?' + this.id+')');cookie = cookie.replace(regexp,'');webfarm_ns.setCookie('comparedcars',cookie);this.up().remove();$('carItemsWrap').style.width=(302*$$('.remBtn').length)+"px";}});
			});

			if($$('.carEditLink'))$$('.carEditLink').each(function(obj)
			{
			 obj.observe('click',function(x){webfarm_ns.innerWnd(this,750,600,false);Event.stop(x);return false;});
			});
			if($$('.carDelLink'))$$('.carDelLink').each(function(obj){
				obj.observe('click',function(x){webfarm_ns.innerWnd(this,400,180,false);Event.stop(x);return false;});
			});

			if($$('.partEditLink'))$$('.partEditLink').each(function(obj)
					{
					 obj.observe('click',function(x){webfarm_ns.innerWnd(this,750,600,false);Event.stop(x);return false;});
					});
			if($$('.partDelLink'))$$('.partDelLink').each(function(obj)
					{
					 obj.observe('click',function(x){webfarm_ns.innerWnd(this,400,180,false);Event.stop(x);return false;});
					});

			$$('.logBtnLink').each(function(obj){obj.observe('click',function(e){webfarm_ns.innerWndLogin(obj.href);Event.stop(e);return false;});});
			$$('.logRegBtnLink').each(function(obj){obj.observe('click',function(e){webfarm_ns.innerWndLoginReview(obj.href);Event.stop(e);return false;});});

		},
		initTopcars:function(){
			if($('hpcarsPane')&&$('hpcarsPaneOver')){
				$$('.carRow').each(function(e){
					$(e).observe('mouseover',function(ev){
						webfarm_ns.hpcarsMOver=true;
						var carRow = this;
						var hpcarsPane = carRow.up();
						if(hpcarsPane.down('.actRow')){hpcarsPane.down('.actRow').className='carRow';}
						carRow.className='carRow actRow';
						$('hpcarsPaneOver').update('');
						$('hpcarsPaneOver').style.display='none';
						switch (carRow.down('input.offset').getValue()%5){
							case 0:$('hpcarsPaneOver').style.left= (3+1*133)+"px";break;
							case 1:$('hpcarsPaneOver').style.left= (3+2*133)+"px";break;
							case 2:$('hpcarsPaneOver').style.left= (3+3*133)+"px";break;
							case 3:$('hpcarsPaneOver').style.left= (3+1*133)+"px";break;
							case 4:$('hpcarsPaneOver').style.left= (3+2*133)+"px";break;
							default:$('hpcarsPaneOver').style.left= (2)+"px";break;}
						var innerCode="<h2>"+carRow.down('input.firmNm').getValue()+"</h2><h3>"+carRow.down('input.ttl').getValue()+"</h3><span>"+carRow.down('input.desc').getValue()+"</span><a href='"+carRow.href+"' target='_blank'><img src='"+carRow.down('input.imgUrl').getValue()+"' alt='' border='0' width='260'/><span class='bcarOverlay'><strong>"+carRow.down('input.price').getValue()+"</strong></span></a>";//<div class='clsBtn'>X</div>";
						hpcarsPane.down('#hpcarsPaneOver').update(innerCode);
						hpcarsPane.down('#hpcarsPaneOver').style.display="block";
						if(hpcarsPane.down('.clsBtn')){
							hpcarsPane.down('.clsBtn').observe("click",function(){webfarm_ns.hpcarsMOver=false;$$('.hpcars').each(function(obj){if(obj.down('.actRow')){obj.down('.actRow').className='carRow';}});$('hpcarsPaneOver').update('');$('hpcarsPaneOver').style.display='none';});
						}
					$(e).observe('mouseout',function(ev){
						webfarm_ns.hpcarsMOver=false;
						window.setTimeout("if(!webfarm_ns.hpcarsMOver){$$('.hpcars').each(function(obj){if(obj.down('.actRow')){obj.down('.actRow').className='carRow';}});$('hpcarsPaneOver').update('');$('hpcarsPaneOver').style.display='none';}",100);
					});
				});

			});
			}
		},
		submitToInnerWnd:function(formId,contentWidth,contentHeight)
		{
			$$(".visOff").each(function(obj){obj.style.visibility="hidden";});
			var frameTitle = "";
			var scrollVal = 'no';//scrolling?('yes'):('no');
			if((contentHeight+80)>document.viewport.getHeight()){
				contentHeight=document.viewport.getHeight()-86;
				scrolling=true;
			}
			var form = $(formId);
			form.target= 'foo';
			if(document.body){
				if(!$('wf_innerWndFrmWrap'))
				Element.insert(document.body, "<div id='wf_innerWndFrmWrap'></div>");
				var closeWindTitle="";
				try{closeWindTitle=txtValCloseWindow;}catch(e){closeWindTitle="";}
				if($('wf_innerWndFrmWrap'))$('wf_innerWndFrmWrap').update(
					"<div id='wf_innerWndFrmOverlay'>&nbsp;</div>" +
					"<div id='wf_innerWndWrap' style='margin:-"+((contentHeight+80)/2)+"px 0 0 -"+((contentWidth+40)/2)+"px;width:"+(contentWidth+40)+"px;'><div class='borderWrap'><div id='wf_inWndTopLeft'></div><div id='wf_inWndTopBg' style='width:"+(contentWidth+20)+"px;'></div><div id='wf_inWndTopRight'></div></div>"+
					"<div id='wf_inWndBody' style='width:"+(contentWidth+39)+"px;'><div id='wf_inWndTitleWrap' style='width:"+(contentWidth+30)+"px;'><span id='wf_inWndTitleMsg'>"+frameTitle+"</span><div id='wndFrmCloseBtnRnd' title='"+closeWindTitle+"'></div></div><iframe name='foo' src='' width='"+contentWidth+"' height='"+contentHeight+"' style='width:"+contentWidth+"px;height:"+contentHeight+"px; ' scrolling='"+scrollVal+"' frameborder='0'></iframe></div>"+
					"<div class='borderWrap'><div id='wf_inWndBotLeft'></div><div id='wf_inWndBotBg' style='width:"+(contentWidth+20)+"px;'></div><div id='wf_inWndBotRight'></div></div>");
				if($('wndFrmCloseBtnRnd'))$('wndFrmCloseBtnRnd').observe('click',function(e){
					webfarm_ns.closeInnerWnd(e);Event.stop(e);return false;
				});
				form.submit();
				form.reset();
			}
		},
		innerWnd:function(button, contentWidth, contentHeight, scrolling){
			$$(".visOff").each(function(obj){obj.style.visibility="hidden";});

			if((contentHeight+80)>document.viewport.getHeight()){
				contentHeight=document.viewport.getHeight()-86;
				scrolling=true;
			}
			var contentUrl = button.href;
			button.blur();
			var scrollVal = scrolling?('yes'):('no');
			var frameTitle = (button.title)?(button.title):('');

			if(document.body){
				var closeWindTitle="";
				try{closeWindTitle=txtValCloseWindow;}catch(e){closeWindTitle="";}
				if(!$('wf_innerWndFrmWrap'))
				Element.insert(document.body, "<div id='wf_innerWndFrmWrap'></div>");
				if($('wf_innerWndFrmWrap'))$('wf_innerWndFrmWrap').update(
					"<div id='wf_innerWndFrmOverlay'>&nbsp;</div>" +
					"<div id='wf_innerWndWrap' style='margin:-"+((contentHeight+80)/2)+"px 0 0 -"+((contentWidth+40)/2)+"px;width:"+(contentWidth+40)+"px;'><div class='borderWrap'><div id='wf_inWndTopLeft'></div><div id='wf_inWndTopBg' style='width:"+(contentWidth+20)+"px;'></div><div id='wf_inWndTopRight'></div></div>"+
					"<div id='wf_inWndBody' style='width:"+(contentWidth+39)+"px;'><div id='wf_inWndTitleWrap' style='width:"+(contentWidth+30)+"px;'><span id='wf_inWndTitleMsg'>"+frameTitle+"</span><div id='wndFrmCloseBtnRnd' title='"+closeWindTitle+"'></div></div><iframe src='about:blank' id='innWndContent' width='"+contentWidth+"' height='"+contentHeight+"' style='width:"+contentWidth+"px;height:"+contentHeight+"px; ' scrolling='"+scrollVal+"' frameborder='0'></iframe></div>"+
					"<div class='borderWrap'><div id='wf_inWndBotLeft'></div><div id='wf_inWndBotBg' style='width:"+(contentWidth+20)+"px;'></div><div id='wf_inWndBotRight'></div></div>");
				$('innWndContent').src=contentUrl;
				if($('wndFrmCloseBtnRnd'))$('wndFrmCloseBtnRnd').observe('click',function(e){
					webfarm_ns.closeInnerWnd(e);Event.stop(e);return false;
				});
			}
		},
		innerWndwReload:function(button, contentWidth, contentHeight, scrolling){
			$$(".visOff").each(function(obj){obj.style.visibility="hidden";});

			if((contentHeight+80)>document.viewport.getHeight()){
				contentHeight=document.viewport.getHeight()-86;
				scrolling=true;
			}
			var contentUrl = button.href;
			button.blur();
			var scrollVal = scrolling?('yes'):('no');
			var frameTitle = (button.title)?(button.title):('');

			if(document.body){
				var closeWindTitle="";
				try{closeWindTitle=txtValCloseWindow;}catch(e){closeWindTitle="";}
				if(!$('wf_innerWndFrmWrap'))
				Element.insert(document.body, "<div id='wf_innerWndFrmWrap'></div>");
				if($('wf_innerWndFrmWrap'))$('wf_innerWndFrmWrap').update(
					"<div id='wf_innerWndFrmOverlay'>&nbsp;</div>" +
					"<div id='wf_innerWndWrap' style='margin:-"+((contentHeight+80)/2)+"px 0 0 -"+((contentWidth+40)/2)+"px;width:"+(contentWidth+40)+"px;'><div class='borderWrap'><div id='wf_inWndTopLeft'></div><div id='wf_inWndTopBg' style='width:"+(contentWidth+20)+"px;'></div><div id='wf_inWndTopRight'></div></div>"+
					"<div id='wf_inWndBody' style='width:"+(contentWidth+39)+"px;'><div id='wf_inWndTitleWrap' style='width:"+(contentWidth+30)+"px;'><span id='wf_inWndTitleMsg'>"+frameTitle+"</span><div id='wndFrmCloseBtnRnd' title='"+closeWindTitle+"'></div></div><iframe src='about:blank' id='innWndContent' width='"+contentWidth+"' height='"+contentHeight+"' style='width:"+contentWidth+"px;height:"+contentHeight+"px; ' scrolling='"+scrollVal+"' frameborder='0'></iframe></div>"+
					"<div class='borderWrap'><div id='wf_inWndBotLeft'></div><div id='wf_inWndBotBg' style='width:"+(contentWidth+20)+"px;'></div><div id='wf_inWndBotRight'></div></div>");
				$('innWndContent').src=contentUrl;
				if($('wndFrmCloseBtnRnd'))$('wndFrmCloseBtnRnd').observe('click',function(e){
					webfarm_ns.closeInnerWndwReload(e);Event.stop(e);return false;
				});
			}
		},
		innerWndwUrl:function(url, contentWidth, contentHeight, scrolling){
			$$(".visOff").each(function(obj){obj.style.visibility="hidden";});

			if((contentHeight+80)>document.viewport.getHeight()){
				contentHeight=document.viewport.getHeight()-86;
				scrolling=true;
			}
			var contentUrl = url;
			var scrollVal = scrolling?('yes'):('no');
			var frameTitle = '';

			if(document.body){
				var closeWindTitle="";
				try{closeWindTitle=txtValCloseWindow;}catch(e){closeWindTitle="";}
				if(!$('wf_innerWndFrmWrap'))
				Element.insert(document.body, "<div id='wf_innerWndFrmWrap'></div>");
				if($('wf_innerWndFrmWrap'))$('wf_innerWndFrmWrap').update(
					"<div id='wf_innerWndFrmOverlay'>&nbsp;</div>" +
					"<div id='wf_innerWndWrap' style='margin:-"+((contentHeight+80)/2)+"px 0 0 -"+((contentWidth+40)/2)+"px;width:"+(contentWidth+40)+"px;'><div class='borderWrap'><div id='wf_inWndTopLeft'></div><div id='wf_inWndTopBg' style='width:"+(contentWidth+20)+"px;'></div><div id='wf_inWndTopRight'></div></div>"+
					"<div id='wf_inWndBody' style='width:"+(contentWidth+39)+"px;'><div id='wf_inWndTitleWrap' style='width:"+(contentWidth+30)+"px;'><span id='wf_inWndTitleMsg'>"+frameTitle+"</span><div id='wndFrmCloseBtnRnd' title='"+closeWindTitle+"'></div></div><iframe src='about:blank' id='innWndContent' width='"+contentWidth+"' height='"+contentHeight+"' style='width:"+contentWidth+"px;height:"+contentHeight+"px; ' scrolling='"+scrollVal+"' frameborder='0'></iframe></div>"+
					"<div class='borderWrap'><div id='wf_inWndBotLeft'></div><div id='wf_inWndBotBg' style='width:"+(contentWidth+20)+"px;'></div><div id='wf_inWndBotRight'></div></div>");
				$('innWndContent').src=contentUrl;
				if($('wndFrmCloseBtnRnd'))$('wndFrmCloseBtnRnd').observe('click',function(e){
					webfarm_ns.closeInnerWnd(e);Event.stop(e);return false;
				});
			}
		},
		innerWndwUrlwReload:function(url, contentWidth, contentHeight, scrolling){
			$$(".visOff").each(function(obj){obj.style.visibility="hidden";});

			if((contentHeight+80)>document.viewport.getHeight()){
				contentHeight=document.viewport.getHeight()-86;
				scrolling=true;
			}
			var contentUrl = url;
			var scrollVal = scrolling?('yes'):('no');
			var frameTitle = '';

			if(document.body){
				var closeWindTitle="";
				try{closeWindTitle=txtValCloseWindow;}catch(e){closeWindTitle="";}
				if(!$('wf_innerWndFrmWrap'))
				Element.insert(document.body, "<div id='wf_innerWndFrmWrap'></div>");
				if($('wf_innerWndFrmWrap'))$('wf_innerWndFrmWrap').update(
					"<div id='wf_innerWndFrmOverlay'>&nbsp;</div>" +
					"<div id='wf_innerWndWrap' style='margin:-"+((contentHeight+80)/2)+"px 0 0 -"+((contentWidth+40)/2)+"px;width:"+(contentWidth+40)+"px;'><div class='borderWrap'><div id='wf_inWndTopLeft'></div><div id='wf_inWndTopBg' style='width:"+(contentWidth+20)+"px;'></div><div id='wf_inWndTopRight'></div></div>"+
					"<div id='wf_inWndBody' style='width:"+(contentWidth+39)+"px;'><div id='wf_inWndTitleWrap' style='width:"+(contentWidth+30)+"px;'><span id='wf_inWndTitleMsg'>"+frameTitle+"</span><div id='wndFrmCloseBtnRnd' title='"+closeWindTitle+"'></div></div><iframe src='about:blank' id='innWndContent' width='"+contentWidth+"' height='"+contentHeight+"' style='width:"+contentWidth+"px;height:"+contentHeight+"px; ' scrolling='"+scrollVal+"' frameborder='0'></iframe></div>"+
					"<div class='borderWrap'><div id='wf_inWndBotLeft'></div><div id='wf_inWndBotBg' style='width:"+(contentWidth+20)+"px;'></div><div id='wf_inWndBotRight'></div></div>");
				$('innWndContent').src=contentUrl;
				if($('wndFrmCloseBtnRnd'))$('wndFrmCloseBtnRnd').observe('click',function(e){
					webfarm_ns.closeInnerWndwReload(e);Event.stop(e);return false;
				});
			}
		},
		closeInnerWnd:function(e){
			$$(".visOff").each(function(obj){obj.style.visibility="visible";});
			if($('wf_innerWndFrmWrap'))Element.remove('wf_innerWndFrmWrap');
			Event.stopObserving(window, 'keypress', webfarm_ns.returnHandler);
		},
		closeInnerWndwReload:function(e){
			$$(".visOff").each(function(obj){obj.style.visibility="visible";});
			if($('wf_innerWndFrmWrap'))Element.remove('wf_innerWndFrmWrap');
			Event.stopObserving(window, 'keypress', webfarm_ns.returnHandler);
			location.reload();
		},
		returnHandler:function(event){
			if (Event.KEY_RETURN == event.keyCode || Event.KEY_ESC == event.keyCode){webfarm_ns.closeInnerWnd();}
		},
		innerWndAlert:function(message){
			$$(".visOff").each(function(obj){obj.style.visibility="hidden";});
			var frameTitle = '';
			var contentWidth = 350;
			var contentHeight = 150;
			if(document.body){
				if(!$('wf_innerWndFrmWrap'))
				Element.insert(document.body, "<div id='wf_innerWndFrmWrap'></div>");
				if($('wf_innerWndFrmWrap'))$('wf_innerWndFrmWrap').update(
				"<div id='wf_innerWndFrmOverlay'>&nbsp;</div>" +
				"<div id='wf_innerWndWrap' style='margin:-"+((contentHeight+80)/2)+"px 0 0 -"+((contentWidth+40)/2)+"px;width:"+(contentWidth+40)+"px;'><div class='borderWrap'><div id='wf_inWndTopLeft'></div><div id='wf_inWndTopBg' style='width:"+(contentWidth+20)+"px;'></div><div id='wf_inWndTopRight'></div></div>"+
				"<div id='wf_inWndBody' style='width:"+(contentWidth+39)+"px;height:"+(contentHeight)+"px;'><div id='wf_inWndTitleWrap' style='width:"+(contentWidth+30)+"px;'><div id='wndFrmCloseBtnRnd'></div></div><br class='clr'/><br/><span class='msg'>"+message+"<br/><br/><br/><span id='wndFrmAcceptBtn' onclick='Element.remove(\"wf_innerWndFrmWrap\");webfarm_ns.closeInnerWnd();' >OK</span></span></div>"+
				"<div class='borderWrap'><div id='wf_inWndBotLeft'></div><div id='wf_inWndBotBg' style='width:"+(contentWidth+20)+"px;'></div><div id='wf_inWndBotRight'></div></div>");
				$('wndFrmAcceptBtn').focus();
				Event.observe('wndFrmAcceptBtn', 'keypress', webfarm_ns.returnHandler);
				Event.observe(window, 'keypress', webfarm_ns.returnHandler);
				if($('wndFrmCloseBtnRnd'))$('wndFrmCloseBtnRnd').observe('click',function(e){
					$$(".visOff").each(function(obj){obj.style.visibility="visible";});
					webfarm_ns.closeInnerWnd(e);Event.stop(e);return false;
				});
			}
		},
		innerWndLogin:function(dest){
			$$(".visOff").each(function(obj){obj.style.visibility="hidden";});
			var contentWidth = 400;
			var contentHeight = 200;
			var scrolling=false;
			if((contentHeight+80)>document.viewport.getHeight()){
				contentHeight=document.viewport.getHeight()-86;
				scrolling=true;
			}
			var contentUrl = "/xchanger/cars/loginframe.jsp?srcPage="+encodeURI(location.href)+"&dstPage="+encodeURI(dest);
			var scrollVal = scrolling?('yes'):('no');
			var frameTitle = "";
			try{
				frameTitle = loginFrameTitle;
			}catch(e){}

			if(document.body){
				var closeWindTitle="";
				try{closeWindTitle=txtValCloseWindow;}catch(e){closeWindTitle="";}
				if(!$('wf_innerWndFrmWrap'))
				Element.insert(document.body, "<div id='wf_innerWndFrmWrap'></div>");
				if($('wf_innerWndFrmWrap'))$('wf_innerWndFrmWrap').update(
					"<div id='wf_innerWndFrmOverlay'>&nbsp;</div>" +
					"<div id='wf_innerWndWrap' style='margin:-"+((contentHeight+80)/2)+"px 0 0 -"+((contentWidth+40)/2)+"px;width:"+(contentWidth+40)+"px;'><div class='borderWrap'><div id='wf_inWndTopLeft'></div><div id='wf_inWndTopBg' style='width:"+(contentWidth+20)+"px;'></div><div id='wf_inWndTopRight'></div></div>"+
					"<div id='wf_inWndBody' style='width:"+(contentWidth+39)+"px;'><div id='wf_inWndTitleWrap' style='width:"+(contentWidth+30)+"px;'><span id='wf_inWndTitleMsg'>"+frameTitle+"</span><div id='wndFrmCloseBtnRnd' title='"+closeWindTitle+"'></div></div>" +
					"<iframe src='about:blank' id='innWndContent' width='"+contentWidth+"' height='"+contentHeight+"' style='width:"+contentWidth+"px;height:"+contentHeight+"px; ' scrolling='"+scrollVal+"' frameborder='0'></iframe>" +
					"</div>"+
					"<div class='borderWrap'><div id='wf_inWndBotLeft'></div><div id='wf_inWndBotBg' style='width:"+(contentWidth+20)+"px;'></div><div id='wf_inWndBotRight'></div></div>");
				$('innWndContent').src=contentUrl;
				if($('wndFrmCloseBtnRnd'))$('wndFrmCloseBtnRnd').observe('click',function(e){
					webfarm_ns.closeInnerWnd(e);Event.stop(e);return false;
				});
			}
		},
		innerWndLoginReview:function(dest){
			$$(".visOff").each(function(obj){obj.style.visibility="hidden";});
			var contentWidth = 400;
			var contentHeight = 200;
			var scrolling=false;
			if((contentHeight+80)>document.viewport.getHeight()){
				contentHeight=document.viewport.getHeight()-86;
				scrolling=true;
			}
			var contentUrl = "/xchanger/cars/loginframereview.jsp?dstPage="+encodeURI(dest);

			var scrollVal = scrolling?('yes'):('no');
			var frameTitle = "";

			try{
				frameTitle = loginFrameTitle;
			}catch(e){}

			if(document.body){
				var closeWindTitle="";
				try{closeWindTitle=txtValCloseWindow;}catch(e){closeWindTitle="";}
				if(!$('wf_innerWndFrmWrap'))
				Element.insert(document.body, "<div id='wf_innerWndFrmWrap'></div>");
				if($('wf_innerWndFrmWrap'))$('wf_innerWndFrmWrap').update(
					"<div id='wf_innerWndFrmOverlay'>&nbsp;</div>" +
					"<div id='wf_innerWndWrap' style='margin:-"+((contentHeight+80)/2)+"px 0 0 -"+((contentWidth+40)/2)+"px;width:"+(contentWidth+40)+"px;'><div class='borderWrap'><div id='wf_inWndTopLeft'></div><div id='wf_inWndTopBg' style='width:"+(contentWidth+20)+"px;'></div><div id='wf_inWndTopRight'></div></div>"+
					"<div id='wf_inWndBody' style='width:"+(contentWidth+39)+"px;'><div id='wf_inWndTitleWrap' style='width:"+(contentWidth+30)+"px;'><span id='wf_inWndTitleMsg'>"+frameTitle+"</span><div id='wndFrmCloseBtnRnd' title='"+closeWindTitle+"'></div></div>" +
					"<iframe src='about:blank' id='innWndContent' width='"+contentWidth+"' height='"+contentHeight+"' style='width:"+contentWidth+"px;height:"+contentHeight+"px; ' scrolling='"+scrollVal+"' frameborder='0'></iframe>" +
					"</div>"+
					"<div class='borderWrap'><div id='wf_inWndBotLeft'></div><div id='wf_inWndBotBg' style='width:"+(contentWidth+20)+"px;'></div><div id='wf_inWndBotRight'></div></div>");
				$('innWndContent').src=contentUrl;
				if($('wndFrmCloseBtnRnd'))$('wndFrmCloseBtnRnd').observe('click',function(e){
					webfarm_ns.closeInnerWnd(e);Event.stop(e);return false;
				});
			}
		},
		setCookie:function(name,value,days) {
			if(days){
				var date = new Date();
				date.setTime(date.getTime()+(days*24*60*60*1000));
				var expires = ";expires="+date.toGMTString();
			}else{expires = "";}
			document.cookie = name+"="+value+expires+";path=/";
		},
		readCookie:function(name) {
			var needle = name + "=";
			var cookieArray = document.cookie.split(';');
			for(var i=0;i <cookieArray.length;i++) {
				var pair = cookieArray[i];
				while (pair.charAt(0)==' '){pair = pair.substring(1, pair.length);}
				if (pair.indexOf(needle) == 0){return pair.substring(needle.length, pair.length);}
			}
			return null;
		},
		formRadioboxIndexesClick:function(evt,pValue,pCheckID,pState,charIndex)
		{
			var chObj=getObj(pCheckID);
			if(chObj==null){return false;}
			var stObj=getObj(pValue);
			if(stObj==null){return false;}
			var stValue=stObj.value;
			if(stValue==""){return false;}
			var chPos=charIndex;
			var stValueStart=stValue.substring(0,chPos);
			var stValueEnd=stValue.substring(chPos+1);
			var stClass="";
			if(pState==""){	if(chObj.checked==true){ pState="1"; }else{	pState="0";	}	}
			if(chObj.checked==false){ pState="0";} //pokud je v pState predana nejaka hodnota, predchozi prikaz by vyhledavani nevypnul
			stValue=stValueStart+pState+stValueEnd;
			if(pState=="0"){stClass="Norm";}else{stClass="On";}
			var chObjVal=getObj(pCheckID+"Item");
			if(chObjVal!=null){	chObjVal.className="webfarm_popCarAccItem webfarm_popCarAccItem-"+stClass; }
			stObj.value=stValue;
			return true;
		},

		rightSkyDefaultOffset : null,
		scrollSkyInit:function(){
			if($('rightSky')){
			webfarm_ns.rightSkyDefaultOffset = $('rightSky').cumulativeOffset()[1];
			if($('rightSky')&&$('bottomCnt')){
				webfarm_ns.moveSky();
				Event.observe(window,'scroll',function(e){
					webfarm_ns.moveSky();
				});
			}}
		},
		moveSky:function(){
			var movingDiv = $('rightSky');
			var divPosition = $('rightSky').cumulativeOffset()[1];
			var limiterPosition = $('bottomCnt').cumulativeOffset()[1];
			if(document.documentElement&&document.documentElement.scrollTop){var bodyOffset=document.documentElement.scrollTop;
			}else{if(document.body){var bodyOffset=document.body.scrollTop;}}
			if(bodyOffset>webfarm_ns.rightSkyDefaultOffset){
				if((bodyOffset+movingDiv.offsetHeight)>=limiterPosition){skyscrapPos=2;movingDiv.style.position="absolute";movingDiv.style.top=(limiterPosition-webfarm_ns.rightSkyDefaultOffset-movingDiv.offsetHeight)+"px";
				}else{
					skyscrapPos=1;
					if(document.attachEvent&&!window.opera){movingDiv.style.top=(bodyOffset-webfarm_ns.rightSkyDefaultOffset)+"px";movingDiv.style.top="0px";movingDiv.style.position="fixed";
					}else{movingDiv.style.top="0px";movingDiv.style.position="fixed";}
				}
			}else{movingDiv.style.position="absolute";skyscrapPos=0;}
		}
	};
	return public;
}();

function region(kraj){
	var regs=new Array("regAll","regU","regL","regK","regP","regS","regA","regH","regE","regC","regV","regB","regM","regZ","regT");
	for(i=0;i<regs.length;i++){
		if(document.getElementById(regs[i]))
			document.getElementById(regs[i]).style.display='none';
	}
	if(kraj=="")kraj="All";
	$("reg"+kraj).style.display='block';
}

function changeParamCombo(combo){
 var paramKey = combo.id.replace('prmId','') + '=';
 var regexp = new RegExp('^('+ paramKey+')\\d{7},{0,1}|,{0,1}('+ paramKey+')\\d{7}');
 var value = $('paramsHid').value;
 value = value.replace(regexp,'');
 if(combo.value!='XX')
 {
  if(value.length>0)value = value + ",";
  value = value + paramKey + combo.value;
 }
 $('paramsHid').value = value;
}

function fillParamFields(value,clearHid){
 if(value != 'XX'){
  AjaxFunctions.getParamCombosByCategoryId(value,function(data){
   if(data!=null && data.length>0){
	   $('dynamicForm').innerHTML = data;
	   $('dynamicFs').style.display='block';
   }else{
	   $('dynamicForm').innerHTML = '';
	   $('dynamicFs').style.display='none';
   }
   if($('paramsHid')&& clearHid)$('paramsHid').value='';
  });
 }else{
	 $('dynamicForm').innerHTML = '';
	 $('dynamicFs').style.display='none';
	 if($('paramsHid')&& clearHid)$('paramsHid').value='';
 }
}

function setParamsValue(){
 if($('paramsHid') && $('paramsHid').value.length>0){
  var values = $('paramsHid').value.split(",");
  for(var i=0;i<values.length;i++){
   var item  = values[i].split('=');
   var id = 'prmId' + item[0];
   var ss = $(id);
   if($(id))$(id).value = item[1];
  }
 }
}

function resetCategoryAndParams(){
 if($('katId'))$('katId').value = 'XX';
 if($('paramsHid'))$('paramsHid').value='';
 if($('dynamicForm'))$('dynamicForm').innerHTML = '';
 if($('dynamicFs'))$('dynamicFs').style.display='none';
}

function closeInnWnd(){
	webfarm_ns.closeInnerWnd();
}
function closeInnWndwReload(){
	webfarm_ns.closeInnerWndwReload();
}
function closeLoginPageNewWindow(target,width,height){
	if(target && target!=''){
		webfarm_ns.closeInnerWnd();
		webfarm_ns.innerWndwUrlwReload(target,width,height,false);
	}else{
		webfarm_ns.closeInnerWndwReload();
	}
}
function closeLoginPageAlert(msg){
	webfarm_ns.closeInnerWnd();
	webfarm_ns.innerWndAlert(msg);
}
function closeLoginPageRegister(){
	webfarm_ns.closeInnerWnd();
	webfarm_ns.innerWndwUrl('/xchanger/cars/registrace.jsp',430,420,false);
}

document.observe('dom:loaded', webfarm_ns.init);


