var browser=navigator.userAgent; var validate=browser.match(/(MSIE)/g); function DropDown(layer){ if(validate){ DropDownIE(layer); } else{ DropDownNS(layer); } } function Hide(layer){ if(validate){ HideIE(layer); } else{ HideNS(layer); } } function DropDownIE(layer){ document.all.item(layer).style.visibility="visible"; if(layer=='Layer1'){ document.all.item("Layer2").style.visibility="hidden"; } if(layer=='Layer11'){ document.all.item("Layer1").style.visibility="visible"; } if(layer=='Layer2'){ document.all.item("Layer1").style.visibility="hidden"; document.all.item("Layer11").style.visibility="hidden"; } } function HideIE(layer){ var show1=document.all.item("Layer1").style.visibility; var show11=document.all.item("Layer11").style.visibility; if(show1=='visible' && show11=='visible' && layer=='Layer11' || show1=='visible') {document.all.item("Layer11").style.visibility='hidden'; document.all.item("Layer1").style.visibility='hidden';} else { document.all.item("Layer1").style.visibility='hidden'; document.all.item("Layer11").style.visibility='hidden'; document.all.item("Layer2").style.visibility='hidden'; } } /// ---------------- Just for NetScape ---------------------- /// function placement(layer){ var topCorner=((window.innerWidth)/2)-306; document.Layer1ns.left=topCorner+130; // 70 document.Layer11ns.left=topCorner+210; // 150 document.Layer2ns.left=topCorner+70; // 130 document.Layer1ns.top=-540; // -407 document.Layer11ns.top=-578; // -445 document.Layer2ns.top=-407; // -540 } function DropDownNS(layer){ placement(layer); eval('document.'+layer+'ns.visibility="show"'); if(layer=='Layer1'){ document.Layer2ns.visibility="hide"; } if(layer=='Layer11'){ document.Layer1ns.visibility="show"; } if(layer=='Layer2'){ document.Layer1ns.visibility="hide"; document.Layer11ns.visibility="hide"; } } function HideNS(layer){ var show1=document.Layer1ns.visibility; var show11=document.Layer11ns.visibility; if(show1=='show' && show11=='show' && layer=='Layer11ns' || show1=='show') {document.Layer11ns.visibility='hide'; document.Layer1ns.visibility='hide';} else { document.Layer1ns.visibility='hide'; document.Layer11ns.visibility='hide'; document.Layer2ns.visibility='hide'; } }