//	Gets the mouse co-ordinates for the document mouse over Events

var blast = false;

// General functions
function isNull(a) {
	return typeof a == 'object' && !a;
}

//	Handles the mouse event for table rows

function rClick(obj)
{
	obj.style.backgroundColor = 'silver';
}

function hLight(obj)
{
	if (obj.style.backgroundColor == 'transparent' || obj.style.backgroundColor == '' || obj.style.backgroundColor == 'white')
	{
		//obj.style.backgroundColor='#EAEAEA';
		//obj.style.borderColor='gray';
		obj.style.color='black';
	}
}

function lLight(obj)
{
	//if (obj.style.backgroundColor == '#eaeaea')
	//{
		//obj.style.background='';
		//obj.style.borderColor='whitesmoke';
		obj.style.color='#B6B5B5';
//	}

}

function fieldErr(obj)
{
	obj.style.backgroundColor='#FEE7D5';
}

function fieldH(obj)
{
	
	if (obj.style.backgroundColor!='#fee7d5')
		obj.style.backgroundColor='gainsboro';
}

function fieldL(obj)
{
	obj.style.backgroundColor='';
}

//	Image manipulation

//	Balance the image sizes
function resize(image, width)
{
	var temp = new Image();
	temp.src = image.src;
	
	if (temp.width > width)
		image.width = width;
}

//	Handles the fading effects of the images on the pages

var transparency = 50;
var obj;

function revive(pic)
{
	obj = pic;
	transparency = 50;
	
	pic.style.MozOpacity=0.5;
	pic.filters.alpha.opacity=50;
	
	timeoutID = setTimeout("begin_rotate()", 50);				
}

function begin_rotate()
{
	transparency = transparency + 10;

	obj.style.MozOpacity=(transparency/100);
	obj.filters.alpha.opacity=transparency;	
	
	if (transparency < 100)	
		timeoutID = setTimeout("begin_rotate()", 50);			
}

function clear(pic)
{
	obj = null;
	pic.style.MozOpacity=1;
	pic.filters.alpha.opacity=100;
}

