

function swap() {
  if (document.images) {
    for (var i=0; i<swap.arguments.length; i+=2) {
      document[swap.arguments[i]].src = eval(swap.arguments[i+1] + ".src");
    }
  }
}


/* calendar */
var oldbg = '';
var oldtx = '';
function ov(o, bg, tx){
	oldbg = o.style.backgroundColor;
	//if(o.children) oldtx = o.children[0].style.color;
	//else oldtx = o.childNodes[0].style.color;
	
	o.style.backgroundColor = '#E3E3E3';	
	//if(o.children) o.children[0].style.color = 'white';
	//else o.childNodes[0].style.color = 'white';
	
	o.style.cursor = 'hand';
}

function ou(o){
	o.style.backgroundColor = oldbg;
	//if( o.children ) o.children[0].style.color = oldtx;
	//else o.childNodes[0].style.color = oldtx;
	//oldbg = oldtx = '';
}

/* nav */
function navo(o){
 o.style.backgroundColor = "#ffffff";
 o.style.cursor = "default";
}

function navu(o){
 o.style.backgroundColor = "#ffffff";
 o.style.cursor = "auto";
}
	


function toggle(o)
{
	var box = 'div_'+o;
	var img = 'img_'+o;
	var oBox = getDiv(box);

	if( oBox == null ) return;

	var current = oBox.style.display;
	
	//alert( current );
	
	if( current == 'none' ){
		oBox.style.display = 'block';
		eval("document."+img).src = "/public/images/newsbox/arrow_down.gif";
	}
	if( current == 'block' ){
		oBox.style.display = 'none';
		eval("document."+img).src = "/public/images/newsbox/arrow.gif";
	}
	 
}

function getDiv(id)
{
	if (document.getElementById)
		return document.getElementById(id);
	else if (document.all)
		return document.all[id];
	else if (document.layers)
		return document.layers[id];
	else
		return null; //deserve null
}