// function to transfer control to respectiove agency search page
function PVO_Agency_Type(agencyType)
{
	if (agencyType =="PVO"){
	   PVO_Violation_Search();
	}
	else if (agencyType =="RLV"){
	   PVO_Red_Light();
    	}
	else if (agencyType =="PTA"){
	   findPropertyTaxes("TAX_QUERY_SETUP", 'B');
    	}
        else if (agencyType == "DEP"){
	  waterChargeQuerySetup("DEP_WATER_CHARGE_QUERY_SETUP");
	}
    	else if (agencyType == "BUS") {
    	   findBusinessTaxes("BUSINESS_TAX_QUERY_SETUP");
    	      }
    	else if (agencyType == "HEA") {
    		healthViolationsCheckLastPaymentQuerySetup("GET_HEALTH_VIOLATION_SEARCH_QUERY_SETUP");
    	}
    		
    	else if (agencyType == "CNA") {
    		consumerAffairsViolationsQuerySetup("GET_CONSUMER_AFFAIRS_VIOLATION_SEARCH_QUERY_SETUP");
    	}
    	else if (agencyType == "ECB") {
    		environmentalBoardViolationsquerySetup("GET_ECB_VIOLATION_SEARCH_QUERY_SETUP");
    	}
}

function PVO_Violation_Search(searchType)
{
	setServiceName("PVO_QUERY_SETUP");
	setSearchType(searchType);
	submitProtocolForm();
}

function requestHearing(serviceName)
{
	setServiceName(serviceName);
	submitProtocolForm();
}

function PVO_Red_Light() {
	setServiceName("RED_LIGHT_QUERY_SETUP");
	submitProtocolForm();
}

function findPropertyTaxes(serviceName, searchType)
{
	setServiceName(serviceName);
	setSearchType(searchType);
	submitProtocolForm();
}

function findBusinessTaxes(serviceName)
{
	setServiceName(serviceName);
	submitProtocolForm();
}


function findPaymentHistory(serviceName) {
	setServiceName(serviceName);
	submitProtocolForm();
}

function showBasket()
{
	setServiceName("SHOW_BASKET");
	submitProtocolForm();
}

function gotoFAQpage()
{
	openPopUpWindow('FAQ.html','FAQPopUp','650','480','no','yes','yes','yes');
}

// function to submit water charge query setup service
function waterChargeQuerySetup(serviceName)
{
	setServiceName(serviceName);
	submitProtocolForm();
}

// function to submit water charge payment history query setup service
function waterChargePaymentHistoryQuerySetup(serviceName)
{
	setServiceName(serviceName);
	submitProtocolForm();
}


function consumerAffairsViolationsQuerySetup(serviceName)
{
	setServiceName(serviceName);
	submitProtocolForm();
}

function consumerAffairsViolationsCheckLastPaymentQuerySetup(serviceName)
{
	setServiceName(serviceName);
	submitProtocolForm();
}


// function to submit water charge query setup service
function healthViolationsQuerySetup(serviceName)
{
	setServiceName(serviceName);
	submitProtocolForm();
}

function healthViolationsCheckLastPaymentQuerySetup(serviceName)
{
	setServiceName(serviceName);
	submitProtocolForm();
}


function PVO_Find_Towed_Vehicle()
{
	setServiceName("PVO_FIND_TOWED_VEHICLE");
	submitProtocolForm();
}

function propertyTaxCheckLastPaymentQuerySetup(serviceName)
{
	setServiceName(serviceName);
	submitProtocolForm();
}

function environmentalBoardViolationsquerySetup(serviceName) {
	setServiceName(serviceName);
	submitProtocolForm();
}

function goURL(form,selectfieldname) {
	/*var selindex = eval(form.name + "." + selectfieldname + ".selectedIndex;");
	if (!selindex == "") {
		window.location.href = eval("form." + selectfieldname + ".options[selindex].value");
		//window.location.href=form.dropdownmenu.options[myindex].value;
	}*/
	window.location.href = eval("document." + form.name + "." + selectfieldname + ".options[document." + form.name + "." + selectfieldname + ".selectedIndex].value");
}