//v1.8 //active links are not clickable var disable_active_link = false; //enable or disable rollovers on active active states var enable_active_rollover = false; /*active states, i.e all buttons that have corresponding (...)-a.* e.g. if all (n-main-)(...).* have active states: ['n-main-'] only n-main-atty.gif and all (n-feat-)(...).* have active state: ['n-main-atty','n-feat'] none have active states: ['#']*/ var arr_active = ['#']; //class applied to active text links var active_class = 'active'; //[['link','scope','scope',(...)],(...)] var arr_scopes=[ ['/CM/Custom/TOCPracticeAreaDescriptions.asp','../../PracticeAreas/index.html','/CM/PracticeAreaDescriptions'], ['/CM/Custom/Attorneys.asp','../../Bio/index.html','/CM/AttorneyBios/'], ['/','/CM/Custom/Home.asp'], ['/CM/Custom/Contact.asp','/CM/Custom/ThankYou.asp'] ]; //use class "h_exclude" to avoid class "active" from being applied to any link //use class "h_always_exclude" if the link or rollover is always an exception //[['path to exclude from highlighting','exception','exception',(...)],(...)] var enable_exception=false; var arr_scope_exceptions=[ ['/CM/Custom/TOCPracticeAreaDescriptions.asp','http://admin.southphiladelphialawyer2.lawoffice.com/PracticeAreas/Social-Security-Disability.asp','http://admin.southphiladelphialawyer2.lawoffice.com/PracticeAreas/Workers-Compensation.asp','/PracticeAreas/Personal-Injury.asp'] ]; var at = document.getElementsByTagName('a'), it = document.getElementsByTagName('img'),i=0; var uc = '~~~~'; //re = new RegExp(/^.+\('([^']+)'.+'\/(.+\/)+(.+)',.\)$/m); re = new RegExp(/^.+\('([^']+)'.+?'\/([^.]+\/)+(.+?)',/m); fp = document.location + uc; rp = fp.replace(/^http:\/\/[^\/]+(\/.*)$/,'$1'); dn = fp.replace(rp,'')+'/'; rf = rp.replace(/^(\/(.+\/)+).+$/,'$1'); fn = rp.replace(rf,''); fp = fp.replace(uc,''); rp = rp.replace(uc,''); fn = fn.replace(uc,''); //Make '/' something unique rp=(rp=='../../index.html')?uc:rp; for(i=0;i-1&&at_hr.indexOf('#')==-1&&at_hr.indexOf('?')==-1||bs)){ //at[i].className=(at[i].className!='last')?active_class:active_last_class; //alert(at_hr); if(!(at[i].className=='h_exclude'&&at_hr.indexOf(rp)==-1)) at[i].className = (at[i].className!='')?at[i].className + ' ' + active_class:active_class; if(!bs&&disable_active_link) at[i].removeAttribute('href'); if(at[i].getAttribute('onmouseover')!=null){ mo = at[i].getAttribute('onmouseover')+''; m = re.exec(mo); if(m!=null){ for(j=0;j-1){ as=m[3].replace('-o.','-a.'); if(!bs&&!enable_active_rollover) at[i].onmouseover = new Function(((mo.replace('function anonymous()\n{','')).replace('\n}','')).replace('-o.','-a.')+';'); break; } } //alert(bs); it[j].src = '/Includes/Templates/Active/images/' + as; } } } } } } } function scopes(hr){ var i=0,j=0; //alert('*' + hr + '* - *' + dn + '*'); mod_fp=(fn=='')?uc:fp; //Take care of exceptions first if(enable_exception){ for(i=0;i-1){ for(j=1;j-1) return false; } } } } for(i=0;i-1){ for(j=1;j-1){ return true; } } } } return false; }