
function ab(objectId){ 
if(document.getElementById && document.getElementById(objectId)){ 
// W3C DOM 
return document.getElementById(objectId); 
} 
else if (document.all && document.all(objectId)){ 
// MSIE 4 DOM 
return document.all(objectId); 
} 
else if (document.layers && document.layers[objectId]){ 
// NN 4 DOM.. note: this won't find nested layers 
return document.layers[objectId]; 
} 
else{ 
return false; 
} 
} 


var now_show_id =0 ; 
function swap(id,bool) 
{ 
	if(id == now_show_id )return true; 
	now_show_id =id ; 
	for(var i=1;i<=9;i++) 
	{ 
		if(bool) 
		{ 
			if(ab('b'+i))
			{ 
				ab("b"+i).style.display = bool ? 'none' : 'block'; 
				ab("s"+i).style.display = bool ? 'block' : 'none'; 
			} 
		} 
	} 
	ab("b"+id).style.display = bool ? 'block' : 'none'; 
	ab("s"+id).style.display = bool ? 'none' : 'block'; 
} 


var now_id1 = 0; 
function swap1(id,bool1) 
{ 
	if(id == now_id1 )return true; 
	now_id1 =id ; 
	for(var i=1;i<=9;i++) 
	{ 
		if(bool1) 
		{ 
			if(ab('d'+i))
			{ 
				ab("d"+i).style.display = bool1 ? 'none' : 'block'; 
				ab("a"+i).style.display = bool1 ? 'block' : 'none'; 
			} 
		} 
	} 
	ab("d"+id).style.display = bool1 ? 'block' : 'none'; 
	ab("a"+id).style.display = bool1 ? 'none' : 'block'; 
} 

/* End Script */ 
