

function centerElement (id,elWidth,elHeight,xOffset,yOffset) {
				
	var el, windowWidth, windowHeight, cx, cy;
	if (document.layers) {
		el = document[id];
		windowWidth = window.innerWidth;
		windowHeight = window.innerHeight;
		//elWidth = el.offsetWidth;
		//elHeight = el.offsetHeight;
	}
	else if (document.all) {
		el = document.all[id];
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
		//elWidth = el.offsetWidth;
		//elHeight = el.offsetHeight;
	}
	else if (document.getElementById) {
		el = document.getElementById(id);
		windowWidth = window.innerWidth;
		windowHeight = window.innerHeight;
		//elWidth = el.offsetWidth;
		//elHeight = el.offsetHeight;
	}
	if (windowHeight<580)windowHeight=580
	if (windowWidth<760)windowWidth=760
	
	cx = Math.floor((windowWidth - elWidth) / 2) + xOffset;
	cy = Math.floor((windowHeight - elHeight) / 2) + yOffset;
	if (document.layers) {
		el.left = cx ;
		el.top = cy + yOffset;
		el.visibility = 'show';
	}
	else if (document.all || document.getElementById) {
		el.style.left = cx + 'px';
		el.style.top = cy + 'px';
		el.style.visibility = 'visible';
	}
				
}

function fnGetObj(id)
{
	var el;
	if (document.layers) {
		el = document[id];
	}
	else if (document.all) {
		el = document.all[id];
	}
	else if (document.getElementById) {
		el = document.getElementById(id);
	}
	return el;
}

function fnSetZ(id,z)
{
	var el=fnGetObj(id);
	el.style.zIndex=z;
	
}

var zIndexStatus=100;
function fnSetTop(id)
{
	zIndexStatus++;
	fnSetZ(id,zIndexStatus);
}

function PlayStart(objname)
{
	if (msieversion()>=6){document.images[objname].filters[0].apply();}
}
function PlayFinish(objname)
{
	if (msieversion()>=6){document.images[objname].filters[0].play();}
}
