// divaGPS.js v1.0.0 Copyright 2006-2007 divaHTML : Thierry Koblentz and E Michael Brandt. All rights reserved.;

function divaGPS(){if(!document.getElementById||(!document.createElement&&!document.createElementNS)){return;}var _1=top.location.protocol.toLowerCase()+"//";var _2=top.location.href.toLowerCase();if(_2.indexOf(_1)==-1){return;}var _3=navigator.userAgent.toLowerCase();var _4=(_3.indexOf("mac")!=-1&&_3.indexOf("msie")!=-1&&_3.indexOf("opera")==-1);var _5="divaGPS-here";var _6="divaGPS-parent";var _7=gDivaGPS.split(",");var _8=(_7[0].length)?"|":"";var z3=(_7[3].length)?_8+_7[3]:"";var _a=(_7[0]+z3).split("|");var _b=_7[1].toLowerCase().split("|");var _c=_7[2];var _d=Number(_7[4]);var _e=_7[5];var _f=_7[6];var _10=(_e&&!_7[7])?true:false;var _11=_2.replace(_1,"").match(/^[^\/]*/);_11=(_11)?_11[0].replace(/#.*$/,""):"";var _12=_2.match(/\?.*$/);_12=_12?_12[0]:"";_2=_2.replace(/#.*$/,"").replace(_12,"");var _13=[_2];if(_2.search(/\/$/)!=-1){for(var p=0,pmax=_b.length;p<pmax;p++){_13[p+1]=_2+_b[p];}_13[p+1]=_2;}String.prototype.www=function(){return this.replace("http://www.","http://").replace("https://www.","https://");};var _15=[],d=document,zMenuAnchors=[];var m=0,c=0;for(var z=0,zl=_a.length;z<zl;z++){if(!d.getElementById(_a[z])){continue;}var a=d.getElementById(_a[z]).getElementsByTagName("a");if(a.length==0){continue;}zMenuAnchors[m]=a;_15[m]=[];for(var x=0,al=zMenuAnchors[m].length;x<al;x++){var _1a=(zMenuAnchors[m][x]&&zMenuAnchors[m][x].className&&zMenuAnchors[m][x].className.search(/\bdivaGPS-skip\b/)!=-1);var _1b=zMenuAnchors[m][x]?zMenuAnchors[m][x].href.www().toLowerCase():"";if(_1a||!_1b||_1b.search(/#$/)!=-1){continue;}if(_1b.search(/^https?:\/\//)==-1){_1b=resolveHref(_2,_1b,_11,_1).www();}if(_1b==top.location.href.toLowerCase()){_15[m][c++]=x;continue;}else{var _1c=_1b.match(/\?.*/);_1c=_1c?_1c[0]:"";var _1d=_1b.replace(/#.*$/,"").replace(/\?.*$/,"");if(_1d+_1c==_2.www()+_12){_15[m][c++]=x;continue;}var cin=c;for(var p=0,pmax=_b.length;p<pmax;p++){if(_1d+_b[p]+_1c==_2.www()+_12){_15[m][c++]=x;break;}if(_1d+"/"+_b[p]+_1c==_2.www()+_12){_15[m][c++]=x;break;}if(_1d+"/"+_1c==_2.www()+_12){_15[m][c++]=x;break;}}if(c!=cin){continue;}for(var p=0,dl=_13.length;p<dl;p++){if(_1b==_13[p].www()+_12){_15[m][c++]=x;break;}if(_d){ar=_1b.split("/");arl=ar.length;if((arl>4||(arl==4&&ar[3]))&&_2.www().substr(0,_2.www().lastIndexOf("/")).indexOf(_1d.replace(/\/$/,""))!=-1){_15[m][c++]=[x];break;}}}}}m+=1;c=0;}for(var m=0,ml=_15.length;m<ml;m++){var h=_15[m].length-1,osrc,dot,img_,classToApply;while(typeof _15[m][h]!="undefined"){var _23=zMenuAnchors[m][_15[m][h]];if(_c==0&&!_4&&typeof _15[m][h][0]=="undefined"){var _24=diva_createE("em");if(_e){do_img(_23,_e);}for(var i=0,il=_23.childNodes.length;i<il;i++){if(_23.childNodes[i].nodeName=="EM"){zText=document.createTextNode(_23.childNodes[i].firstChild.data);_23.removeChild(_23.childNodes[i]);_23.insertBefore(zText,_23.childNodes[i]);}}while(_23.childNodes.length){_24.appendChild(_23.childNodes[0]);}_23.parentNode.insertBefore(_24,_23);_23.parentNode.removeChild(_23);}else{img_=_f;classToApply=_6;if(_10){var _26=diva_createE("a");}if(typeof _15[m][h][0]=="undefined"){if(_10){_26.title=(zMenuAnchors[m][_15[m][h]].title)?zMenuAnchors[m][_15[m][h]].title+" (current page).":"Current page.";}else{_23.title=(zMenuAnchors[m][_15[m][h]].title)?zMenuAnchors[m][_15[m][h]].title+" (current page).":"Current page.";_23.removeAttribute("href");}img_=_e;classToApply=_5;}var cl=_23.className;if(img_){do_img(_23,img_);}if(_10){_26.className=cl?cl+" "+classToApply:classToApply;while(_23.childNodes.length){_26.appendChild(_23.childNodes[0]);}_23.parentNode.insertBefore(_26,_23);_23.parentNode.removeChild(_23);}else{_23.className=cl?cl+" "+classToApply:classToApply;}}h-=1;}}}function do_img(_28,img){for(var i=0,il=_28.childNodes.length;i<il;i++){if(_28.childNodes[i].nodeName=="IMG"){osrc=_28.childNodes[i].src;dot=osrc.lastIndexOf(".");_28.childNodes[i].src=osrc.substring(0,dot)+img+"."+osrc.substr(dot+1);}}}function resolveHref(loc,_2c,_2d,_2e){if(_2c.charAt(0)=="/"){return _2e+_2d+_2c;}var ret;if(_2c.substring(0,3)=="../"){var _30=_2c.split("../");var _31=loc.replace(_2e,"").split("/");ret=_2e+(_31.slice(0,_31.length-_30.length)).join("/")+"/"+_30.slice(_30.length-1);if(!ret){alert("Error 09");}}else{ret=loc.substring(0,loc.lastIndexOf("/"))+"/"+_2c.replace(/^\.\//,"");}return ret;}vwd_addEvent(window,"load",divaGPS);
