function init(hh2Code) {
	setPageId('pg_'); 
	bindHowHeard(); 
	//addFieldRestrictions('pg_txtEmail'); 
	//attachToRadios();
	if (hh2Code != null && hh2Code.length > 0) {
        var _select = $.$(pageId + "howHeardDdl2");	
	    for (i=0; i<_select.options.length; i++) {
	        if (_select.options[i].value == hh2Code) {
	            _select.selectedIndex = i;
	            break;
	        }
	    }
	}	
}

window.onpageshow = function (evt) {
	if (evt.persisted) init();
}		

function attachToRadios() {
    $.$("pg_existingCustomerRadios_0").onclick = existingCustomer;
    $.$("pg_existingCustomerRadios_1").onclick = existingCustomer;
	existingCustomer();
}

function existingCustomer() {
	cssClass = "";
	if (document.getElementById("pg_existingCustomerRadios_0").checked) {
		cssClass = "show";
	}
	getEl("mainhowheardrow").className = cssClass;
	getEl("howheardrow").className = cssClass;	
	if (!$.$("pg_existingCustomerRadios_1").checked) {
		select = $(pageId+"chHowHeard");
		bindHowHeard();
		bindHowHeard2(select);
	}
}
