var STARTPOSX = 630;
var STARTPOSY = 22;
var OBJSIZE = 308;
var X = 0;
var XSTART = 0;
var YSTART;
var SPEED = 1;


function initCircle() {
	var screenWidth = getWidth();
	var screenHeight = getHeight();
	document.body.style.overflow = "hidden";

	document.getElementById("bol3").style.display = "block";
	
	XSTART = -((screenWidth - 950)/2);
	X = 950 + ((screenWidth - 950)/2);
	YSTART = screenHeight;
	
	circle(0);
}
function showCircle() {
	document.getElementById("bol3").style.display = "block";
}
function circle(step) {
	var c = document.getElementById("bol3");
	var x = 1;
	var y = (Math.sin(step+(Math.PI)));
	
	c.style.left = XSTART+(step/(Math.PI/2))*X-OBJSIZE+"px";
	c.style.top = (y*YSTART+YSTART)+STARTPOSY+"px";
	
	step += 0.01;
	if (step <= Math.PI / 2) setTimeout("circle("+step+")", SPEED);
}

function getWidth() {
	var myWidth;
	  if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
	
	  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;

	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
	  }
	 return myWidth;


}

function getHeight() {
  var myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
  return myHeight;

}

