// JScript File

		 isNav = (navigator.appName.indexOf("Netscape")>=0);
         isMoz = (navigator.userAgent.indexOf("Firefox")>=0);
		 isNav4 = false;
		 isIE4 = false;
		 is5up = false;
		if (isNav) {
			if (parseFloat(navigator.appVersion)<5) {
				isNav4=true;
			} else {
				is5up = true;
			}
		} else {
			isIE4=true;
			if (navigator.appVersion.indexOf("MSIE 5")>0) {
				isIE4 = false;
				is5up = true;
			}
		}
 function OpenNewWin(windowname){
    var thepro = document.getElementById(getClientID() + 'optProfile');
    if (thepro.value!='none'){
            var thegeo = document.getElementById(getClientID() + 'ddGeos');
            var thename = thepro.options[thepro.selectedIndex].value
            var _Geo90
            _Geo90 = thegeo.value

           if (thegeo.options[thegeo.selectedIndex].text=='Addison town')
                 _Geo90 = '55131005'
           if (thegeo.options[thegeo.selectedIndex].text=='Barton town')
                 _Geo90 = '55131010'
           if (thegeo.options[thegeo.selectedIndex].text=='Erin town')
                 _Geo90 = '55131020'
           if (thegeo.options[thegeo.selectedIndex].text=='Farmington town')
                 _Geo90 = '55131025'
           if (thegeo.options[thegeo.selectedIndex].text=='Germantown town')
                 _Geo90 = '55131030'
           if (thegeo.options[thegeo.selectedIndex].text=='Germantown village')
                 _Geo90 = '55131035'
           if (thegeo.options[thegeo.selectedIndex].text=='Hartford city')
                 _Geo90 = '55131040'
           if (thegeo.options[thegeo.selectedIndex].text=='Hartford town')
                 _Geo90 = '55131045'
           if (thegeo.options[thegeo.selectedIndex].text=='Jackson town')
                 _Geo90 = '55131050'
           if (thegeo.options[thegeo.selectedIndex].text=='Jackson village')
                 _Geo90 = '55131055'
           if (thegeo.options[thegeo.selectedIndex].text=='Kewaskum town')
                 _Geo90 = '55131060'
           if (thegeo.options[thegeo.selectedIndex].text=='Kewaskum village')
                 _Geo90 = '55131065'
           if (thegeo.options[thegeo.selectedIndex].text=='Milwaukee city')
                 _Geo90 = '55131068'
           if (thegeo.options[thegeo.selectedIndex].text=='Newburg village')
                 _Geo90 = '55131069'
           if (thegeo.options[thegeo.selectedIndex].text=='Polk town')
                 _Geo90 = '55131070'
           if (thegeo.options[thegeo.selectedIndex].text=='Richfield town')
                 _Geo90 = '55131075'
           if (thegeo.options[thegeo.selectedIndex].text=='Slinger village')
                 _Geo90 = '55131080'
           if (thegeo.options[thegeo.selectedIndex].text=='Trenton town')
                 _Geo90 = '55131085'
           if (thegeo.options[thegeo.selectedIndex].text=='Wayne town')
                 _Geo90 = '55131090'
           if (thegeo.options[thegeo.selectedIndex].text=='West Bend city')
                 _Geo90 = '55131095'
           if (thegeo.options[thegeo.selectedIndex].text=='West Bend town')
                 _Geo90 = '55131100'
         var test = thepro.options[thepro.selectedIndex].text
         var the_char=test.charAt(7);
         if (the_char=='1'){
            thename = thename.replace('MyID', _Geo90)}
         else
            thename = thename.replace('MyID', thegeo.value)	  
            var str = "resizeable=1,height=750,width= 750";
         
          if (window.screen) {
            var ah = screen.availHeight - 30;
            var aw = screen.availWidth - 10;

            var xc = (aw - 500) / 2;
            var yc = 30;

            str += ",left=" + xc + ",screenX=" + xc;
            str += ",top=" + yc + ",screenY=" + yc + ",toolbar=1,scrollbars=1,location=1,statusbar=0,menubar=1,resizable=1";
          }
           theWindow = window.open(thename, windowname, str);
    }
else{window.alert("Please select a profile.")}

	
}
function RemoveAll(){
var sel = document.getElementById(getClientID() + 'optProfile');
var theForm = document.getElementById('form1');
var z = sel.options.length;
  for (var i=0; i < z; i++) {
           	if (isNav==true||isMoz==true){
			sel.options[0]=null;
	    }
	    else{
			sel.remove(0);
	    }
  }
  }
function ChangeOptions(theval){
   var daForm = document.getElementById('form1');
   var thegeo = document.getElementById(getClientID() + 'ddGeos');
   var thepro = document.getElementById(getClientID() + 'optProfile');
   var geohelper = document.getElementById(getClientID() + 'GeoHelp');

   if (thegeo.options[thegeo.selectedIndex].text=='Washington County'){
            RemoveAll()
            addOption(daForm, '--Select a Profile--', 'none', getClientID() + 'optProfile');
            addOption(daForm, 'Washington County Profile', 'documents/County_Profile.pdf', getClientID() + 'optProfile');
            addOption(daForm, '2005 American Community Survey: Demographic Characteristics', 'http://factfinder.census.gov/servlet/ADPTable?_bm=y&-geo_id=05000US55131&-context=adp&-ds_name=ACS_2005_EST_G00_&-tree_id=305&-_lang=en&-_caller=geoselect&-format=', getClientID() + 'optProfile');
            addOption(daForm, '2005 American Community Survey: Social Characteristics', 'http://factfinder.census.gov/servlet/ADPTable?_bm=y&-geo_id=05000US55131&-qr_name=ACS_2005_EST_G00_DP2&-context=adp&-ds_name=&-tree_id=305&-_lang=en&-redoLog=false&-format=', getClientID() + 'optProfile');
            addOption(daForm, '2005 American Community Survey: Economic Characteristics', 'http://factfinder.census.gov/servlet/ADPTable?_bm=y&-geo_id=05000US55131&-qr_name=ACS_2005_EST_G00_DP3&-context=adp&-ds_name=&-tree_id=305&-_lang=en&-redoLog=false&-format=', getClientID() + 'optProfile');
            addOption(daForm, '2005 American Community Survey: Housing Characteristics', 'http://factfinder.census.gov/servlet/ADPTable?_bm=y&-geo_id=05000US55131&-qr_name=ACS_2005_EST_G00_DP4&-context=adp&-ds_name=&-tree_id=305&-_lang=en&-redoLog=false&-format=', getClientID() + 'optProfile');

            addOption(daForm, 'Census 1990 DP-1 General Population and Housing Characteristics', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-context=qt&-qr_name=DEC_1990_STF1_DP1&-ds_name=DEC_1990_STF1_&-CONTEXT=qt&-tree_id=100&-redoLog=true&-all_geo_types=N&-geo_id=05000US55131&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');
            addOption(daForm, 'Census 2000 DP-1 Profile of General Demographic Characteristics', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-context=qt&-qr_name=DEC_2000_SF1_U_DP1&-ds_name=DEC_2000_SF1_U&-CONTEXT=qt&-tree_id=4001&-all_geo_types=N&-geo_id=05000US55131&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');
            addOption(daForm, 'Census 1990 DP-2 Social Characteristics', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-context=qt&-qr_name=DEC_1990_STF3_DP2&-ds_name=DEC_1990_STF3_&-CONTEXT=qt&-tree_id=101&-redoLog=false&-all_geo_types=N&-geo_id=05000US55131&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');
            addOption(daForm, 'Census 2000 DP-2 Profile of Selected Social Characteristics', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-context=qt&-qr_name=DEC_2000_SF3_U_DP2&-ds_name=DEC_2000_SF3_U&-CONTEXT=qt&-tree_id=403&-all_geo_types=N&-redoLog=false&-geo_id=05000US55131&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');
            addOption(daForm, 'Census 1990 DP-3 Labor Force Status and Employment Characteristics', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-conqt&-qr_name=DEC_1990_STF3_DP3&-ds_name=DEC_1990_STF3_&-CONqt&-tree_id=101&-redoLog=false&-all_geo_types=N&-geo_id=05000US55131&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');
            addOption(daForm, 'Census 2000 DP-3 Profile of Selected Economic Characteristics', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-conqt&-qr_name=DEC_2000_SF3_U_DP3&-ds_name=DEC_2000_SF3_U&-CONqt&-tree_id=403&-all_geo_types=N&-redoLog=false&-geo_id=05000US55131&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');
            addOption(daForm, 'Census 1990 DP-4 Income and Poverty Status in 1989', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-conqt&-qr_name=DEC_1990_STF3_DP4&-ds_name=DEC_1990_STF3_&-CONqt&-tree_id=101&-redoLog=false&-all_geo_types=N&-geo_id=05000US55131&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');
            addOption(daForm, 'Census 2000 DP-4 Profile of Selected Housing Characteristics', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-conqt&-qr_name=DEC_2000_SF3_U_DP4&-ds_name=DEC_2000_SF3_U&-CONqt&-tree_id=403&-all_geo_types=N&-redoLog=true&-_caller=geoselect&-geo_id=05000US55131&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');
            addOption(daForm, 'Census 1990 DP-5 Housing Characteristics', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-conqt&-qr_name=DEC_1990_STF3_DP5&-ds_name=DEC_1990_STF3_&-CONqt&-tree_id=101&-redoLog=true&-all_geo_types=N&-_caller=geoselect&-geo_id=05000US55131&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');      
   }
   else if (thegeo.options[thegeo.selectedIndex].text=='--Select a Geography--'){
            RemoveAll()
            addOption(daForm, '--Select a Profile--', 'none', getClientID() + 'optProfile');
   }
   else {
            RemoveAll()
            addOption(daForm, '--Select a Profile--', 'none', getClientID() + 'optProfile');
            addOption(daForm, 'Census 1990 DP-1 General Population and Housing Characteristics', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-conqt&-qr_name=DEC_1990_STF1_DP1&-ds_name=DEC_1990_STF1_&-CONqt&-tree_id=100&-redoLog=true&-all_geo_types=N&-_caller=geoselect&-geo_id=06000USMyID&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');
            addOption(daForm, 'Census 2000 DP-1 Profile of General Demographic Characteristics', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-conqt&-qr_name=DEC_2000_SF1_U_DP1&-ds_name=DEC_2000_SF1_U&-CONqt&-tree_id=4001&-all_geo_types=N&-redoLog=true&-_caller=geoselect&-geo_id=06000USMyID&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');
            addOption(daForm, 'Census 1990 DP-2 Social Characteristics', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-conqt&-qr_name=DEC_1990_STF3_DP2&-ds_name=DEC_1990_STF3_&-CONqt&-tree_id=100&-redoLog=true&-all_geo_types=N&-geo_id=06000USMyID&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');
            addOption(daForm, 'Census 2000 DP-2 Profile of Selected Social Characteristics', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-conqt&-qr_name=DEC_2000_SF3_U_DP2&-ds_name=DEC_2000_SF3_U&-CONqt&-tree_id=4001&-all_geo_types=N&-redoLog=true&-geo_id=06000USMyID&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');
            addOption(daForm, 'Census 1990 DP-3 Labor Force Status and Employment Characteristics', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-conqt&-qr_name=DEC_1990_STF3_DP3&-ds_name=DEC_1990_STF3_&-CONqt&-tree_id=100&-redoLog=false&-all_geo_types=N&-geo_id=06000USMyID&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');
            addOption(daForm, 'Census 2000 DP-3 Profile of Selected Economic Characteristics', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-conqt&-qr_name=DEC_2000_SF3_U_DP3&-ds_name=DEC_2000_SF3_U&-CONqt&-tree_id=4001&-all_geo_types=N&-redoLog=false&-geo_id=06000USMyID&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');
            addOption(daForm, 'Census 1990 DP-4 Income and Poverty Status in 1989', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-conqt&-qr_name=DEC_1990_STF3_DP4&-ds_name=DEC_1990_STF3_&-CONqt&-tree_id=100&-redoLog=false&-all_geo_types=N&-geo_id=06000USMyID&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');
            addOption(daForm, 'Census 2000 DP-4 Profile of Selected Housing Characteristics', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-conqt&-qr_name=DEC_2000_SF3_U_DP4&-ds_name=DEC_2000_SF3_U&-CONqt&-tree_id=4001&-all_geo_types=N&-redoLog=false&-geo_id=06000USMyID&-search_results=01000US&-format=&-_lang=en ', getClientID() + 'optProfile');
            addOption(daForm, 'Census 1990 DP-5 Housing Characteristics', 'http://factfinder.census.gov/servlet/QTTable?_bm=y&-conqt&-qr_name=DEC_1990_STF3_DP5&-ds_name=DEC_1990_STF3_&-CONqt&-tree_id=100&-redoLog=false&-all_geo_types=N&-geo_id=06000USMyID&-search_results=01000US&-format=&-_lang=en', getClientID() + 'optProfile');
   }
thepro.selectedIndex = 0;
}
