
var ie5 = (document.getElementById && document.all);
var ns6 = (document.getElementById && !document.all);

var _intID =  0;
var _op    =  0;
var _ypos  = -130;
var _yinc  =  7;


function startEntrance(LayerID)
{
	obj = document.getElementById(LayerID);
	_intID = setInterval("_doEntranceCB(obj)", 20);
//		document.forms["frmPostCode"].elements["Postcode"].focus();
		document.forms["frmPostCode"].elements["Postcode"].select();
}

function stopEntrance()
{
	if (_intID) {
		clearInterval(_intID);
		_intID = 0;
	}
}

function _doEntranceCB(obj)
{
	_op += 5;
	if (_op > 90) {	// stop at 90% transparency
		_op = 90;
		stopEntrance();
	}
	
	if(ie5){
//		obj.style.filter = 'alpha(opacity=' + _op + ', FinishOpacity=0, Style=1, StartX=0, StartY=15, FinishX=0, FinishY=1)';
		obj.filters.alpha.opacity = _op;
	}
//	if(ns6){
	else {
//		obj.style.MozOpacity = 0 + '%';
//		obj.style.MozOpacity = opacity + '%';
		obj.style.opacity = _op/100;
	}
	
	_ypos += _yinc;
	if (_ypos > 0) {
		_ypos = 0;
		_yinc = 0;
	}
	obj.style.top = _ypos;
}
