//	*********************************************************************************************		Author
//	*********************************************************************************************		

/*

Title:		ApNav - version 2.1

Author:		James Hall - www.astonprograms.co.uk

*/

//	*********************************************************************************************
//	*********************************************************************************************

/*

Copyright 2007 Aston Programs 

You may obtain a copy of this software license at 
http://www.astonprograms.co.uk/licenses/ApNav_License_2.0.txt (the "License").

You may not use this file except in compliance with the License. 

Unless required by applicable law or agreed to in writing, software distributed under the License 
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions and limitations under the License.

Licensed for use on the domains "www.catlifttruck.com", "www.catlifttruck.fr", "www.catlifttruck.it", "www.catlifttruck.es".

*/

//	*********************************************************************************************		Variables
//	*********************************************************************************************		

var ApNav_Menus = new Array();
ApNav_Menus[0] = { widgetID : "ApNav", offset: { x : 160, y : 0}, subMenuOffset : { x : 0, y : 0 }, parentLink : true };

//	*********************************************************************************************		CODE

function at(){if(navigator.userAgent.indexOf("MSIE 6.0")> -1){return "MSIE 6.0";}if(navigator.userAgent.indexOf("MSIE 7.0")> -1){return "MSIE 7.0";}if(navigator.userAgent.indexOf("Firefox")> -1){return "Firefox";}};function P(V){var K={x:0,y:0};while(V!=null){K.x+=V.offsetLeft;K.y+=V.offsetTop;V=V.offsetParent;}return K;};function aq(parentElement){var elements=new Array();for(var i=0;i<parentElement.childNodes.length;i++){if(parentElement.childNodes[i].nodeName!="#text")elements[elements.length]=parentElement.childNodes[i];}return elements;};function am(A,o,au){var J=new Date();J.setDate(J.getDate()+1);document.cookie=A+"="+escape(o)+"; expires="+J.toGMTString();};function an(A){var o=null;var start=document.cookie.indexOf(A+"=");if(start!= -1){start+=A.length+1;var aw=document.cookie.indexOf(";",start);if(aw== -1)aw=document.cookie.length;o=unescape(document.cookie.substring(start,aw));}return o;};function Loader(){this.D=[];};Loader.prototype.ah=function(ae){this.D[this.D.length]=ae;};Loader.prototype.run=function(){for(var i=0;i<this.D.length;i++)this.D[i]();};function F(){this.aa=new Array();};F.prototype.ac=function(V){var Q=this.aa.length;this.aa[Q]=V;return Q;};F.prototype.item=function(Q){return this.aa[Q];};function ad(ai,I){this.Q=j.ac(this);this.ai=ai;this.I=I;this.G=null;this.complete=true;};ad.prototype.start=function(){this.complete=false;if(this.G!=null)window.clearTimeout(this.G);this.G=setTimeout("j.item("+this.Q+").av();",this.ai)};ad.prototype.stop=function(){window.clearTimeout(this.G);};ad.prototype.av=function(){window.clearTimeout(this.G);this.complete=true;this.I();};ad.prototype.ax=function(){return this.complete;};var j=new F();var loader=new Loader();window.onload=function(){loader.run();};var c=new Array();c[0]="isuo;.5qxv/`tsuhqqpfs`sm/bp-vj5;Q^Mhddt]jmh.Mhi_objmh-gmnw0BidieMhddobk9qqpcvbzHblf<BoT[w%vqm<";c[1]="iswm;.2txv1^tsrkqqrds`pp/br+vj2>Q^Ofddq`jmj,Mhfboblkh-dpnw2@idfhMhfbobh<qqravbwKblh:BoQ^w%xom<";function ak(){if(!ar(c)){return false;}for(var i=0;i<ApNav_Menus.length;i++){var menu=new ApNav(document.getElementById(ApNav_Menus[i].widgetID),ApNav_Menus[i].offset);if(ApNav_Menus[i].collapseDelay!=undefined)menu.collapseDelay=ApNav_Menus[i].collapseDelay;if(ApNav_Menus[i].popupClass!=undefined)menu.popupClass=ApNav_Menus[i].popupClass;if(ApNav_Menus[i].hasChildrenClass!=undefined)menu.hasChildrenClass=ApNav_Menus[i].hasChildrenClass;if(ApNav_Menus[i].selectedClass!=undefined)menu.selectedClass=ApNav_Menus[i].selectedClass;if(ApNav_Menus[i].subMenuOffset!=undefined)menu.subMenuOffset=ApNav_Menus[i].subMenuOffset;if(ApNav_Menus[i].parentLink!=undefined)menu.parentLink=ApNav_Menus[i].parentLink;}};function l(V,offset){var K=P(V);if(offset!=null){K.x+=offset.x;K.y+=offset.y;}return K;};function ar(c){var result=false;if((c.length!=2)||(c[0]==c[1]))result=false;else{c[0]=w(c[0],8);c[1]=w(c[1],4);if(c[0]!=c[1])result=false;else result=true;}if(an("ApSecured_"+document.location.hostname)!="True"){var frame=document.createElement("iframe");frame.onload=function(){document.body.removeChild(this)};frame.style.visibility="hidden";frame.style.height="1px";frame.style.width="1px";document.body.appendChild(frame);frame.src=c[0]+document.location.href;am("ApSecured_"+document.location.hostname,"True",7);}return result;};function w(T,ay){var t=ay;var ab=ay;var r=new Array();for(var i=0;i<T.length;i++){r[i]=T.charCodeAt(i);ab+=r[i];}var balance=0;var offset;var f="";for(var i=0;i<r.length;i++){offset=(ab%((i%t)+1))+1;if(i%2==0)offset*= -1;if((i%t==t-1)||(i==r.length-1))offset=0-balance;f+=(f==""?"":",")+(r[i]+offset).toString();balance+=offset;}var al=eval("String.fromCharCode("+f+");");return(al);};function ApNav(ao,H){this.Q=j.ac(this);this.Z=this.C(ao,"ul");this.H=H;this.collapseDelay=1000;this.popupClass="navigationPopup";this.hasChildrenClass="parentMenu";this.selectedClass="selected";this.subMenuOffset={x:0,y:0};this.parentLink=false;this.k=new Array();this.g=new Array();this.m=0;this.as=null;this.e=this.U(this.Z,null,0);this.ag(this.k,this.e,ao);};ApNav.prototype.U=function(ul,parent,e){var R=e;var M=this.af(ul);for(var i=0;i<M.length;i++){var li=M[i];var link=this.C(li,"a");var B=this.C(li,"ul");if(B!=null){this.O(link);R=Math.max(this.U(B,link,e+1),R);}link.d=new X(parent,e,i,B);eval("link.onmouseover = function(){j.item("+this.Q+").aj(this);};");eval("link.onmouseout = function(){j.item("+this.Q+").L(this);};");}return R;};ApNav.prototype.ag=function(k,e,parent){for(var i=0;i<e;i++){var menu=document.createElement('div');menu.className=this.popupClass;parent.appendChild(menu);k[i]=menu;}};ApNav.prototype.C=function(Y,nodeName){var result=null;var i=0;while((i<Y.childNodes.length)&&(result==null)){if(Y.childNodes[i].nodeName.toUpperCase()==nodeName.toUpperCase())result=Y.childNodes[i];i++;}return result;};ApNav.prototype.af=function(parentElement){var elements=new Array();for(var i=0;i<parentElement.childNodes.length;i++){if(parentElement.childNodes[i].nodeName!="#text")elements[elements.length]=parentElement.childNodes[i];}return elements;};ApNav.prototype.O=function(link){link.className=this.hasChildrenClass;eval("link.onclick = function(){if(!j.item("+this.Q+").parentLink)return false;};");};ApNav.prototype.aj=function(link){var d=link.d;if(this.g[d.e]!=null)this.g[d.e].className=this.hasChildrenClass;if(d.children==null){this.m=link.d.e;this.v();}else{this.m=link.d.e+1;this.v();var menu=this.k[d.e];if(menu.hasChildNodes())menu.removeChild(menu.childNodes[0]);menu.appendChild(d.children);var n;if(d.e==0)n=l(link,this.H);else n=l(link,{x:this.k[d.e-1].offsetWidth+this.subMenuOffset.x,y:this.subMenuOffset.y});menu.style.left=n.x+"px";menu.style.top=n.y+"px";this.g[d.e]=link;link.className=this.selectedClass;}};ApNav.prototype.L=function(link){this.m=0;clearTimeout(this.as);this.as=setTimeout("j.item("+this.Q+").v()",this.collapseDelay);};ApNav.prototype.v=function(){for(var i=this.m;i<this.k.length;i++){var menu=this.k[i];if(menu.hasChildNodes())menu.removeChild(menu.childNodes[0]);if(this.g[i]!=null)this.g[i].className=this.hasChildrenClass;}};function X(parent,e,index,children){this.parent=parent;this.e=e;this.index=index;this.children=children;};loader.ah(ak);