// -------------------------------------------------------------- Tab Functions

function setList(pageNumber, divId, type) {

	if (type == 'newlist') {
		setNewList(pageNumber, divId);
	} else if (type == 'countlist') {
		setCountList(pageNumber, divId);
	}
}

function setOpenList(pageNumber, divId) {

	setLoading(divId);
	setLType('open');
	$.post("../pickup/openlist.php",{"p" : pageNumber}, function(data) {
		$("#" + divId).html(data);
	});
}

function setNewList(pageNumber, divId) {

	setLoading(divId);
	setLType('new');
	$.post("../pickup/newlist.php",{"p" : pageNumber}, function(data) {
		$("#" + divId).html(data);
	});
}

function setCountList(pageNumber, divId) {

	setLoading(divId);
	setLType('count');
	$.post("../pickup/countlist.php",{"p" : pageNumber}, function(data) {
		$("#" + divId).html(data);
	});
}

function setTagList(tagId) {

	setLoading('screen');
	setLType('tag');
	$.post("../pickup/taglist.php",{"tid" : tagId}, function(data) {

		$("#screen").html(data);
	});
}

function setLType(ltype) {

	$.post("../pickup/link_type.php",{"ltype" : ltype}, function(data) {

		$("#link_type").html(data);
	});
}

function setTabType(selectTabName) {

	tabNames = new Array("tab-tnew", "tab-tpoint", "tab-ttag");

	for (i = 0; i < tabNames.length; i++) {

		tabName = tabNames[i];

		if (selectTabName == tabName) {
			document.getElementById(tabName).className = tabName + "-s";
		} else {
			document.getElementById(tabName).className = tabName;
		}
	}
}

