function OwnToggle ( p_div ) {
	if (document.getElementById( p_div ).style.display == "none") {
		OwnShow ( p_div );
	}
	else {
		OwnHide ( p_div );
	}
}

function OwnShow( p_div  ) {
	document.getElementById( p_div ).style.display="";
}
function OwnHide( p_div  ) {
	document.getElementById( p_div ).style.display="none";
}

function reply(post_count) {
	szoveg = document.getElementById( 'reply_'+post_count ).innerHTML;
	szerzo = document.getElementById( 'reply_name_'+post_count ).innerHTML;
	document.getElementById( 'reply_message' ).value = '[quote='+szerzo+']'+szoveg+'[/quote]';
	
	
}

function autokitolt() {
	document.forms[0].ch_payable_to.value = document.forms[0].last_name.value + " " + document.forms[0].middle_name.value + " " + document.forms[0].first_name.value;
	document.forms[0].ch_street.value = document.forms[0].street.value;
	document.forms[0].ch_city.value = document.forms[0].city.value;
	document.forms[0].ch_zip.value = document.forms[0].zip.value;
	document.forms[0].ch_state.value = document.forms[0].state.value;
	
	document.forms[0].pay_first_name.value = document.forms[0].first_name.value;
	document.forms[0].pay_middle_name.value = document.forms[0].middle_name.value;
	document.forms[0].pay_last_name.value = document.forms[0].last_name.value;
}

function state2field() {
	document.forms[0].state.value = document.forms[0].state_select.value;
}

function TogglePayment() {
	var f=document.getElementById('pay_mode').value;
	if ( f == "1" ) { 
		OwnShow('ctd');
		OwnHide('wtd');
		OwnHide('etd');	
	} 
	if ( f == "2" ) {
		OwnShow('wtd');
		OwnHide('ctd');
		OwnHide('etd');		
	}
	if ( f != "2" && f != "1" ) {
		OwnHide('wtd');
		OwnHide('ctd');		
		OwnHide('etd');		
	}
	if ( f == "3" ) {
		OwnHide('wtd');
		OwnHide('ctd');		
		OwnShow('etd');
	}

	

}

function changeHTML ( p_div , htmlURL ) {

	 
 


			//alert(htmlURL);
			var xmlhttp
			/*@cc_on @*/
			/*@if (@_jscript_version >= 5)
			try {
			xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")
			} catch (e) {
			try {
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
			} catch (E) {
			xmlhttp=false
			}
			}
			@else
			xmlhttp=false
			@end @*/

			if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
				try {
					xmlhttp = new XMLHttpRequest();
					} catch (e) {
						xmlhttp=false
					}
				}

				xmlhttp.open("GET", htmlURL,true);
				xmlhttp.onreadystatechange=function() {
					if (xmlhttp.readyState==4) {
						document.getElementById( p_div ).innerHTML=xmlhttp.responseText;
		 
					}
				}
				xmlhttp.send(null);
			} //changehtml
