function sTog(hide_first) {
	var d=document,t=this;
	t.hide_first = hide_first ? 1 : 0;
	t.tog =function(t_id,c_id,c_type,s_info,h_info,t_id2) {
		if (!document.getElementById
		|| !document.getElementById(t_id) ) return;
		var target = document.getElementById(t_id);
		if (target.style.display=='none') {
			target.style.display='';
			if (d.getElementById(t_id2)) d.getElementById(t_id2).style.display='';
			if (c_id && document.getElementById(c_id) && c_type=='href' 
			&& h_info) {
				document.getElementById(c_id).innerHTML = h_info;
			} else if (c_id && document.getElementById(c_id) && c_type=='img' 
			&& h_info) {
				document.getElementById(c_id).src = h_info;
			}
		} else {
			target.style.display='none';
			if (d.getElementById(t_id2)) d.getElementById(t_id2).style.display='none';
			if (c_id && document.getElementById(c_id) && c_type=='href' 
			&& s_info) {
				document.getElementById(c_id).innerHTML = s_info;
			} else if (c_id && document.getElementById(c_id) && c_type=='img' 
			&& s_info) {
				document.getElementById(c_id).src = s_info;
			}
		}
	}
	t.set_d =function(t_id,c_id,c_type,s_info,h_info,first) {
		if (first) {
			if (t.hide_first) t.tog(t_id,c_id,c_type,s_info,h_info);
		} else {
			t.tog(t_id,c_id,c_type,s_info,h_info);
		}
	}
}
// dev411Tog Copyright (c) 2006 John Wang
function dev411Tog(ctl_name,tid_a,cid_a,ctl_a_active,tid_b,cid_b,ctl_b_active) {
        var d=document,t=this;
        t.tid_a=tid_a;t.cid_a=cid_a,t.ctl_a_active=ctl_a_active;//t.ctl_a_inactive=ctl_a_inactive;
        t.tid_b=tid_b;t.cid_b=cid_b,t.ctl_b_active=ctl_b_active;//t.ctl_b_inactive=ctl_b_inactive;
        t.ctl_a_inactive = '<a href="#" onclick="' + ctl_name + '.tog(\'a\');return false;">'+t.ctl_a_active+'</a>';
        t.ctl_b_inactive = '<a href="#" onclick="' + ctl_name + '.tog(\'b\');return false;">'+t.ctl_b_active+'</a>';
        t.tog =function(op) {
                if (!(op)) return;
                var active,inactive,ctl_a,ctl_b;
                if      (op=='a') {active=t.tid_a;inactive=t.tid_b;ctl_a=t.ctl_a_active;ctl_b=t.ctl_b_inactive}
                else if (op=='b') {active=t.tid_b;inactive=t.tid_a;ctl_a=t.ctl_a_inactive;ctl_b=t.ctl_b_active}
                else return;
                if(d.getElementById(inactive)) d.getElementById(inactive).style.display='none';
                if(d.getElementById(active))   d.getElementById(active).style.display='';
                if(d.getElementById(t.cid_a))  d.getElementById(t.cid_a).innerHTML=ctl_a;
                if(d.getElementById(t.cid_b))  d.getElementById(t.cid_b).innerHTML=ctl_b;
        }
}

