function Tabs(id,get) {
	// do the tabs...
	for(i=1; i <= 3; i++) {
		if(document.getElementById("tab"+i)) {
			div = document.getElementById("tab"+i);
			div.style.background = 'url(/pics/dtab_of.gif)';
			var s = document.getElementById("tab"+i).style;
			s.display = "block";
			s.zIndex = parseInt(1)+i;
		}
	}
	div = document.getElementById("tab"+id);
	div.style.background='url(/pics/dtab_on.gif)';
	var sty = div.style;
	sty.display = "block";
	sty.zIndex = 10;

	// do the data...
	for(i=1; i <= 3; i++) {
		if(document.getElementById("data"+i)) {
			div = document.getElementById("data"+i);
			div.style.width ='0px';
			div.style.height='1px';
			div.style.overflow='hidden';
		}
	}

	// now get the dcard content from the hidden div layers...
	div = document.getElementById(get);
	htm = div.innerHTML;
	div = document.getElementById('dcard');
	div.innerHTML = htm;
}

function DoDiv(no) {
	// first close all the other divs...
	for(i=1; i < 30; i++) {
		if(i != no) {
			if(document.getElementById("div"+i)) {
				div = document.getElementById("div"+i);
				div.style.height='1px';
			}
		}
	}
	// var str; for (var i in div.style) { str+=i+"="+div[i]+"\n"; }

	div = document.getElementById("div"+no);
	if(div.style.height=='1px') {
		div.style.height='100%';
	} else {
		div.style.height='1px'
	}
	return false;
}

function MyList(lid,uid) {
	img = document.getElementById('myList');
	img.src = "/pics/null.gif";
	var http = null;
	try { http=new XMLHttpRequest(); }
	catch (e) { try { http=new ActiveXObject("Msxml2.XMLHTTP"); }
	catch (e) { http=new ActiveXObject("Microsoft.XMLHTTP"); } }
	if (http==null) { alert ("Your browser does not support AJAX!"); return; }
	http.open("GET","/addlist.htm?lid="+lid+"&uid="+uid,true);
	http.onreadystatechange = function() {
		if(http.readyState==4) {
			alert(http.responseText);
		}
	}
	http.send(null);
}

function AddRec(id) {
	var http = null;
	try { http=new XMLHttpRequest(); }
	catch (e) { try { http=new ActiveXObject("Msxml2.XMLHTTP"); }
	catch (e) { http=new ActiveXObject("Microsoft.XMLHTTP"); } }
	if (http==null) { alert ("Your browser does not support AJAX!"); return; }
	http.open("GET","/recs.htm?add="+id,true);
	http.onreadystatechange = function() {
		if(http.readyState==4) {
			div = document.getElementById('rec3');
			div.innerHTML = http.responseText;
		}
	}
	http.send(null);
}

function DelRec(id) {
	var http = null;
	try { http=new XMLHttpRequest(); }
	catch (e) { try { http=new ActiveXObject("Msxml2.XMLHTTP"); }
	catch (e) { http=new ActiveXObject("Microsoft.XMLHTTP"); } }
	if (http==null) { alert ("Your browser does not support AJAX!"); return; }
	http.open("GET","/recs.htm?del="+id,true);
	http.onreadystatechange = function() {
		if(http.readyState==4) {
			div = document.getElementById('rec3');
			div.innerHTML = http.responseText;
		}
	}
	http.send(null);
}


