/******************* tecni_table.js by adolfo@tecni.com version 2006.04.07 **********************/

function tecni_table_set(id, newC) { // expand
	var count=0;
	var obj;
	while (obj = document.getElementById(id+"_"+count)) {
		if (newC) { 
			obj.className = newC; 
		} else if (obj.className == 'tecni_table_add') { 
			obj.className = 'hide'; 
		} else if (obj.className == 'hide') { 
			obj.className = 'tecni_table_add';
		} else if (obj.className == 'tecni_table_on') { 
			obj.className = 'tecni_table_off'; 
		} else if (obj.className == 'tecni_table_off') { 
			obj.className = 'tecni_table_on'; 
		} else if (obj.className == 'tecni_table_up') { 
			obj.className = 'tecni_table_down'; 
		} else if (obj.className == 'tecni_table_down') { 
			obj.className = 'tecni_table_up'; 
		} else if (obj.className == 'tecni_title_on') { 
			obj.className = 'tecni_title_off'; 
		} else if (obj.className == 'tecni_title_off') { 
			obj.className = 'tecni_title_on'; 
		}
		count++;
	}
}

function tecni_table_check(id, cookiename) { 
	var obj;
	var prefvalue; 
	if (obj = document.getElementById(id+"_1")) {
		if (obj.className == 'hide') {
			prefvalue = 1;
		} else {
			prefvalue = 0;
		}
		document.cookie = cookiename+"="+prefvalue;
	}
	return void(0);
}

