// minified with http://fmarcia.info/jsmin/test.html

Estate={}
Estate.Custom=(function(){return{ActiveClassToggleReset:function(collectionParentId,tagName){var error;error=Estate.Check.ElementById(collectionParentId);if(error!="")throw new Error(error);error=Estate.Check.VariableType(tagName,"string")
if(error!="")throw new Error(error);var collectionParent=document.getElementById(collectionParentId)
var elementsCollection=collectionParent.getElementsByTagName(tagName)
for(var i=0;i<elementsCollection.length;i++){elementsCollection[i].className=elementsCollection[i].className.replace("active","")}}}})();Estate.Events=(function(){return{AddEvent:function(element,newFunction,eventType){var error;error=Estate.Check.VariableType(element,"object")
if(error!="")throw new Error(error);error=Estate.Check.VariableType(newFunction,"function")
if(error!="")throw new Error(error);var oldEvent=eval("element."+eventType);var eventContentType=eval("typeof element."+eventType)
if(eventContentType!='function'){eval("element."+eventType+" = newFunction")}else{eval("element."+eventType+" = function(e) { oldEvent(e); newFunction(e); }")}},ActiveClassToggleInCollection:function(collectionParentId,tagName,eventType){var error;error=Estate.Check.ElementById(collectionParentId);if(error!="")throw new Error(error);error=Estate.Check.VariableType(tagName,"string")
if(error!="")throw new Error(error);error=Estate.Check.VariableType(eventType,"string")
if(error!="")throw new Error(error);var collectionParent=document.getElementById(collectionParentId)
var elementsCollection=collectionParent.getElementsByTagName(tagName)
for(var i=0;i<elementsCollection.length;i++){Estate.Events.AddEvent(elementsCollection[i],function(){Estate.Custom.ActiveClassToggleReset("accordion","li");Estate.CSSTools.ClassToggle(this,"active")},eventType)}}}})();Estate.StringTools=(function(){return{GetFilenameFromUrl:function(){var file_name=document.location.href;var end=(file_name.indexOf("?")==-1)?file_name.length:file_name.indexOf("?");return file_name.substring(file_name.lastIndexOf("/")+1,end);},RemoveMeasurement:function(SuppliedString){var error;error=Estate.Check.VariableType(SuppliedString,"string");if(error!="")throw new Error(error);var StringWithoutMeasure=SuppliedString
StringWithoutMeasure=StringWithoutMeasure.replace("px","")
StringWithoutMeasure=StringWithoutMeasure.replace("em","")
StringWithoutMeasure=StringWithoutMeasure.replace("pt","")
return StringWithoutMeasure}}})();Estate.Forms=(function(){return{InvertCheckboxSelection:function(collectionParent){var error;error=Estate.Check.Element(collectionParent);if(error!="")throw new Error(error);var formFieldsCollection=collectionParent.getElementsByTagName("input")
if(collectionParent.alt=="true"){collectionParent.alt=""}else{collectionParent.alt="true"}
var isAllChecked=collectionParent.alt
for(var i=0;i<formFieldsCollection.length;i++){if(formFieldsCollection[i].type=="checkbox"){if(collectionParent.alt!="true"){formFieldsCollection[i].checked=""}else{formFieldsCollection[i].checked="checked"}}}}}})();Estate.Navigation=(function(){return{LinkBack:function(){if(history.length>0){history.go(-1)
return false}else{return true}}}})();Estate.CSSTools=(function(){return{ClassToggle:function(el,className){var error;error=Estate.Check.Element(el);if(error!="")throw new Error(error);error=Estate.Check.VariableType(className,"string")
if(error!="")throw new Error(error);if(el.className.indexOf(className)<0){el.className+=" "+className}else{while(el.className.indexOf(className)>=0){el.className=el.className.replace(" "+className,"")
el.className=el.className.replace(className,"")}}}}})();Estate.Check=(function(){return{ArgumentsCount:function(CurrentArgumentsLength,CorrectArgumentsLength){if(CurrentArgumentsLength!=CorrectArgumentsLength){return"Wrong number of arguments. There argument count should be "+CorrectArgumentsLength+", but it is "+CurrentArgumentsLength;}
return""},ElementById:function(ElementID,RequiredTagName){if(typeof(ElementID)!="string"){return"Cannot find HTML element with the id '"+ElementID+"', because such an element does not exists.";}
if(!document.getElementById(ElementID)){return"Cannot find HTML element with the id '"+ElementID+"'";}
if(arguments.length>1&&typeof(RequiredTagName)=="string"){if(document.getElementById(ElementID).tagName.toLowerCase()!=RequiredTagName&&RequiredTagName!=""){return"HTML element with ID '"+ElementID+"' has the tagname '"+document.getElementById(ElementID).tagName+"' but it should be '"+RequiredTagName+"'";}}
return""},Element:function(Element){if(typeof(Element.tagName)=="undefined"){return"HTML element expected. Type of checked variable is "+typeof(Element)}
return""},VariableType:function(Variable,ExpectedVariableType){if(typeof(Variable)!=ExpectedVariableType){return"Unexpected variable type. There variable type should be "+ExpectedVariableType+", but it is "+typeof(Variable);}
return""}}})();Estate.GetElements=(function(){return{ByClassName:function(CurrentArgumentsLength,CorrectArgumentsLength){if(document.getElementsByClassName){getElementsByClassName=function(className,tag,elm){elm=elm||document;var elements=elm.getElementsByClassName(className),nodeName=(tag)?new RegExp("\\b"+tag+"\\b","i"):null,returnElements=[],current;for(var i=0,il=elements.length;i<il;i+=1){current=elements[i];if(!nodeName||nodeName.test(current.nodeName)){returnElements.push(current);}}
return returnElements;};}
else if(document.evaluate){getElementsByClassName=function(className,tag,elm){tag=tag||"*";elm=elm||document;var classes=className.split(" "),classesToCheck="",xhtmlNamespace="http://www.w3.org/1999/xhtml",namespaceResolver=(document.documentElement.namespaceURI===xhtmlNamespace)?xhtmlNamespace:null,returnElements=[],elements,node;for(var j=0,jl=classes.length;j<jl;j+=1){classesToCheck+="[contains(concat(' ', @class, ' '), ' "+classes[j]+" ')]";}
try{elements=document.evaluate(".//"+tag+classesToCheck,elm,namespaceResolver,0,null);}
catch(e){elements=document.evaluate(".//"+tag+classesToCheck,elm,null,0,null);}
while((node=elements.iterateNext())){returnElements.push(node);}
return returnElements;};}
else{getElementsByClassName=function(className,tag,elm){tag=tag||"*";elm=elm||document;var classes=className.split(" "),classesToCheck=[],elements=(tag==="*"&&elm.all)?elm.all:elm.getElementsByTagName(tag),current,returnElements=[],match;for(var k=0,kl=classes.length;k<kl;k+=1){classesToCheck.push(new RegExp("(^|\\s)"+classes[k]+"(\\s|$)"));}
for(var l=0,ll=elements.length;l<ll;l+=1){current=elements[l];match=false;for(var m=0,ml=classesToCheck.length;m<ml;m+=1){match=classesToCheck[m].test(current.className);if(!match){break;}}
if(match){returnElements.push(current);}}
return returnElements;};}
return getElementsByClassName(className,tag,elm);}}})();Estate.Layers=(function(){return{GetPositionX:function(obj){var error
error=Estate.Check.Element(obj);if(error!="")throw new Error(error);var x=0
if(obj.offsetParent){while(obj.offsetParent){x+=obj.offsetLeft
obj=obj.offsetParent}}else if(obj.x){x+=obj.x}
return x},GetPositionY:function(obj){var error
error=Estate.Check.Element(obj);if(error!="")throw new Error(error);var y=0
if(obj.offsetParent){while(obj.offsetParent){y+=obj.offsetTop
obj=obj.offsetParent}}else if(obj.y){y+=obj.y}
return y}}})();
