// JavaScript Document
function loaded(){
	align_vertical();
	so.write("flash");
}

function align_vertical()
{
	var wrapper_obj = document.getElementById("wrapper");
	var data_obj = document.getElementById("data");

	var H1 = Math.round(parseInt(getHeight())/2);
	var H2 = Math.round(parseInt(data_obj.offsetHeight)/2);
	var W1 = Math.round(parseInt(getWidth())/2);
	var W2 = Math.round(parseInt(data_obj.offsetWidth)/2);

	var X = W1 - W2;
	var Y = H1 - H2;
	X = (X > 0) ? X : 0;
	Y = (Y > 0) ? Y : 0;
	data_obj.style.position = "absolute";
	data_obj.style.top = Y + "px";
	data_obj.style.left = X + "px";
}
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;
}
function getWidth() {
  var myWidth = 0;
  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 show(divId)
{
	document.getElementById(divId).style.display = 'block';
}
function hide(divId)
{
	document.getElementById(divId).style.display = 'none';
}
function set_age(age,redirect_url){
var r = url + 'set_age/' + age
if(redirect_url != undefined){
	r = r + '/' + redirect_url;
}
window.location.href = r  ;
} 