// divaGPS.js v0.6.7p 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||!snapCore){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=_2.replace(_1,"").match(/^[^\/]*/);_10=(_10)?_10[0].replace(/#.*$/,""):"";var _11=_2.match(/\?.*$/);_11=_11?_11[0]:"";_2=_2.replace(/#.*$/,"").replace(_11,"");var _12=[_2];if(_2.search(/\/$/)!=-1){for(var p=0,pmax=_b.length;p<pmax;p++){_12[p+1]=_2+_b[p];}_12[p+1]=_2;}String.prototype.www=function(){return this.replace("http://www.","http://").replace("https://www.","https://");};var _14=[],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;_14[m]=[];for(var x=0,al=zMenuAnchors[m].length;x<al;x++){var _19=(zMenuAnchors[m][x]&&zMenuAnchors[m][x].className&&zMenuAnchors[m][x].className.search(/\bdivaGPS-skip\b/)!=-1);var _1a=zMenuAnchors[m][x]?zMenuAnchors[m][x].href.www().toLowerCase():"";if(_19||!_1a||_1a.search(/#$/)!=-1){continue;}if(_1a.search(/^https?:\/\//)==-1){_1a=resolveHref(_2,_1a,_10,_1).www();}if(_1a==top.location.href.toLowerCase()){_14[m][c++]=x;continue;}else{var _1b=_1a.match(/\?.*/);_1b=_1b?_1b[0]:"";var _1c=_1a.replace(/#.*$/,"").replace(/\?.*$/,"");if(_1c+_1b==_2.www()+_11){_14[m][c++]=x;continue;}var cin=c;for(var p=0,pmax=_b.length;p<pmax;p++){if(_1c+_b[p]+_1b==_2.www()+_11){_14[m][c++]=x;break;}if(_1c+"/"+_b[p]+_1b==_2.www()+_11){_14[m][c++]=x;break;}if(_1c+"/"+_1b==_2.www()+_11){_14[m][c++]=x;break;}}if(c!=cin){continue;}for(var p=0,dl=_12.length;p<dl;p++){if(_1a==_12[p].www()+_11){_14[m][c++]=x;break;}if(_d){ar=_1a.split("/");arl=ar.length;if((arl>4||(arl==4&&ar[3]))&&_2.www().substr(0,_2.www().lastIndexOf("/")).indexOf(_1c.replace(/\/$/,""))!=-1){_14[m][c++]=[x];break;}}}}}m+=1;c=0;}for(var m=0,ml=_14.length;m<ml;m++){var h=_14[m].length-1,osrc,dot,img_,classToApply;while(typeof _14[m][h]!="undefined"){var _22=zMenuAnchors[m][_14[m][h]];if(_c==0&&!_4&&typeof _14[m][h][0]=="undefined"){var _23=diva_createE("em");if(_e){do_img(_22,_e);}for(var i=0,il=_22.childNodes.length;i<il;i++){if(_22.childNodes[i].nodeName=="EM"){zText=document.createTextNode(_22.childNodes[i].firstChild.data);_22.removeChild(_22.childNodes[i]);_22.insertBefore(zText,_22.childNodes[i]);}}while(_22.childNodes.length){_23.appendChild(_22.childNodes[0]);}_22.parentNode.insertBefore(_23,_22);_22.parentNode.removeChild(_22);}else{img_=_f;classToApply=_6;if(_e){var _25=diva_createE("a");}if(typeof _14[m][h][0]=="undefined"){if(_e){_25.title=(zMenuAnchors[m][_14[m][h]].title)?zMenuAnchors[m][_14[m][h]].title+" (current page).":"Current page.";}else{_22.title=(zMenuAnchors[m][_14[m][h]].title)?zMenuAnchors[m][_14[m][h]].title+" (current page).":"Current page.";_22.removeAttribute("href");}img_=_e;classToApply=_5;}var cl=_22.className;do_img(_22,img_);if(img_){_25.className=cl?cl+" "+classToApply:classToApply;while(_22.childNodes.length){_25.appendChild(_22.childNodes[0]);}_22.parentNode.insertBefore(_25,_22);_22.parentNode.removeChild(_22);}else{_22.className=cl?cl+" "+classToApply:classToApply;}}h-=1;}}}function do_img(_27,img){for(var i=0,il=_27.childNodes.length;i<il;i++){if(_27.childNodes[i].nodeName=="IMG"){osrc=_27.childNodes[i].src;dot=osrc.lastIndexOf(".");_27.childNodes[i].src=osrc.substring(0,dot)+img+"."+osrc.substr(dot+1);}}}function resolveHref(loc,_2b,_2c,_2d){if(_2b.charAt(0)=="/"){return _2d+_2c+_2b;}var ret;if(_2b.substring(0,3)=="../"){var _2f=_2b.split("../");var _30=loc.replace(_2d,"").split("/");ret=_2d+(_30.slice(0,_30.length-_2f.length)).join("/")+"/"+_2f.slice(_2f.length-1);if(!ret){alert("Error 09");}}else{ret=loc.substring(0,loc.lastIndexOf("/"))+"/"+_2b.replace(/^\.\//,"");}return ret;}vwd_addEvent(window,"load",divaGPS);