function move_box(an, box) {
  var cleft = 0;
  var ctop = 0;
  var obj = an;
  while (obj.offsetParent) {
    cleft += obj.offsetLeft;
    ctop += obj.offsetTop;
    obj = obj.offsetParent;
  }
  box.style.left = cleft + 'px';
  ctop += an.offsetHeight + 8;
  if (document.body.currentStyle &&
    document.body.currentStyle['marginTop']) {
    ctop += parseInt(
      document.body.currentStyle['marginTop']);
  }
  box.style.top = ctop + 'px';
}

function show_hide_box(an, width, height, borderStyle) {
  var href = an.href;
  var boxdiv = document.getElementById(href);

  if (boxdiv != null) {
    if (boxdiv.style.display=='none') {
    //  move_box(an, boxdiv);
      boxdiv.style.display='block';
    } else
      boxdiv.style.display='none';
    return false;
  }

  boxdiv = document.getElementById("maindiv");;
  //boxdiv.setAttribute('id1', href);
  while (boxdiv.firstChild) {
  boxdiv.removeChild(boxdiv.firstChild);
}
boxdiv.align='center';
  var contents = document.createElement('iframe');
  contents.scrolling = 'yes';
  contents.frameBorder = '0';
  contents.style.width = width + 'px';
  contents.style.height = height + 'px';
  contents.src = href;
contents.align='left';
  boxdiv.appendChild(contents);
  //document.body.appendChild(boxdiv);
  //move_box(an, boxdiv);

  return false;
}


function dis(year)
{
	
	boxdiv = document.getElementById("maindiv");;
  //boxdiv.setAttribute('id1', href);
  while (boxdiv.firstChild) {
  boxdiv.removeChild(boxdiv.firstChild);
}
boxdiv.align='center';
  var contents = document.createElement('iframe');
  contents.scrolling = 'yes';
  contents.frameBorder = '0';
  contents.style.width = 450 + 'px';
  contents.style.height = 500 + 'px';
  contents.src = "readnews.php?year="+year;
contents.align='left';
  boxdiv.appendChild(contents);
  //document.body.appendChild(boxdiv);
  //move_box(an, boxdiv);

  return false;
}


function fill(id)
{
	
	boxdiv = document.getElementById("maindiv");;
  //boxdiv.setAttribute('id1', href);
  while (boxdiv.firstChild) {
  boxdiv.removeChild(boxdiv.firstChild);
}
boxdiv.align='center';
  var contents = document.createElement('iframe');
  contents.scrolling = 'yes';
  contents.frameBorder = '0';
  contents.style.width = 450 + 'px';
  contents.style.height = 500 + 'px';
  contents.src = "readpictures.php?id="+id+"&start=1&x=1";
contents.align='left';
  boxdiv.appendChild(contents);
  //document.body.appendChild(boxdiv);
  //move_box(an, boxdiv);

  return false;
}



function media()
{
	
	boxdiv = document.getElementById("maindiv");;
  //boxdiv.setAttribute('id1', href);
  while (boxdiv.firstChild) {
  boxdiv.removeChild(boxdiv.firstChild);
}
boxdiv.align='center';
  var contents = document.createElement('iframe');
  contents.scrolling = 'yes';
  contents.frameBorder = '0';
  contents.style.width = 650 + 'px';
  contents.style.height = 500 + 'px';
  contents.src = "http://www.airlinemeals.net/forum3/viewforum.php?id=33";
contents.align='left';
  boxdiv.appendChild(contents);
  //document.body.appendChild(boxdiv);
  //move_box(an, boxdiv);

  return false;
}

// --------------------------------------------------------------------- [ HQ Sorin | Show Museum ]

function show_museum()
{
	boxdiv = document.getElementById("maindiv");
	
	while (boxdiv.firstChild) {
		boxdiv.removeChild(boxdiv.firstChild);
	}
	
	boxdiv.align = 'center';
	
	var contents = document.createElement('iframe');
	
	contents.scrolling = 'yes';
	contents.frameBorder = '0';
	contents.style.width = 650 + 'px';
	contents.style.height = 500 + 'px';
	contents.src = "http://www.airlinemeals.net/museum/index.html";
	contents.align = 'left';
	boxdiv.appendChild(contents);
	
	return false;
}

// --------------------------------------------------------------------- [ HQ Sorin | Show Museum ]

// --------------------------------------------------------------------- [ HQ Sorin | Show Join ]

function show_join(url)
{
	var screenW = screen.width;
	var screenH = screen.height;
	
	var windowL = parseInt((screenW - 800) / 2);
	var windowT = parseInt((screenH - 600) / 2);
	
	newwindow = window.open(url, 'name', 'height=600, width=800, left=' + windowL + ', top=' + windowT + ', resizable=yes, scrollbars=yes, toolbar=no, status=yes');
	
	if (window.focus) { newwindow.focus(); }
}

// --------------------------------------------------------------------- [ HQ Sorin | Show Join ]
