var myWidth = myHeight = 0;

window.onload = function (){
	setpos2();
}

function findPos2(x,y) {
	var gw = document.getElementById('main_2').offsetWidth;
	var gh = document.getElementById('main_2').offsetHeight;
	var leftpos1= (x/2)-(gw/2)+280;
	//var toppos1= (y/2)-(mmH/2)+40;
	var obj1 = new getObj2('main_2');
	if(obj1.style){
		//obj1.style.top=toppos1+"px";
		obj1.style.left=leftpos1+"px";
	}else{
		main_2.style.top=y1+"px";
		main_2.style.left=x1+"px";
	}
}
function getObj2(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

function setpos2() {
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  } 
  findPos2(myWidth,myHeight);
}

function hideFlash(){
	var obj3 = new getObj2('main_2');
	obj3.style.visibility="hidden";
}