// JavaScript Document
function showhide(id){ 
	if (document.getElementById){ 
	var el = document.getElementById(id); 
	el.style.display = (el.style.display == 'none') ? 'block' : 'none'; 
	window.parent.resizeCaller();
	} 
}

	function checkUncheckAll(theElement) {
     var theForm = theElement.form, z = 0;
	 for(z=0; z<theForm.length;z++){
      if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall'){
	  theForm[z].checked = theElement.checked;
	  }
     }
    }

function dorow(rowid,val){
put_rowname='camprow_'+rowid
chk_rowid=document.getElementById(put_rowname);
chk_val=val;
  if ( chk_rowid ) {
    if ( chk_val == "1" ) {
	chk_rowid.style.background = '#5B0808';
	}
	else {
	chk_rowid.style.background = '#cccc99';
	}
  }
}

function gotopage(pagename,regid){
goto_pg=pagename+'.asp?cid='+regid
window.location.href=goto_pg;
}

function submitform(getopt){
showOpt = getopt;
isDelete = ( getopt == '0' );
isPayment = ( getopt == '1' );
var chk_submit=document.getElementById("myform");
var chk_elpayment=document.getElementById("mypayment");
    if ( chk_submit ) {
		if ( isDelete ) {
			//alert('this is a delete btn.');
			if ( chk_elpayment) {
			chk_elpayment.value='';
			}
		chk_submit.target='dynframe';
		chk_submit.action='delete_campregs.asp';
		chk_submit.submit();
		}
		else if ( isPayment ) {
			//alert('this is a payment btn.');
			if ( chk_elpayment) {
			chk_elpayment.value='true';
			}
		chk_submit.target='dynframe';
		chk_submit.submit();
		}
		else {
			//alert('this is neither a payment or delete btn.');
			if ( chk_elpayment) {
			chk_elpayment.value='';
			}
		chk_submit.target='dynframe';
		chk_submit.submit();
		}
	}
}

function submitpass(){
var chk_submit2=document.getElementById("myform2");
    if ( chk_submit2 ) {
	chk_submit2.target='dynframe';
	chk_submit2.submit();
	}
}

function submitit(id){
var chk_submitit=document.getElementById(id);
    if ( chk_submitit ) {
	chk_submitit.submit();
	}
}

function showit(getit){
chk_getit=document.getElementById(getit);
    if ( chk_getit ) {
	chk_getit.style.display='block';
	}
}

function hideit(getit){
chk_getit=document.getElementById(getit);
    if ( chk_getit ) {
	chk_getit.style.display='none';
	}
}

function showhideit(id){
	if (document.getElementById){ 
	var el = document.getElementById(id); 
	el.style.display = (el.style.display == 'none') ? 'block' : 'none'; 
	} 
}

function reloadpg(){
window.location.reload();
}
