// Indicates if a text box contains text. 
function ContainsText(txtIn){
	if (txtIn.value == ''){
		return false;
	}
}

// These open the parcel inquiry help, from the ? graphic
function openhelp(url) 
	{window.open(url,'pihelp','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=no,width=420,height=530');}
	
// For faq_lien page
function openPopUp(url, width, height, x_coordinate, y_coordinate) 
	{window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=no,width='+width+',height='+height+',left='+x_coordinate+',top='+y_coordinate);}

//  Parcel Inquiry - Client-side validation
var submitted = false;
function validate(theForm) {
   if (!submitted) {
      submitted = true;
      errmsg = "";
      submitcount = 0;

// strips spaces and dashes, returns good string
	var theValue = theForm.Parcel.value;
	var out = "", flag = 0;
	for (i = 0; i < theValue.length; i++) {
	if ((theValue.charAt(i) != " ") && (theValue.charAt(i) != "-")) {
		out += theValue.charAt(i);
		flag = 0;
	} else {
	if(flag == 0) {
		out += "";
		flag = 1;
	      }
	   }
	}
	theForm.Parcel.value = out;

// checks for no entry, digits less than 8 or more than 10, returns error to user
	if ((theForm.Parcel.value == "") || (String(theForm.Parcel.value).length < 8) || (String(theForm.Parcel.value).length > 10)) {
	   errmsg += "Please enter a valid parcel number. \nYour parcel number is 8 digits, sometimes \nfollowed by a alpha character.\n";
	   theForm.Parcel.focus();
		}

// removes 10th digit, returns 9-digit string
	if (String(theForm.Parcel.value).length == 10) {
		theForm.Parcel.value = theForm.Parcel.value.substring(0,theForm.Parcel.value.length-1);
		}
  
// removes 9th digit if numeric, returns either 9-digit with alpha or 8-digit numeric 
	if (String(theForm.Parcel.value).length == 9) {
		if (theForm.Parcel.value.charAt(8) < "A" || theForm.Parcel.value.charAt(8) > "z") {
		theForm.Parcel.value = theForm.Parcel.value.substring(0,theForm.Parcel.value.length-1);
		} 
	  }

// submits valid string  
     if (errmsg == "") {
     return true;
     } else {
     alert (errmsg);
     submitted = false;
     return false;
    }
  }
}


// Taxbill.htm hover script
var linktext=new Array()

// be careful adding too much text to these definitions, there is only so much room on the page...  
linktext[0]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Address Block</b><br>The mailing address is usually obtained from the Assessor\'s Office who in turn receives the information from the Deed or Affidavit of Value recorded with the Recorder\'s Office. The mailing address may be different than the owner or the property address. To change the mailing address, enter your parcel number above.</td></tr></table>'
linktext[1]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Limited Value(Primary)</b><br>Legislatively established value based on a mathematical formula that limits the valuation increase in any given year.  Taxes on Limited Value for the maintenance and operation of State, County, cities, School Districts and Community College Districts.</td></tr></table>'
linktext[2]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Full Cash Value(Secondary)</b><br>Assessor\'s estimate of true market value.  Taxes on Full Cash Value, but used to fund bonds, overrides, and certain special districts.</td></tr></table>'
linktext[3]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Total 2008 Assessed Taxes</b><br>This shows the total current tax amount due, if paid in full.</td></tr></table>'
linktext[4]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Primary Limited Values(PRI)</b><br>Limited Value is a figure determined by mathematical computations provided for in the statutes.  This area explains the property, shows the property limited value, shows the property classification percentage, and shows the limited assessed value.  The limited assessed value is figured by multiplying the limited value by the ratio.</td></tr></table>'
linktext[5]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Area Code</b><br>Assessor assigned code that represents the subpolitical jurisdiction that receives the tax dollars.  The first two digits represent the school district, the next two digits represent the city or town and the last two digits represent special districts.</td></tr></table>'
linktext[6]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Secondary Full Cash Values(SEC)</b><br>Full Cash Value represents the Assessor\'s approximate market value.  The full cash assessed value is figured by multiplying the full cash value by the ratio.</td></tr></table>'
linktext[7]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Special District</b><br>These districts are authorized by statute and approved by local voter\'s government to provide specific service to the taxed individual.  The assessments for these special districts are not always calculated on the values of the property.  They can be based on the value in acreage, value in dollars, or value in frontage square feet.</td></tr></table>'
linktext[8]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Parcel/Account #</b><br>The parcel number identifies the subject property, or land parcel, for tax purposes.  The number is composed of the book, map, and parcel number as defined by the Maricopa County Assessor\'s Office, and has a check digit for verification of input.</td></tr></table>'
linktext[9]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Property Address</b><br>According to the Office of the Maricopa County Assessor this is the physical location of the property being represented by this bill.</td></tr></table>'
linktext[10]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Legal Description</b><br>Description of real property sufficient to locate it on the ground by reference to surveys or approved recorded maps.</td></tr></table>'
linktext[11]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Previous Year Comparison</b><br>This column lists the amount of tax for the previous year.</td></tr></table>'
linktext[12]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Current Year Tax Distribution</b><br>This column is the breakdown of the current taxes. It shows the tax rate for every $100 is assessed value and the total tax for each jurisdiction.  The taxes can be figured by multiplying the limited assessed value or full cash assessed value by 100 percent. Then multiply that amount by the tax rate.</td></tr></table>'
linktext[13]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Percentage Change</b><br>This represents the difference between the current year assessment and the prior year assessment as defined in the form of a percentage.</td></tr></table>'
linktext[14]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>School District</b><br>Your local school district assesses tax for Maintenance and Operations and Capital Outlay.</td></tr></table>'
linktext[15]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>School Bonds</b><br>A voter approved tax required to pay for the debt service for City, County, and School Bond Projects.</td></tr></table>'
linktext[16]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>School Overrides</b><br>A tax that has been approved by voters in prior years to exceed the operating budget.  Voter overrides may last up to three years unless an additional override is subsequently approved by public vote.</td></tr></table>'
linktext[17]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Community College Dist</b><br>This tax is levied for the maintenance and operations of the Maricopa County Community College District.</td></tr></table>'
linktext[18]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Community College Dist Bonds</b><br>A voter approved tax required to pay for the debt service for Community College and School Bond Projects.</td></tr></table>'
linktext[19]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>State Equalization Tax</b><br>County equalization assistance for education.</td></tr></table>'
linktext[20]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Special School District</b><br>This tax is levied on property that is not annexed within any local school district.</td></tr></table>'
linktext[21]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>State Aid</b><br>State Aid to Education is given on residential property for school district tax rates.</td></tr></table>'
linktext[22]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Elderly Assistance</b><br>Prorata-credit for the school district\'s primary tax from qualifying for the "Senior Valuation Freeze."</td></tr></table>'
linktext[23]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>City Tax</b><br>If your city has enacted a property tax for operations, it is shown here.</td></tr></table>'
linktext[24]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>General County Fund</b><br>This is a tax for operations and a supplemental tax for school districts that is to be distributed by the States funding requirements.</td></tr></table>'
linktext[25]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Flood Control of Maricopa Cty</b><br>Maricopa County Flood Control District - The Board of Supervisors authorizes a countywide tax for the construction of flood control projects within Maricopa County.</td></tr></table>'
linktext[26]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Central AZ Water Consv Dist</b><br>Central Arizona Water Conservation District - A countywide tax for both the operations of the districts and a water storage fund.</td></tr></table>'
linktext[27]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Fire District Assistance Tax</b><br>Local Volunteer Fire District - A countywide tax levied by the Board of Supervisors to supplement the Local Volunteer Fire Districts Tax Levies for community fire districts.</td></tr></table>'
linktext[28]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>County Library</b><br>Maricopa County Library District - This district collects taxes for the main County Library, community branches and contributes to a countywide library loan program with other city libraries.</td></tr></table>'
linktext[29]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>County Health Care District</b><br>This is a "County Wide" taxing jurisdiction that was created by the voters to provide supplemental funding for Maricopa Integrated Health Services.</td></tr></table>'
linktext[30]='<table id="bill_info" align="center"><tr><td valign="top" class="font_sml"><b>Grand Total</b><br>Total Current Tax Due. This shows the total current tax amount due, if paid in full.</td></tr></table>'

var ns6=document.getElementById&&!document.all
var ie=document.all

function show_text(thetext, whichdiv)  {
	if (ie) eval("document.all."+whichdiv).innerHTML=linktext[thetext]
	else if (ns6) document.getElementById(whichdiv).innerHTML=linktext[thetext]
    }

function reset(whichdiv)  {
	if (ie) eval("document.all."+whichdiv).innerHTML=''
	else if (ns6) document.getElementById(whichdiv).innerHTML=''
	}
	
// sets focus to the parcel inquiry text box  
function initPage() {
	document.frmparcelinq.Parcel.focus();
}

// GIS map disclaimer.  We must encode the apostrophe in "Treasurer's" since ASP.Net (ParcelWatch app) cannot properly recognize the literal apostrophe.  
function disclaimerA()	{
	alert("-----Disclaimer-----\n\nThe Maricopa County Treasurer has made every effort to ensure that the information contained on this web site is accurate and current.  However, the Treasurer"+String.fromCharCode(39)+"s Office does not guarantee that each and every item of information is completely accurate.  Therefore, the user is advised to make his or her own independent analysis and investigation prior to reliance on this information.  The Maricopa County Treasurer"+String.fromCharCode(39)+"s Office hereby disclaims liability for any damages, direct or indirect, arising from use of or reliance upon this information.");
}

