function setOpacity( value ) {	document.getElementById("mypopup").style.opacity = value / 10;	document.getElementById("mypopup").style.filter = 'alpha(opacity=' + value * 10 + ')';}function fadeInMyPopup() {	for( var i = 0 ; i <= 100 ; i++ ) {		setTimeout( 'setOpacity(' + (i / 10) + ')' , 8 * i );	}		myPopupRelocate()}function fadeOutMyPopup() {	for( var i = 0 ; i <= 100 ; i++ ) {		setTimeout( 'setOpacity(' + (10 - i / 10) + ')' , 8 * i );	}	setTimeout('closeMyPopup()', 800 );}function closeMyPopup() {  document.getElementById("mypopup").style.display = "none";}function myPopupRelocate() {  var scrolledX, scrolledY;  if( self.pageYOffset ) {    scrolledX = self.pageXOffset;    scrolledY = self.pageYOffset;  } else if( document.documentElement && document.documentElement.scrollTop ) {    scrolledX = document.documentElement.scrollLeft;    scrolledY = document.documentElement.scrollTop;  } else if( document.body ) {    scrolledX = document.body.scrollLeft;    scrolledY = document.body.scrollTop;  }  var centerX, centerY;  if( self.innerHeight ) {    centerX = self.innerWidth;    centerY = self.innerHeight;  } else if( document.documentElement && document.documentElement.clientHeight ) {    centerX = document.documentElement.clientWidth;    centerY = document.documentElement.clientHeight;  } else if( document.body ) {    centerX = document.body.clientWidth;    centerY = document.body.clientHeight;  }  var leftOffset = scrolledX + (centerX - 200) / 2;  var topOffset = 0;  //var topOffset = scrolledY + (centerY - 200) / 2;  document.getElementById("mypopup").style.top = topOffset + "px";  document.getElementById("mypopup").style.left = leftOffset + "px";  }function fireMyPopup() {  fadeInMyPopup();  //myPopupRelocate();  document.getElementById("mypopup").style.display = "block";  document.body.onscroll = myPopupRelocate;  window.onscroll = myPopupRelocate;  window.setTimeout("fadeOutMyPopup()", 40000);}function vidpopup(sURL) {   vidwindow = window.open (sURL,"vidwindow","status=0,scrollbars=0,width=372,height=250,left=50,top=50");   fadeOutMyPopup(); } //document.body.onload = window.setTimeout("fireMyPopup()", 3000);