コード例 #1
0
ファイル: profilef.php プロジェクト: vstorm83/propertease
 public function profilegetformjs()
 {
     return profilef::profilegetcatdata() . "\nvar \$ = jQuery.noConflict();\nvar refw=document.getElementById('refw');\nvar statew=document.getElementById('statew');\nvar statedd=document.getElementById('state');\nvar councilw=document.getElementById('councilw');\nvar councildd=document.getElementById('council');\nvar schemew=document.getElementById('schemew');\nvar schemedd=document.getElementById('scheme');\nvar zonew=document.getElementById('zonew');\nvar zonedd=document.getElementById('zone');\nvar overlaysw=document.getElementById('overlaysw');\nvar overlaysdd=document.getElementById('overlays');\nvar planw=document.getElementById('planw');\nvar plandd=document.getElementById('plan');\nvar submitw=document.getElementById('submitw');\nvar videoins=document.getElementById('videoins');\nvar helpins=document.getElementById('helpins');\n\nvar refwj=\$('#refw');\nvar statewj=\$('#statew');\nvar stateddj=\$('#state');\nvar councilwj=\$('#councilw');\nvar councilddj=\$('#council');\nvar schemewj=\$('#schemew');\nvar schemeddj=\$('#scheme');\nvar zonewj=\$('#zonew');\nvar zoneddj=\$('#zone');\nvar overlayswj=\$('#overlaysw');\nvar overlaysddj=\$('#overlays');\nvar planwj=\$('#planw');\nvar planddj=\$('#plan');\nvar submitwj=\$('#submitw');\nvar videoinsj=\$('#videoins');\nvar helpinsj=\$('#helpins');\n\nvar cansubmit=false;\n\nfunction show_ref() {\n\t\$('#refw').css('display','block');\n}\nfunction hide_state() {\n\tstatewj.css('display','none');\n\thide_council();\n}\nfunction show_state() {\n\tstatewj.css('display','block');\n}\nfunction hide_council() {\n\tcouncilwj.css('display','none');\n\thide_scheme();\n}\nfunction show_council() {\n\tcouncilwj.css('display','block');\n}\nfunction hide_scheme() {\n\tschemewj.css('display','none');\n\thide_restriction();\n}\nfunction show_scheme() {\n\tschemewj.css('display','block');\n}\nfunction hide_restriction() {\n\tzonewj.css('display','none');\n\toverlayswj.css('display','none');\n\tplanwj.css('display','none');\n\thide_submit();\n}\nfunction show_restriction() {\n\tzonewj.css('display','block');\n\toverlayswj.css('display','block');\n\tplanwj.css('display','block');\n}\nfunction hide_submit() {\n\tsubmitwj.css('display','none');\n\tsubmitwj.html(' ');\n\tcansubmit=false;\n}\nfunction show_submit() {\n\tsubmitwj.html('<input type=\"submit\" value=\"Submit\">');\n\tsubmitwj.css('display','block');\n\tcansubmit=true;\n}\nfunction execute_submit() {\n\treturn cansubmit;\n}\nfunction destroy_general(obj) {\n\twhile(obj.options.length) {\n\t\tobj.remove(0);\n\t}\n}\nfunction destroy_state() {\n\tdestroy_general(statedd);\n\tdestroy_council();\n}\nfunction destroy_council() {\n\tdestroy_general(councildd);\n\tdestroy_scheme();\n}\nfunction destroy_scheme() {\n\tif(videoins) {\n\t\tvideoins.innerHTML='';\n\t}\n\tdestroy_general(schemedd);\n\tdestroy_restriction();\n}\nfunction destroy_restriction() {\n\tdestroy_general(zonedd);\n\tdestroy_general(overlaysdd);\n\tdestroy_general(plandd);\n}\nfunction get_state() {\n\tvar i=0;\n\tvar c=catlevels[0].length;\n\tdestroy_state();\n\thide_state();\n\tvar \$ = jQuery.noConflict();\n\t\$('.state-n').html('')\n\t\t .append(\$('<option></option>')\n         .attr('value',' - ')\n         .text('Select State')); \n\twhile(i<c) {\n\t\tstatedd.options[0] = new Option('(Select One)',0);\n\t\tstatedd.options[statedd.options.length] = new Option(catnames[0][i],catlevels[0][i]);\n\n\t\t\$('.state-n')\n         .append(\$('<option></option>')\n         .attr('value',catlevels[0][i])\n         .text(catnames[0][i])); \n\t\n\t\ti++;\n\t}\n\tstatedd.selectedIndex=0;\n\tshow_state();\n}\nfunction get_council() {\n\tvar ddval=jQuery('#state').val();\n\t\n\tvar i=0;\n\tvar c=0;\n\tc=catlevels[1].length;\n\tdestroy_council();\n\thide_council();\n\tvar \$ = jQuery.noConflict();\n\t\$('.council-n').html('')\n\t\t .append(\$('<option></option>')\n         .attr('value',' - ')\n         .text('Select Regional Council')); \n\tif(ddval>0) {\n\t\tcouncildd.options[0] = new Option('(Select One)',0);\n\t\twhile(i<c) {\n\t\t\tif(catassociations[1][i]==ddval) {\n\t\t\t\tcouncildd.options[councildd.options.length] = new Option(catnames[1][i],catlevels[1][i]);\n\n\t\t\t\t\$('.council-n')\n\t\t\t         .append(\$('<option></option>')\n\t\t\t         .attr('value',catlevels[1][i])\n\t\t\t         .text(catnames[1][i])); \n\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tcouncildd.selectedIndex=0;\n\t\tshow_council();\n\t}\n}\nfunction get_scheme() {\n\tvar ddval=jQuery('#council').val();\t\t\t\t\n\tvar i=0;\n\tvar c=0;\n\tvar tlink='';\n\tvar tlinklab='';\n\tdestroy_scheme();\n\thide_scheme();\n\tvar \$ = jQuery.noConflict();\n\t\$('.scheme-n').html('')\n\t\t .append(\$('<option></option>')\n         .attr('value',' - ')\n         .text('Select Scheme')); \n\n\t\$('#zonebody').empty().append(\n\t\t\$('<div class=\"videoins\">').append(\$('#videoins').html()),\n\t\t\$('<div class=\"helpins\">').append(\$('#helpins').html()),\n\t\t\$('<div class=\"clearfix\">')\n\t);\n\tif(ddval>0) {\n\t\tc=catlevels[1].length;\n\t\tif(videoins) {\n\t\t\twhile(i<c) {\n\t\t\t\tif(catlevels[1][i]==ddval) {\n\t\t\t\t\tif(councilvideos[i]) {\n\t\t\t\t\t\t/*videoins.innerHTML='<h3>Need Help Finding Your Zone?</h3><div class=\"videowrapper\"><div class=\"videoheight\"></div><iframe width=\"100%\" height=\"315\" src=\"https://www.youtube.com/embed/'+councilvideos[i]+'\" frameborder=\"0\" allowfullscreen></iframe></div>';*/\n\t\t\t\t\t\tjQuery('.videoins').html('<h3>Need Help Finding Your Zone?</h3><div class=\"videowrapper\"><div class=\"videoheight\"></div><iframe width=\"100%\" height=\"315\" src=\"https://www.youtube.com/embed/'+councilvideos[i]+'\" frameborder=\"0\" allowfullscreen></iframe></div>');\n\t\t\t\t\t\ti=c;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\ti=0;\n\t\tif(helpins) {\n\t\t\twhile(i<c) {\n\t\t\t\tif(catlevels[1][i]==ddval) {\n\t\t\t\t\tif(councillinks[i]&&councilhelp[i]) {\n\t\t\t\t\t\ttlinklab=councillinks[i];\n\t\t\t\t\t\tif(tlinklab.charAt(0)==124) {\n\t\t\t\t\t\t\ttlinklab=tlinklab.substring(1);\n\t\t\t\t\t\t\ttlink='https://'+tlinklab;\n\t\t\t\t\t\t\ttlinklab=tlink;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttlink='http://'+tlinklab;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttlink+='/';\n\t\t\t\t\t\t//helpins.innerHTML='<h3>How to find your property information for '+catnames[1][i]+':</h3><ul><li>Go to <a href=\"'+tlink+'\" target=\"_blank\">'+tlinklab+'</a>;</li><li>'+councilhelp[i].split('|').join('</li><li>')+'</li><li>Enter this information into the PropertEASE dropdown box selections;</li><li>Click \\'Submit\\'</li><li>Print report.</li></ul>';\n\t\t\t\t\t\tjQuery('.helpins').html('<h3>How to find your property information for '+catnames[1][i]+':</h3><ul><li>Go to <a href=\"'+tlink+'\" target=\"_blank\">'+tlinklab+'</a>;</li><li>'+councilhelp[i].split('|').join('</li><li>')+'</li><li>Enter this information into the PropertEASE dropdown box selections;</li><li>Click \\'Submit\\'</li><li>Print report.</li></ul>');\n\t\t\t\t\t\ti=c;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\t//helpins\n\t\t//councillinks\n\t\t//councilhelp\n\t\ti=0;\n\t\tc=catlevels[2].length;\n\t\tschemedd.options[0] = new Option('(Select One)',0);\n\t\twhile(i<c) {\n\t\t\tif(catassociations[2][i]==ddval) {\n\t\t\t\tschemedd.options[schemedd.options.length] = new Option(catnames[2][i],catlevels[2][i]);\n\n\t\t\t\t\$('.scheme-n')\n\t\t\t         .append(\$('<option></option>')\n\t\t\t         .attr('value',catlevels[2][i])\n\t\t\t         .text(catnames[2][i])); \n\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tschemedd.selectedIndex=0;\n\t\tshow_scheme();\n\t}\n}\nfunction get_restriction() {\n\tvar ddval=jQuery('#scheme').val();\n\tvar foundindex=0;\n\tvar i=0;\n\tvar u=0;\n\tvar c=catlevels[2].length;\n\tvar ca=0;\n\tvar csa=0;\n\tdestroy_restriction();\n\thide_restriction();\n\n\tvar \$ = jQuery.noConflict();\n\t\$('.zone-n').html('')\n\t\t .append(\$('<option></option>')\n         .attr('value',' - ')\n         .text('Select Zone')); \n\n\tif(ddval>0) {\n\t\tzonedd.options[0] = new Option('(Select One)',0);\n\t\toverlaysdd.options[0] = new Option('None Applicable',0);\n\t\tplandd.options[0] = new Option('(Select One)',0);\n\t\tplandd.options[1] = new Option('None Applicable',0);\n\t\t\n\t\twhile(i<c) {\n\t\t\tif(catlevels[2][i]==ddval) {\n\t\t\t\tca=zoneassociations[i].length;\n\t\t\t\tu=0;\n\t\t\t\twhile(u<ca) {\n\t\t\t\t\tfoundindex=zones.indexOf(zoneassociations[i][u]);\n\t\t\t\t\tif(foundindex>=0) {\n\t\t\t\t\t\tzonedd.options[zonedd.options.length] = new Option(zonenames[foundindex],zones[foundindex]);\n\n\t\t\t\t\t\t\$('.zone-n')\n\t\t\t\t\t         .append(\$('<option></option>')\n\t\t\t\t\t         .attr('value',zones[foundindex])\n\t\t\t\t\t         .text(zonenames[foundindex])); \n\n\t\t\t\t\t}\n\t\t\t\t\tu++;\n\t\t\t\t}\n\t\t\t\tca=overlayassociations[i].length;\n\t\t\t\tu=0;\n\t\t\t\twhile(u<ca) {\n\t\t\t\t\tfoundindex=overlays.indexOf(overlayassociations[i][u]);\n\t\t\t\t\tif(foundindex>=0) {\n\t\t\t\t\t\toverlaysdd.options[overlaysdd.options.length] = new Option(overlaynames[foundindex],overlays[foundindex]);\n\t\t\t\t\t\t\$('.overlays-n select')\n\t\t\t\t\t         .append(\$('<option></option>')\n\t\t\t\t\t         .attr('value',overlays[foundindex])\n\t\t\t\t\t         .text(overlaynames[foundindex])); \n\t\t\t\t\t}\n\t\t\t\t\tu++;\n\t\t\t\t}\n\t\t    \$('.overlays-n select').append('<optgroup label=\"\"></optgroup>');\n\n\t\t\t\t\$('.precinct-n').html('')\n\t\t\t\t\t .append(\n\t\t\t\t\t \t\$('<option></option>')\n\t\t\t         \t.attr('value','0')\n\t\t\t         \t.text('Select Neighbourhood Plan + Precinct'),\n\t\t\t         \t\$('<option></option>')\n\t\t\t         \t.attr('value','0')\n\t\t\t         \t.text('None Applicable')\n\t\t\t         ); \n\n\t\t\t\tca=precinctassociations[i].length;\n\t\t\t\tu=0;\n\t\t\t\twhile(u<ca) {\n\t\t\t\t\tfoundindex=precincts.indexOf(precinctassociations[i][u]);\n\t\t\t\t\tif(foundindex>=0) {\n\t\t\t\t\t\tplandd.options[plandd.options.length] = new Option(precinctnames[foundindex],precincts[foundindex]);\n\n\t\t\t\t\t\t\$('.precinct-n')\n\t\t\t\t\t         .append(\$('<option></option>')\n\t\t\t\t\t         .attr('value',precincts[foundindex])\n\t\t\t\t\t         .text(precinctnames[foundindex])); \n\n\t\t\t\t\t}\n\t\t\t\t\tu++;\n\t\t\t\t}\n\t\t    \$('.precinct-n').append('<optgroup label=\"\"></optgroup>');\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\t\t\t\n\t\t\$('.zone-n').append('<optgroup label=\"\"></optgroup>');\n\t\tzonedd.selectedIndex=0;\n\t\toverlaysdd.selectedIndex=-1;\n\t\tplandd.selectedIndex=0;\n\t\tshow_restriction();\n\t}\n}\nfunction get_submit() {\n\tvar ddval=jQuery('#zone').val();\n\tif(ddval>0) {\n\t\tshow_submit();\n\t} else {\n\t\thide_submit();\n\t}\n}\nshow_ref();\nget_state();\n\njQuery(document).ready(function(\$){\n    \$('.reportCreator').show();\t\t\t\t\n\tvar container = \$('.reportCreator #accordion');\n\t\n\tfunction cleanHighLight() {\n\t\tcontainer.find('.rowHighLight').removeClass('rowHighLight');\n\t\tcontainer.find('.inputHighLight').removeClass('inputHighLight');\n\t}\n\t\n\tfunction addHighLight(next) {\n\t\tvar panel = next.closest('.panel');\n\t\tpanel.find('.row-input').addClass('rowHighLight');\n\t\tpanel.find('select').addClass('inputHighLight');\n\t}\n\t\n\t\$('.state-n').change(function(){\n\t\t\$('#state').val(\$(this).val());\n\t\tget_council();\n\t\t\$('.step-process .number').text('2');\n\t\tcleanHighLight();\n\t\taddHighLight(\$('.council-n'));\n\t});\n\t\$('.council-n').change(function(){\n\t\t\$('#council').val(\$(this).val());\n\t\tget_scheme();\n\t\t\$('.step-process .number').text('3');\n\t\tcleanHighLight();\n\t\taddHighLight(\$('.scheme-n'));\n\t});\n\t\$('.scheme-n').change(function(){\n\t\t\$('#scheme').val(\$(this).val());\n\t\tget_restriction();\n\t\t\$('.step-process .number').text('4');\n\t\tcleanHighLight();\n\t\taddHighLight(\$('.zone-n'));\t\t\n\t});\n\t\$('.zone-n').change(function(){\n\t\t\$('#zone').val(\$(this).val());\n\t\tget_submit();\n\t\t\$('.step-process .number').text('5');\n\t\tcleanHighLight();\n\t\taddHighLight(\$('.overlays-n'));\n\t});\n\t\$('.overlays-n select').change(function(){\n\t\t\$('#overlays').val(\$(this).val());\n\t\t\$('.step-process .number').text('6');\n\t\tcleanHighLight();\n\t\taddHighLight(\$('.precinct-n'));\n\t});\n\n  \$('.overlays-n select').mousedown(function(e) {\n\t  var \$option = \$(e.target);\n\t  if (\$option.attr('selected')) {\n\t    \$option.attr('selected', false);\n\t  } else {\n\t    \$option.attr('selected', true);\n\t  }\n\t  \n\t  \$('#overlays').val(\$(this).val());\n    \$('.step-process .number').text('6');\n    cleanHighLight();\n    addHighLight(\$('.precinct-n'));\n\t  \n\t  return false;\n\t});\n\t\t  \n\t\$('.precinct-n').change(function(){\n\t\t\$('#plan').val(\$(this).val());\n\t\t\$('.step-process .number').text('7');\n\t\t\$('.btn-sbm').addClass('btn-active-submit');\n\t\tcleanHighLight();\n\t});\n\t\$('.btn-sbm').click(function() {\n\t\tvar title = \$.trim(\$('#report-name').val()); \n\t\tif (!title || title == 'Name of the Report') {\n\t\t  \$('.rpNameAlert').fadeIn();\n\t\t  return false;\n\t\t}  \t\t\n\t\t\$('#submitw input').trigger('click');\n\t});\t\n});\n";
 }
コード例 #2
0
 public function profilegetformjs()
 {
     return profilef::profilegetcatdata() . "\nvar refw=document.getElementById('refw');\nvar statew=document.getElementById('statew');\nvar statedd=document.getElementById('state');\nvar councilw=document.getElementById('councilw');\nvar councildd=document.getElementById('council');\nvar schemew=document.getElementById('schemew');\nvar schemedd=document.getElementById('scheme');\nvar zonew=document.getElementById('zonew');\nvar zonedd=document.getElementById('zone');\nvar overlaysw=document.getElementById('overlaysw');\nvar overlaysdd=document.getElementById('overlays');\nvar planw=document.getElementById('planw');\nvar plandd=document.getElementById('plan');\nvar submitw=document.getElementById('submitw');\nvar videoins=document.getElementById('videoins');\nvar helpins=document.getElementById('helpins');\nvar cansubmit=false;\nfunction show_ref() {\n\trefw.style.display='block';\n}\nfunction hide_state() {\n\tstatew.style.display='none';\n\thide_council();\n}\nfunction show_state() {\n\tstatew.style.display='block';\n}\nfunction hide_council() {\n\tcouncilw.style.display='none';\n\thide_scheme();\n}\nfunction show_council() {\n\tcouncilw.style.display='block';\n}\nfunction hide_scheme() {\n\tschemew.style.display='none';\n\thide_restriction();\n}\nfunction show_scheme() {\n\tschemew.style.display='block';\n}\nfunction hide_restriction() {\n\tzonew.style.display='none';\n\toverlaysw.style.display='none';\n\tplanw.style.display='none';\n\thide_submit();\n}\nfunction show_restriction() {\n\tzonew.style.display='block';\n\toverlaysw.style.display='block';\n\tplanw.style.display='block';\n}\nfunction hide_submit() {\n\tsubmitw.style.display='none';\n\tsubmitw.innerHTML='&nbsp;';\n\tcansubmit=false;\n}\nfunction show_submit() {\n\tsubmitw.innerHTML='<input type=\"submit\" value=\"Submit\">';\n\tsubmitw.style.display='block';\n\tcansubmit=true;\n}\nfunction execute_submit() {\n\treturn cansubmit;\n}\nfunction destroy_general(obj) {\n\twhile(obj.options.length) {\n\t\tobj.remove(0);\n\t}\n}\nfunction destroy_state() {\n\tdestroy_general(statedd);\n\tdestroy_council();\n}\nfunction destroy_council() {\n\tdestroy_general(councildd);\n\tdestroy_scheme();\n}\nfunction destroy_scheme() {\n\tif(videoins) {\n\t\tvideoins.innerHTML='';\n\t}\n\tdestroy_general(schemedd);\n\tdestroy_restriction();\n}\nfunction destroy_restriction() {\n\tdestroy_general(zonedd);\n\tdestroy_general(overlaysdd);\n\tdestroy_general(plandd);\n}\nfunction get_state() {\n\tvar i=0;\n\tvar c=catlevels[0].length;\n\tdestroy_state();\n\thide_state();\n\twhile(i<c) {\n\t\tstatedd.options[0] = new Option('(Select One)',0);\n\t\tstatedd.options[statedd.options.length] = new Option(catnames[0][i],catlevels[0][i]);\n\t\ti++;\n\t}\n\tstatedd.selectedIndex=0;\n\tshow_state();\n}\nfunction get_council() {\n\tvar ddval=Number.parseInt(statedd.options[statedd.selectedIndex].value+'');\n\tvar i=0;\n\tvar c=0;\n\tc=catlevels[1].length;\n\tdestroy_council();\n\thide_council();\n\tif(ddval>0) {\n\t\tcouncildd.options[0] = new Option('(Select One)',0);\n\t\twhile(i<c) {\n\t\t\tif(catassociations[1][i]==ddval) {\n\t\t\t\tcouncildd.options[councildd.options.length] = new Option(catnames[1][i],catlevels[1][i]);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tcouncildd.selectedIndex=0;\n\t\tshow_council();\n\t}\n}\nfunction get_scheme() {\n\tvar ddval=Number.parseInt(councildd.options[councildd.selectedIndex].value+'');\n\tvar i=0;\n\tvar c=0;\n\tvar tlink='';\n\tvar tlinklab='';\n\tdestroy_scheme();\n\thide_scheme();\n\tif(ddval>0) {\n\t\tc=catlevels[1].length;\n\t\tif(videoins) {\n\t\t\twhile(i<c) {\n\t\t\t\tif(catlevels[1][i]==ddval) {\n\t\t\t\t\tif(councilvideos[i]) {\n\t\t\t\t\t\tvideoins.innerHTML='<h3>Need Help Finding Your Zone?</h3><div class=\"videowrapper\"><div class=\"videoheight\"></div><iframe width=\"100%\" height=\"315\" src=\"https://www.youtube.com/embed/'+councilvideos[i]+'\" frameborder=\"0\" allowfullscreen></iframe></div>';\n\t\t\t\t\t\ti=c;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\ti=0;\n\t\tif(helpins) {\n\t\t\twhile(i<c) {\n\t\t\t\tif(catlevels[1][i]==ddval) {\n\t\t\t\t\tif(councillinks[i]&&councilhelp[i]) {\n\t\t\t\t\t\ttlinklab=councillinks[i];\n\t\t\t\t\t\tif(tlinklab.charAt(0)==124) {\n\t\t\t\t\t\t\ttlinklab=tlinklab.substring(1);\n\t\t\t\t\t\t\ttlink='https://'+tlinklab;\n\t\t\t\t\t\t\ttlinklab=tlink;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttlink='http://'+tlinklab;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttlink+='/';\n\t\t\t\t\t\thelpins.innerHTML='<h3>How to find your property information for '+catnames[1][i]+':</h3><ul><li>Go to <a href=\"'+tlink+'\" target=\"_blank\">'+tlinklab+'</a>;</li><li>'+councilhelp[i].split('|').join('</li><li>')+'</li><li>Enter this information into the PropertEASE dropdown box selections;</li><li>Click \\'Submit\\'</li><li>Print report.</li></ul>';\n\t\t\t\t\t\ti=c;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\t//helpins\n\t\t//councillinks\n\t\t//councilhelp\n\t\ti=0;\n\t\tc=catlevels[2].length;\n\t\tschemedd.options[0] = new Option('(Select One)',0);\n\t\twhile(i<c) {\n\t\t\tif(catassociations[2][i]==ddval) {\n\t\t\t\tschemedd.options[schemedd.options.length] = new Option(catnames[2][i],catlevels[2][i]);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tschemedd.selectedIndex=0;\n\t\tshow_scheme();\n\t}\n}\nfunction get_restriction() {\n\tvar ddval=Number.parseInt(schemedd.options[schemedd.selectedIndex].value+'');\n\tvar foundindex=0;\n\tvar i=0;\n\tvar u=0;\n\tvar c=catlevels[2].length;\n\tvar ca=0;\n\tvar csa=0;\n\tdestroy_restriction();\n\thide_restriction();\n\tif(ddval>0) {\n\t\tzonedd.options[0] = new Option('(Select One)',0);\n\t\toverlaysdd.options[0] = new Option('None Applicable',0);\n\t\tplandd.options[0] = new Option('(Select One)',0);\n\t\tplandd.options[1] = new Option('None Applicable',0);\n\t\t\n\t\twhile(i<c) {\n\t\t\tif(catlevels[2][i]==ddval) {\n\t\t\t\tca=zoneassociations[i].length;\n\t\t\t\tu=0;\n\t\t\t\twhile(u<ca) {\n\t\t\t\t\tfoundindex=zones.indexOf(zoneassociations[i][u]);\n\t\t\t\t\tif(foundindex>=0) {\n\t\t\t\t\t\tzonedd.options[zonedd.options.length] = new Option(zonenames[foundindex],zones[foundindex]);\n\t\t\t\t\t}\n\t\t\t\t\tu++;\n\t\t\t\t}\n\t\t\t\tca=overlayassociations[i].length;\n\t\t\t\tu=0;\n\t\t\t\twhile(u<ca) {\n\t\t\t\t\tfoundindex=overlays.indexOf(overlayassociations[i][u]);\n\t\t\t\t\tif(foundindex>=0) {\n\t\t\t\t\t\toverlaysdd.options[overlaysdd.options.length] = new Option(overlaynames[foundindex],overlays[foundindex]);\n\t\t\t\t\t}\n\t\t\t\t\tu++;\n\t\t\t\t}\n\t\t\t\tca=precinctassociations[i].length;\n\t\t\t\tu=0;\n\t\t\t\twhile(u<ca) {\n\t\t\t\t\tfoundindex=precincts.indexOf(precinctassociations[i][u]);\n\t\t\t\t\tif(foundindex>=0) {\n\t\t\t\t\t\tplandd.options[plandd.options.length] = new Option(precinctnames[foundindex],precincts[foundindex]);\n\t\t\t\t\t}\n\t\t\t\t\tu++;\n\t\t\t\t}\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tzonedd.selectedIndex=0;\n\t\toverlaysdd.selectedIndex=-1;\n\t\tplandd.selectedIndex=0;\n\t\tshow_restriction();\n\t}\n}\nfunction get_submit() {\n\tvar ddval=Number.parseInt(zonedd.options[zonedd.selectedIndex].value+'');\n\tif(ddval>0) {\n\t\tshow_submit();\n\t} else {\n\t\thide_submit();\n\t}\n}\nshow_ref();\nget_state();\n";
 }