I need some help with my java script code. What I am trying to do is pass two or more parameters in a query string. The error I get in FF is that the element Lm1 is not defined. Any help appreciated.
[FONT='Calibri','sans-serif'][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]a[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]href[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="learn_more.aspx?isOn=2&isAt=Lm1"><[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]div[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]class[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="what_hemorrhoid"[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]id[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Lm1"></[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]div[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]></[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]a[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]a[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]href[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="lm_treatment_prodcedure.aspx?isOn=2&isAt=Lm2"><[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]div[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]class[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="treatment_procedure"[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]id[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="lm2"></[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]div[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]></[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]a[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]a[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]href[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="?isOn=2&isAt=Lm3"><[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]div[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]class[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="how_compare"[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]id[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Lm3"></[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]div[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]></[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]a[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]a[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]href[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="?isOn=2&isAt=Lm4"><[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]div[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]class[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="what_say"[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]id[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Lm4"></[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]div[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]></[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]a[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]a[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]href[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="?isOn=2&isAt=Lm5"><[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]div[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]class[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="faq"[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]id[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Lm5"></[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]div[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]></[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]a[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]a[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]href[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="?isOn=2&isAt=Lm6"><[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]div[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]class[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="lighter_side"[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]id[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Lm6"></[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]div[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]></[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]a[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#008000]<!--this java script code checks the isOn state and switches the class to an selected sate-->
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]script[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]type[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="text/javascript">
var[/COLOR][/SIZE][SIZE=2] qsParm = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2] Array();
[/SIZE][SIZE=2][COLOR=#0000ff]function[/COLOR][/SIZE][SIZE=2] qs() {
[/SIZE][SIZE=2][COLOR=#0000ff]var[/COLOR][/SIZE][SIZE=2] query = window.location.search.substring(1);
[/SIZE][SIZE=2][COLOR=#0000ff]var[/COLOR][/SIZE][SIZE=2] parms = query.split([/SIZE][SIZE=2][COLOR=#a31515]'&'[/COLOR][/SIZE][SIZE=2]);
[/SIZE][SIZE=2][COLOR=#0000ff]for[/COLOR][/SIZE][SIZE=2] ([/SIZE][SIZE=2][COLOR=#0000ff]var[/COLOR][/SIZE][SIZE=2] i=0; i<parms.length; i++) {
[/SIZE][SIZE=2][COLOR=#0000ff]var[/COLOR][/SIZE][SIZE=2] pos = parms*.indexOf([/SIZE][SIZE=2][COLOR=#a31515]'='[/COLOR][/SIZE][SIZE=2]);
[/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] (pos > 0) {
[/SIZE][SIZE=2][COLOR=#0000ff]var[/COLOR][/SIZE][SIZE=2] key = parms*.substring(0,pos);
[/SIZE][SIZE=2][COLOR=#0000ff]var[/COLOR][/SIZE][SIZE=2] val = parms*.substring(pos+1);
qsParm[key] = val;
}
}
}
qsParm[[/SIZE][SIZE=2][COLOR=#a31515]'isOn'[/COLOR][/SIZE][SIZE=2]] = [/SIZE][SIZE=2][COLOR=#0000ff]null[/COLOR][/SIZE][SIZE=2];
qsParm[[/SIZE][SIZE=2][COLOR=#a31515]'isAt'[/COLOR][/SIZE][SIZE=2]] = [/SIZE][SIZE=2][COLOR=#0000ff]null[/COLOR][/SIZE][SIZE=2];
qs();
[/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] (qsParm[[/SIZE][SIZE=2][COLOR=#a31515]'isOn'[/COLOR][/SIZE][SIZE=2]]==2 && qsParm[[/SIZE][SIZE=2][COLOR=#a31515]'isAt'[/COLOR][/SIZE][SIZE=2]]==Lm1){
document.getElementById([/SIZE][SIZE=2][COLOR=#a31515]'Lm1'[/COLOR][/SIZE][SIZE=2]).className=[/SIZE][SIZE=2][COLOR=#a31515]"what_hemorrhoid_selected"[/COLOR][/SIZE][SIZE=2];
alert([/SIZE][SIZE=2][COLOR=#a31515]'test'[/COLOR][/SIZE][SIZE=2]);
} [/SIZE][SIZE=2][COLOR=#0000ff]else[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] (qsParm[[/SIZE][SIZE=2][COLOR=#a31515]'isOn'[/COLOR][/SIZE][SIZE=2]]==2 && qsParm[[/SIZE][SIZE=2][COLOR=#a31515]'isAt'[/COLOR][/SIZE][SIZE=2]]==Lm2){
document.getElementById([/SIZE][SIZE=2][COLOR=#a31515]'Lm2'[/COLOR][/SIZE][SIZE=2]).className=[/SIZE][SIZE=2][COLOR=#a31515]"treatment_procedure_selected"[/COLOR][/SIZE][SIZE=2];
} [/SIZE][SIZE=2][COLOR=#0000ff]else[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] (qsParm[[/SIZE][SIZE=2][COLOR=#a31515]'isOn'[/COLOR][/SIZE][SIZE=2]]==2 && qsParm[[/SIZE][SIZE=2][COLOR=#a31515]'isAt'[/COLOR][/SIZE][SIZE=2]]==Lm3){
document.getElementById([/SIZE][SIZE=2][COLOR=#a31515]'Lm3'[/COLOR][/SIZE][SIZE=2]).className=[/SIZE][SIZE=2][COLOR=#a31515]"how_compare_selected"[/COLOR][/SIZE][SIZE=2];
} [/SIZE][SIZE=2][COLOR=#0000ff]else[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] (qsParm[[/SIZE][SIZE=2][COLOR=#a31515]'isOn'[/COLOR][/SIZE][SIZE=2]]==2 && qsParm[[/SIZE][SIZE=2][COLOR=#a31515]'isAt'[/COLOR][/SIZE][SIZE=2]]==Lm4){
document.getElementById([/SIZE][SIZE=2][COLOR=#a31515]'Lm4'[/COLOR][/SIZE][SIZE=2]).className=[/SIZE][SIZE=2][COLOR=#a31515]"what_say_selected"[/COLOR][/SIZE][SIZE=2];
} [/SIZE][SIZE=2][COLOR=#0000ff]else[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] (qsParm[[/SIZE][SIZE=2][COLOR=#a31515]'isOn'[/COLOR][/SIZE][SIZE=2]]==2 && qsParm[[/SIZE][SIZE=2][COLOR=#a31515]'isAt'[/COLOR][/SIZE][SIZE=2]]==Lm5){
document.getElementById([/SIZE][SIZE=2][COLOR=#a31515]'Lm5'[/COLOR][/SIZE][SIZE=2]).className=[/SIZE][SIZE=2][COLOR=#a31515]"faq_selected"[/COLOR][/SIZE][SIZE=2];
} [/SIZE][SIZE=2][COLOR=#0000ff]else[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] (qsParm[[/SIZE][SIZE=2][COLOR=#a31515]'isOn'[/COLOR][/SIZE][SIZE=2]]==2 && qsParm[[/SIZE][SIZE=2][COLOR=#a31515]'isAt'[/COLOR][/SIZE][SIZE=2]]==Lm6){
document.getElementById([/SIZE][SIZE=2][COLOR=#a31515]'Lm6'[/COLOR][/SIZE][SIZE=2]).className=[/SIZE][SIZE=2][COLOR=#a31515]"lighter_side_selected"[/COLOR][/SIZE][SIZE=2];
}[/SIZE][SIZE=2][COLOR=#0000ff]else[/COLOR][/SIZE][SIZE=2] {
document.getElementById([/SIZE][SIZE=2][COLOR=#a31515]'Lm1'[/COLOR][/SIZE][SIZE=2]).className=[/SIZE][SIZE=2][COLOR=#a31515]"what_hemorrhoid"[/COLOR][/SIZE][SIZE=2];
document.getElementById([/SIZE][SIZE=2][COLOR=#a31515]'Lm2'[/COLOR][/SIZE][SIZE=2]).className=[/SIZE][SIZE=2][COLOR=#a31515]"treatment_procedure"[/COLOR][/SIZE][SIZE=2];
document.getElementById([/SIZE][SIZE=2][COLOR=#a31515]'Lm3'[/COLOR][/SIZE][SIZE=2]).className=[/SIZE][SIZE=2][COLOR=#a31515]"how_compare"[/COLOR][/SIZE][SIZE=2];
document.getElementById([/SIZE][SIZE=2][COLOR=#a31515]'Lm4'[/COLOR][/SIZE][SIZE=2]).className=[/SIZE][SIZE=2][COLOR=#a31515]"what_say"[/COLOR][/SIZE][SIZE=2];
document.getElementById([/SIZE][SIZE=2][COLOR=#a31515]'Lm5'[/COLOR][/SIZE][SIZE=2]).className=[/SIZE][SIZE=2][COLOR=#a31515]"faq_procedure"[/COLOR][/SIZE][SIZE=2];
document.getElementById([/SIZE][SIZE=2][COLOR=#a31515]'Lm6'[/COLOR][/SIZE][SIZE=2]).className=[/SIZE][SIZE=2][COLOR=#a31515]"lighter_side_procedure"[/COLOR][/SIZE][SIZE=2];
}
[/SIZE][SIZE=2][COLOR=#0000ff]</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]script[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]
[/COLOR][/SIZE][/FONT]