// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
// This javascript is used by the ftax pages:
// It 1) populates the MFL and FCL drop-down boxes and 
//	  2) generates the link to the correct PDF
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

var County= new Array([1,1,"Adams"],[1,1,"Ashland"],[1,1,"Barron"],[1,1,"Bayfield"],[1,1,"Brown"],[1,1,"Buffalo"],[1,1,"Burnett"],[1,1,"Calumet"],[1,1,"Chippewa"],[1,1,"Clark"],[1,1,"Columbia"],[1,1,"Crawford"],[1,1,"Dane"],[1,1,"Dodge"],[1,1,"Door"],[1,1,"Douglas"],[1,1,"Dunn"],[1,1,"Eau Claire"],[1,1,"Florence"],[1,1,"Fond du Lac"],[1,1,"Forest"],[1,1,"Grant"],[1,1,"Green"],[0,0,"Green Lake"],[1,1,"Iowa"],[1,1,"Iron"],[1,1,"Jackson"],[1,1,"Jefferson"],[1,1,"Juneau"],[0,0,"Kenosha"],[1,1,"Kewaunee"],[1,1,"La Crosse"],[1,1,"Lafayette"],[1,1,"Langlade"],[1,1,"Lincoln"],[1,1,"Manitowoc"],[1,1,"Marathon"],[1,1,"Marinette"],[1,1,"Marquette"],[1,1,"Menominee"],[0,0,"Milwaukee"],[1,1,"Monroe"],[1,1,"Oconto"],[1,1,"Oneida"],[1,1,"Outagamie"],[1,1,"Ozaukee"],[1,1,"Pepin"],[1,1,"Pierce"],[1,1,"Polk"],[1,1,"Portage"],[1,1,"Price"],[1,1,"Racine"],[1,1,"Richland"],[1,1,"Rock"],[1,1,"Rusk"],[1,1,"St. Croix"],[1,1,"Sauk"],[1,1,"Sawyer"],[1,1,"Shawano"],[1,1,"Sheboygan"],[1,1,"Taylor"],[1,1,"Trempealeau"],[1,1,"Vernon"],[1,1,"Vilas"],[1,1,"Walworth"],[1,1,"Washburn"],[1,1,"Washington"],[1,1,"Waukesha"],[1,1,"Waupaca"],[1,1,"Waushara"],[0,0,"Winnebago"],[1,1,"Wood"],[])

function mfllist(){
	xx='';z=0
	while (County[z][2]!=null){
	xx+='<option value=z>'+County[z][2]+'</OPTION>'
	z++
	}
}

function fcllist(){
	xy='';z=0
	while (County[z][2]!=null){
	xy+='<option value=z>'+County[z][2]+'</OPTION>'
	z++
	}
}

mfllist()
fcllist()

var County7= new Array([1,1,"Adams"],[1,1,"Ashland"],[1,1,"Barron"],[1,1,"Bayfield"],[1,0,"Brown"],[1,1,"Buffalo"],[1,1,"Burnett"],[1,0,"Calumet"],[1,1,"Chippewa"],[1,1,"Clark"],[1,1,"Columbia"],[1,1,"Crawford"],[1,1,"Dane"],[1,0,"Dodge"],[1,1,"Door"],[1,1,"Douglas"],[1,1,"Dunn"],[1,1,"Eau Claire"],[1,1,"Florence"],[1,0,"Fond Du Lac"],[1,1,"Forest"],[1,1,"Grant"],[1,0,"Green"],[0,0,"Green Lake"],[1,1,"Iowa"],[1,1,"Iron"],[1,1,"Jackson"],[1,0,"Jefferson"],[1,1,"Juneau"],[0,0,"Kenosha"],[1,1,"Kewaunee"],[1,1,"La Crosse"],[1,1,"Lafayette"],[1,1,"Langlade"],[1,1,"Lincoln"],[1,1,"Manitowoc"],[1,1,"Marathon"],[1,1,"Marinette"],[1,1,"Marquette"],[1,0,"Menominee"],[0,0,"Milwaukee"],[1,1,"Monroe"],[1,1,"Oconto"],[1,1,"Oneida"],[1,1,"Outagamie"],[1,0,"Ozaukee"],[1,1,"Pepin"],[1,1,"Pierce"],[1,1,"Polk"],[1,1,"Portage"],[1,1,"Price"],[1,0,"Racine"],[1,1,"Richland"],[1,0,"Rock"],[1,1,"Rusk"],[1,1,"St Croix"],[1,1,"Sauk"],[1,1,"Sawyer"],[1,1,"Shawano"],[1,1,"Sheboygan"],[1,1,"Taylor"],[1,1,"Trempealeau"],[1,1,"Vernon"],[1,1,"Vilas"],[1,1,"Walworth"],[1,1,"Washburn"],[1,1,"Washington"],[1,0,"Waukesha"],[1,1,"Waupaca"],[1,1,"Waushara"],[1,0,"Winnebago"],[1,1,"Wood"],[])
// 090316: need to remove ,[1,1,"Waukesha"] for FCL only
function mfllist7(){
	xx7='';z=0
	while (County7[z][2]!=null){
	xx7+='<option value=z>'+County7[z][2]+'</OPTION>'
	z++
	}
}

function fcllist7(){
	xy7='';z=0
	while (County7[z][2]!=null){
	xy7+='<option value=z>'+County7[z][2]+'</OPTION>'
	z++
	}
}

mfllist7()
fcllist7()

function mw(w,u){
	wo=u
	if(w=="mfl"){u='/forestry/ftax/OpenLandsListings/MFL/'+County[wo][2]+'_MFL.pdf'}
	else {u='/forestry/ftax/OpenLandsListings/FCL/'+County[wo][2]+'_FCL.pdf'}
	
	dont=0
	if(County[wo][0]==0 && w=="mfl"){alert(County[wo][2]+" county has no MFL land.");dont=1}
	if(County[wo][1]==0 && w=="fcl"){alert(County[wo][2]+" county has no FCL land.");dont=1}
	if (!dont){
	swi=Math.round((screen.width*0.9))
	she=Math.round((screen.height*0.9))
	windowX = Math.round(((screen.width/2)-(swi/2))) 
	windowY = Math.round(((screen.height/2)-(she/2)))
	wn=Math.round(Math.random()*100);nw=open(u, wn,"toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width="+swi+",height="+she+",left="+windowX+",top="+windowY)}
}

function mx(w,u){
	wo=u
	if(w=="mfl"){u='/forestry/ftax/OpenLandsListings/2009/MFL/'+County7[wo][2]+'_MFL.pdf'}
	else {u='/forestry/ftax/OpenLandsListings/2009/FCL/'+County7[wo][2]+'_FCL.pdf'}
	
	dont=0
	if(County7[wo][0]==0 && w=="mfl"){alert(County7[wo][2]+" county has no MFL land.");dont=1}
	if(County7[wo][1]==0 && w=="fcl"){alert(County7[wo][2]+" county has no FCL land.");dont=1}
	if (!dont){
	swi=Math.round((screen.width*0.9))
	she=Math.round((screen.height*0.9))
	windowX = Math.round(((screen.width/2)-(swi/2))) 
	windowY = Math.round(((screen.height/2)-(she/2)))
	wn=Math.round(Math.random()*100);nw=open(u, wn,"toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width="+swi+",height="+she+",left="+windowX+",top="+windowY)}
}


