Function.prototype.getName=function(){var aTemp;if(typeof this.name=='string'){return this.name;}
else{aTemp=/function\s([\w]+)\(/g.exec(this.toString());return this.name=(aTemp!=null&&typeof aTemp[1]!='undefined')?aTemp[1]:'';};};String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,'');};String.prototype.escapeHTML=function(){var s=this.toString();s=s.replace(/\&/g,'&amp;');s=s.replace(/\</g,'&lt;');s=s.replace(/\>/g,'&gt;');return s;};String.prototype.unescapeHTML=function(){var s=this.toString();s=s.replace(/\&lt;/g,'<');s=s.replace(/\&gt;/g,'>');s=s.replace(/\&amp;/g,'&');return s;};String.prototype.toInt=function(nBase){var nVal;if(typeof(nBase)=='undefined'){nBase=10;};nVal=parseInt(this.toString(),nBase);if(isNaN(nVal)){nVal=0;};return nVal;};String.prototype.toFloat=function(){return parseFloat(('0'+this.toString()).replace(/[^0-9]/g,''),10)};String.prototype.toSequence=function(){return this.toString().replace(/[^0-9]/g,'');};String.prototype.endsWith=function(sEnd){if(typeof sEnd!='string'){sEnd=sEnd.toString();};return(this.toString().substring(this.toString().length-sEnd.length,this.toString().length)==sEnd)?true:false;};String.prototype.startsWith=function(sStart,nStart){if(typeof sStart!='string'){sStart=sStart.toString();};if(!nStart){nStart=0;};if(typeof nStart!='number'){nStart=nStart.toString().toInt();};return(this.toString().substring(nStart,nStart+sStart.length)==sStart)?true:false;};String.prototype.toUpperCaseFirst=function(){return this.toString().charAt(0).toUpperCase()+this.toString().substring(1,this.toString().length);};String.prototype.toUpperCaseWords=function(){var i,aString=this.toString().split(' ');for(i=0;i<aString.length;i++){aString[i]=aString[i].toUpperCaseFirst();};return aString.join(' ');};var is={getUserAgents:function(){this.geckoGetRv=function(){var aTemp=/rv:(\d+\.)(\d+(\.\d+)?)/g.exec(this.agent);return aTemp[1]+aTemp[2].toSequence();};this.getVersion=function(){var sId;switch(this.app){case'gecko':return this.geckoRv;break;case'ie':sId='msie ';break;case'opera':sId=(this.agent.indexOf('opera/')>-1)?'opera/':'opera ';break;case'khtml':sId=(this.saf)?'applewebkit/':'konqueror/';break;case'ns4':sId='mozilla/';break;};return parseFloat('0'+this.agent.substr(this.agent.indexOf(sId)+sId.length),10);};this.ver=navigator.appVersion.toLowerCase();this.agent=navigator.userAgent.toLowerCase();this.platform=navigator.platform.toLowerCase();this.product=new String(navigator.product).toLowerCase();this.productSub=new String(navigator.productSub).toLowerCase();this.vendor=new String(navigator.vendor).toLowerCase();this.vendorSub=new String(navigator.vendorSub).toLowerCase();this.opera=typeof(window.opera)!='undefined';this.dom=document.getElementById?true:false;this.compatMode=new String(document.compatMode).toLowerCase();this.win=this.platform.indexOf("win")>-1;this.linux=(this.platform.indexOf("linux")>-1||this.platform.indexOf("x11")>-1);this.mac=this.platform.indexOf("mac")>-1;this.khtml=(this.agent.indexOf("khtml")>-1||this.product.indexOf("khtml")>-1);this.konq=(this.agent.indexOf("konqueror")>-1||this.product.indexOf("konqueror")>-1);this.saf=(this.agent.indexOf("safari")>-1||this.ver.indexOf("safari")>-1);this.opera=(this.opera||this.agent.indexOf("opera")>-1);this.opera5=(this.opera&&this.agent.indexOf("opera 5")>-1);this.opera6=(this.opera&&(this.agent.indexOf("opera 6")>-1||this.agent.indexOf("opera/6")>-1));this.opera7=(this.opera&&(this.agent.indexOf("opera 7")>-1||this.agent.indexOf("opera/7")>-1));this.opera8=(this.opera&&(this.agent.indexOf("opera 8")>-1||this.agent.indexOf("opera/8")>-1));this.ie=(this.ver.indexOf('msie')!=-1&&!this.opera)?true:false;this.ie4=(document.all&&!this.dom&&!this.opera)?true:false;this.ie5=(document.all&&this.ver.indexOf("msie 5.0")>-1&&!this.opera)?true:false;this.ie5mac=(this.ie5&&this.mac)?true:false;this.ie55=(document.all&&this.ver.indexOf("msie 5.5")>-1&&!this.opera)?true:false;this.ie6=(document.all&&this.ver.indexOf("msie 6")>-1&&!this.opera)?true:false;this.ie7=(document.all&&this.ver.indexOf("msie 7")>-1&&!this.opera)?true:false;this.ieJSBuild=(this.ie)?ScriptEngineBuildVersion():'';this.ieJSVersion=(this.ie)?ScriptEngineMajorVersion()+'.'+ScriptEngineMinorVersion():'';this.ns4=(document.layers&&!this.dom)?true:false;this.gecko=(this.product=="gecko"&&!this.khtml)?true:false;this.geckoRv=(this.gecko)?this.geckoGetRv():0;this.gecko1=(this.gecko&&Number(this.productSub)>20020530)?true:false;this.moz1=(this.gecko&&this.vendor==''&&!(this.geckoRv<1))?true:false;this.ns6=(this.gecko&&this.vendor=='netscape6'&&parseFloat(this.vendorSub)>=6&&parseFloat(this.vendorSub)<7)?true:false;this.ns7=(this.gecko&&this.vendor=='netscape'&&parseFloat(this.vendorSub)>=7)?true:false;this.ff=(this.gecko&&(this.vendor=='mozilla firebird'||this.vendor=='phoenix'||this.vendor=='firefox'));this.cm=(this.gecko&&(this.vendor=='chimera'||this.vendor=='camino'));this.beo=(this.gecko&&this.vendor=='beonex');this.kmel=(this.agent.indexOf('k-meleon')>-1)?true:false;this.app=((this.ie)?'ie':(this.gecko)?'gecko':(this.opera)?'opera':(this.khtml)?'khtml':(this.ns4)?'ns4':'undefined');this.appVer=this.getVersion();this.bs4=(this.ie||this.ns4||this.gecko||this.opera||this.khtml);this.bs5=((this.ie&&this.appVer>=5.5)||this.gecko||(this.opera&&this.appVer>=7)||this.saf);this.bss=(this.gecko||(this.opera&&this.appVer>=7)||this.khtml);this.min=(this.bs5||this.ie5||this.opera||this.khtml);return this;}};is.getUserAgents();function addEvent(obj,type,fn){if(obj.addEventListener){obj.addEventListener(type,fn,false);}
else if(obj.attachEvent){obj['e'+type+fn]=fn;obj[type+fn]=function(){obj['e'+type+fn](window.event);};obj.attachEvent('on'+type,obj[type+fn]);};};function removeEvent(obj,type,fn){if(obj.removeEventListener){obj.removeEventListener(type,fn,false);}
else if(obj.detachEvent){obj.detachEvent('on'+type,obj[type+fn]);obj[type+fn]=null;};};function removeClass(el,sClassName){var i,aClass,aNewClass=[];if(hasClass(el,sClassName)){aClass=el.className.split(' ');for(i=aClass.length;i>0;){if(aClass[--i]!=sClassName){aNewClass.unshift(aClass[i]);};};el.className=aNewClass.join(' ');};return el.className;};function addClass(el,sClassName){if(el.className==''){el.className=sClassName;}
else if(!hasClass(el,sClassName)){el.className+=' '+sClassName;};return el.className;};function hasClass(el,sClassName){var i,aClass;aClass=el.className.split(' ');for(i=aClass.length;i>0;){if(aClass[--i]==sClassName){return true;};};return false;};function getChildIndex(elChild){var i;if(elChild.parentNode==null){return null;};for(i=0;i<elChild.parentNode.childNodes.length;i++){if(elChild.parentNode.childNodes.item(i)==elChild){return i;break;};};return null;}
function getContextNodes(elRoot,aType){var aNodes=[];function searchNodes(el){var i,j;if(!el.hasChildNodes()){return;};for(i=0;i<el.childNodes.length;i++){for(j=0;j<aType.length;j++){if(el.childNodes.item(i).nodeType==aType[j]){aNodes[aNodes.length]=el.childNodes.item(i);break;};};if(el.childNodes[i].nodeType==Node.ELEMENT_NODE){searchNodes(el.childNodes.item(i));};};};searchNodes(elRoot);return aNodes;}
function getAllChildElement(elRoot){elRoot.allEl=getContextNodes(elRoot,[Node.ELEMENT_NODE]);};function getAllChildNode(elRoot){elRoot.allNodes=getContextNodes(elRoot,[Node.ELEMENT_NODE,Node.TEXT_NODE,Node.CDATA_SECTION_NODE,Node.COMMENT_NODE]);};function getFirstElement(el){var i;if(!el.hasChildNodes()){return null;};for(i=0;i<el.childNodes.length;i++){if(el.childNodes.item(i).nodeType==Node.ELEMENT_NODE){return el.childNodes.item(i);break;};};return null;};function getLastElement(el){var i;if(!el.hasChildNodes()){return null;};for(i=el.childNodes.length-1;i>=0;i--){if(el.childNodes.item(i).nodeType==Node.ELEMENT_NODE){return el.childNodes.item(i);break;};};return null;};function getNextElement(elChild){function getNext(el){if(el.nextSibling==null){return null;};if(el.nextSibling.nodeType==Node.ELEMENT_NODE){return el.nextSibling;};return getNext(el.nextSibling);};return getNext(elChild);};function getPreviousElement(elChild){function getPrevious(el){if(el.previousSibling==null){return null;};if(el.previousSibling.nodeType==Node.ELEMENT_NODE){return el.previousSibling;};return getPrevious(el.previousSibling);};return getPrevious(elChild);};function removeEmptyTextNode(elRoot){var re,aNodes,aRemovedNodes=[];re=/^[\s\n\t]*$/;aNodes=getContextNodes(elRoot,[Node.TEXT_NODE]);for(i=0;i<aNodes.length;i++){if(aNodes[i].nodeType!=Node.TEXT_NODE){continue;};if(re.test(aNodes[i].nodeValue)){aRemovedNodes[aRemovedNodes.length]=aNodes[i].parentNode.removeChild(aNodes[i]);};};return aRemovedNodes;};function getTextContent(nodeRoot){switch(nodeRoot.nodeType){case 2:case 5:case 6:case 7:case 9:case 10:case 11:case 12:return'';break;case 1:case 3:case 4:case 8:if(is.gecko){return nodeRoot.textContent;}
else{return(nodeRoot.innerText)?nodeRoot.innerText:nodeRoot.nodeValue;};};};function isSpecified(nodeEl,sAttribute){if(is.ie||(is.opera&&this.appVer>=7)){if(typeof nodeEl.attributes[sAttribute]!='undefined'){return nodeEl.attributes[sAttribute].specified;};if(is.ie5||is.ie55){return(nodeEl.getAttribute(sAttribute))?true:false;}
else if(is.ie6||is.ie7||((is.opera&&this.appVer>=7))){return(nodeEl.attributes.getNamedItem(sAttribute))?true:false;};}
else if(is.bss){return nodeEl.hasAttribute(sAttribute);};};function getAttributeIndex(nodeEl,sAttribute){var i;sAttribute=sAttribute.toLowerCase();for(i=0;i<nodeEl.attributes.length;i++){if(nodeEl.attributes.item(i).nodeName.toLowerCase()==sAttribute){return i;};};return null;};function createId(el){if(isSpecified(el,'id')){return el.id;};if(is.ie){return el.uniqueID;}
else{function getRandom(){var strNum=Math.random().toString().toFloat();if(strNum==0||strNum==1){return getRandom();};return strNum;};return'rID-'+getRandom();};};function getComputedStylePropertyValue(elNode,sStyleProperty,sPseudoProperty){var aResult,i;if(window.getComputedStyle){return window.getComputedStyle(elNode,sPseudoProperty).getPropertyValue(sStyleProperty);}
else if(elNode.currentStyle){aResult=sStyleProperty.split('-');for(i=1;i<aResult.length;i++){aResult[i]=aResult[i].toUpperCaseFirst();};sStyleProperty=aResult.join('');return elNode.currentStyle.getAttribute(sStyleProperty);};return elNode.style.getPropertyValue(sStyleProperty);};function makeUnselectable(el){if(el.nodeType!=Node.ELEMENT_NODE){return false;};if(is.ie){el.setAttribute('unselectable','on');el.setAttribute('hidefocus',true);}
else if(is.gecko){el.style.MozUserSelect='none';el.style.MozUserFocus='none';};return el;};function displayChanger(el,bValue){var oDisplay,sNodeName,sStyle;if(el.nodeType!=Node.ELEMENT_NODE){return null;};oDisplay={'iframe':['inline','inline'],'body':['block','block'],'p':['block','block'],'div':['block','block'],'span':['inline','inline'],'table':['table','block'],'tbody':['table-row-group','block'],'tfoot':['table-footer-group','block'],'thead':['table-header-group','block'],'tr':['table-row','block'],'td':['table-cell','block'],'th':['table-cell','block'],'ul':['block','block'],'ol':['block','block'],'li':['list-item','list-item'],'dl':['block','block'],'dt':['block','block'],'dd':['block','block'],'input':['inline','inline'],'button':['inline','inline'],'textarea':['inline','inline'],'a':['inline','inline']};sNodeName=el.nodeName.toLowerCase();if(typeof oDisplay[sNodeName]=='undefined'){return null;};if(typeof(bValue)!='undefined'){el.style.display=(bValue==false)?'none':is.ie?oDisplay[sNodeName][1]:oDisplay[sNodeName][0];}
else{sStyle=el.style.display==''?getComputedStylePropertyValue(el,'display',''):el.style.display;el.style.display=!(sStyle=='none'||sStyle=='')?'none':is.ie?oDisplay[sNodeName][1]:oDisplay[sNodeName][0];};return el.style.display;};function createFullOffset(el,elRoot){if(el.nodeType!=Node.ELEMENT_NODE){return{offsetX:null,offsetY:null};};if(typeof elRoot!='undefined'||!(document.getBoxObjectFor||el.getBoundingClientRect)){function getFullOffset(el){var aOffset=[],aTempOffset=[];aOffset[0]=el.offsetLeft;aOffset[1]=el.offsetTop;if(el.offsetParent!=null&&el.offsetParent!=elRoot){aTempOffset=getFullOffset(el.offsetParent);aOffset[0]+=aTempOffset[0];aOffset[1]+=aTempOffset[1];};return aOffset;};if(typeof elRoot=='undefined'){elRoot=el.ownerDocument.documentElement||el.ownerDocument.body;};var aFullOffset=getFullOffset(el);el.offsetX=aFullOffset[0];el.offsetY=aFullOffset[1];return{offsetX:el.offsetX,offsetY:el.offsetY};};if(document.getBoxObjectFor){var oBoxObject=el.ownerDocument.getBoxObjectFor(el);return{offsetX:oBoxObject.x,offsetY:oBoxObject.y};};if(el.getBoundingClientRect){var oTextRectangle=el.getBoundingClientRect();return{offsetX:oTextRectangle.left,offsetY:oTextRectangle.top};};};

function makeSwfString(sString){var aSwf=sString.split(',');var sSwfString='<div id="'+aSwf[1]+'">'
+'</div>'
+'<script type="text/javascript">'
+'/*<![CDATA[*/'
+'  var so = new SWFObject("'+aSwf[0]+'", "'+aSwf[1]+'_name", "'+aSwf[2]+'", "'+aSwf[3]+'", "'+aSwf[4]+'", "");'
+'  so.addParam("quality", "medium");'
+'  so.write("'+aSwf[1]+'");'
+'/* ]]>*/'
+'</script>';return sSwfString;}
function selectRandomBanner(aItems){var sString=aItems[Math.floor(Math.random()*aItems.length)];if(/\.swf/.test(sString)){return makeSwfString(sString);}
else{return sString||'';}}
addEvent(window,'load',function(){if(hasClass(document.body,'contact-us')){proform.config.submitError='Missing data!';proform.initForm('contact_form');proform.addGroup({id:'contact_data',elements:['name','company','email','message'],validate:true,processor:function(oT){var aReturn=[];aReturn.push(proform.condition.required(oT.name.value=='',[oT.name]));aReturn.push(proform.condition.required(oT.email.value=='',[oT.email]));aReturn.push(proform.condition.warning(oT.email.value!=''&&!proform.condition.checkFormat('email',oT.email.value),[oT.email],['Wrong email format.']));aReturn.push(proform.condition.required(oT.message.value=='',[oT.message]));return proform.condition.totalize(aReturn);}});proform.init();}
$(document).ready(function(){$('.rake-race-table tr').bind('mouseover',function(){$(this).addClass('highlight');}).bind('mouseout',function(){$(this).removeClass('highlight');});$(".rake-race-table").tablesorter({cssAsc:'asc',cssDesc:'desc',headers:{0:{sorter:false},6:{sorter:false}},7:{sorter:'shortDate'},8:{sorter:'shortDate'},9:{sorter:'percent'},widgets:['columnHighlight'],dateFormat:'uk'});});});