function getElement(elementName) {
// thanks to http://www.netlobo.com/div_hiding.html
if (window.document.getElementById) {
	// this is the way the standards work
	thiselement = window.document.getElementById(elementName);
	return true;
	} else if (window.document.all) {
	// this is the way old msie versions work
	thiselement = window.document.all[elementName];
	return true;
	} else if (window.document.layers) {
	// this is the way nn4 works
	thiselement = window.document.layers[elementName];
	return true;
	}
	return false;
}

function fixLayout() {
  // get height of wrapper and increase to allow footer edging to line up:
  thisFooterNudge = 0;
  if (getElement('lionCharacter')) {
    if (thiselement) {
      thisDocHeight = thiselement.offsetHeight;
      // pattern repeats every 5
      thisPatternOffset = thisDocHeight % 5;
      // 2 is on the pattern repeat
      thisFooterNudge = -2+thisPatternOffset;
    }
  }
  if (getElement('footer')) {
    if (thiselement) {
      thiselement.style.marginTop = thisFooterNudge+'px';
    }
  }
}

function showGiraffe() {
  // show giraffe if client window > 1024
	var iebody = document.body;
	if (document.documentElement) {
		if (document.documentElement.clientWidth) {
			iebody = document.documentElement;
		}
	}
	thisPageWidth = iebody.clientWidth;
	if (thisPageWidth>1024) {
    // show giraffe
    if (getElement('giraffeCharacter')) {
      if (thiselement) {
        thiselement.style.display = 'block';
      }
    }
	}
}

function newPage() {
  showGiraffe();
  fixLayout();
  getNewWindowLinks();
}

function writeMainFlash() {
document.write('<object type="application/x-shockwave-flash" data="images/worldwide.swf" width="786" height="448" id="intromovie" name="intromovie">');
document.write('<param name="movie" value="images/worldwide.swf" />');
document.write('<param name="wmode" value="transparent" />');
document.write('<div class="contentBlock">');
document.write('<div class="contentBlockTop">');
document.write('<div class="contentBlockBottom">');
document.write('<p>Please use the dropdown box below to select your country.</p>');
document.write('</div>');
document.write('</div>');
document.write('</div>');
document.write('</object>');
}
