function onMouseChangeColor(event, highlightcolor, ajaxaction, ajaxdiv, timeout)
{		
	// source is element which was selected b4
	source=document.getElementById('row'+readCookie('id2')); 		
	// change the colour back b4 change actual object
	if(source)	
		source.style.backgroundColor='#D0D0D0';	
	// change colour of the selected row
	changeto(event, highlightcolor);	
	// write the ID to cookie
	createCookie('id2', readCookie('id1'));			
	// call ajax and replace detail div		
	//alert(ajaxaction)
	myajax('/ajax.php?'+ajaxaction+'='+readCookie('id1'), ajaxdiv);
	//ajax('ajax.php?'+ajaxaction+'='+readCookie('id1'), ajaxdiv, '', timeout);
}

function changeColorOver(row_id)
{	
	//alert(row_id);
	// if row not equals to selected ID then
	if ( row_id!=readCookie('id2') )
	{
		source=document.getElementById('row'+row_id);
		
		if(source)	
			source.style.backgroundColor='tan';	
	}
}

function changeColorOut(row_id)
{	
	// if row not equals to selected ID then
	if ( row_id!=readCookie('id1') )
	{
		source=document.getElementById('row'+row_id);
		
		if(source)	
			source.style.backgroundColor='#D0D0D0';	
	}
}

/***********************************************
* Highlight Table Cells Script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Specify highlight behavior. "TD" to highlight table cells, "TR" to highlight the entire row:
var highlightbehavior="TR"

var ns6=document.getElementById&&!document.all
var ie=document.all

function changeto(e,highlightcolor)
{
	source=ie? event.srcElement : e.target	
	if (source.tagName=="TABLE")
		return
	while(source.tagName!=highlightbehavior && source.tagName!="HTML")
		source=ns6? source.parentNode : source.parentElement
	if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
		source.style.backgroundColor=highlightcolor
}

function contains_ns6(master, slave)
{ //check if slave is contained by master
		while (slave.parentNode)
		if ((slave = slave.parentNode) == master)
			return true;
		return false;
}

function changeback(e,originalcolor)
{
	if (ie&&(event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")||source.tagName=="TABLE")
		return
	else if (ns6&&(contains_ns6(source, e.relatedTarget)||source.id=="ignore"))
		return
	if (ie&&event.toElement!=source||ns6&&e.relatedTarget!=source)
		source.style.backgroundColor=originalcolor
}
