function $(i){return document.getElementById(i);}
function Delete(){return confirm('Are you sure you wish to continue?');}
function Avail(val){
	var t=(val<50);
	$('payment').className=(t?'hide':'');
	$('payment').disabled=t;
	$('deposit').className=(t?'':'hide');
	$('deposit').disabled=!t;
	t=(val>=100);
	$('checkno').className=(t?'':'hide');
	$('checkno').disabled=!t;
}
function Swap(id){
	if($(id).className=='')Payment('','','','');
	$(id).className=($(id).className=='hide'?'':'hide');
}
function Show1(g,c,s){for(var i=1;i<=c;i++)$(g+i).className=(i==s?'':'hide');}
function Hover(id,c){$(id).className=c;}
function Flag(obj,acct,id){obj.src='?account='+acct+'&flag='+id+'&t='+Math.random();}
function Collapse(obj){obj.parentNode.className=(obj.parentNode.className=='tab-open'?'tab-close':'tab-open');}
function Date(e,m,y){
	var d=parseInt(e.target?e.target.innerHTML:e.srcElement.innerHTML);
	if(d>0&&$('date'))$('date').value=m+'/'+d+'/'+y;
}
function Payment(desc,amount,id,when){
	$('desc').value=desc;
	$('payment').value=amount;
	$('pay').value=id;
	$('when').value=when;
	$('add').className='';
}
function Load(url,id){
	var xmlHttp;
	try{xmlHttp=new XMLHttpRequest();}
	catch(e){
		try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
		catch(e){
			try{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
			catch(e){return null;}
		}
	}
	xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4)$(id).innerHTML=xmlHttp.responseText;}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}