﻿// JScript File

function centerFlash()
{
    if(window.innerHeight)
    {  // If Safari...
		wWidth = window.innerWidth;
		wHeight = window.innerHeight;
	} else 
	{  // Otherwise...
		wHeight = document.documentElement.clientHeight;
		wWidth = document.documentElement.clientWidth;
	}
		
	(wWidth > 980) ? newWidth = (wWidth/2-490) : newWidth = 0;
	(wHeight > 640) ? newHeight = (wHeight/2-320) : newHeight = 0;
	
	document.getElementById("centerFlash").style.top = (newHeight*1+90) + "px";
	document.getElementById("centerFlash").style.left = (newWidth*1+230) + "px";
}

function getXY(Obj) 
{
    var h = Obj.offsetHeight;
    for (var sumTop=0,sumLeft=0;Obj!=document.body;sumTop+=Obj.offsetTop,sumLeft+=Obj.offsetLeft, Obj=Obj.offsetParent);    
    sumTop = h+sumTop;    
    return { left:sumLeft,top:sumTop }
}

function MoveElement(obj,x,y)
{
	obj.style.left = x;
	obj.style.top = y;
}