// two stage iframe writer and sizer, copyright  2002 africaguide.com, code by Phil J

// this re-writes the Iframe on second pass, triggered by the Iframe src files onLoad, if your interested that is..

function adjustFrame (frame) {
  if (document.all) {
    var h = frame.document.body.scrollHeight;
    document.all[frame.name].height = h;
  }
  else if (document.getElementById) {
    var h = frame.document.height;
    document.getElementById(frame.name).height = h;
  }
}

// this writes the Iframe on first pass if IE 5.01+ with pixel height of 1 for the iframe + calculated pixel width, no nasty navigater here..

function bName() {
  if (navigator.appName == "Microsoft Internet Explorer")
    return 1;
}
version=0
if (navigator.appVersion.indexOf("MSIE")!=-1){
	temp=navigator.appVersion.split("MSIE")
	version=parseFloat(temp[1])
}
var nameCode = bName();

var thisType
var thisCountryCode

if ((nameCode == 1) && (document.getElementById) && (version>=5.01)){

	document.write('<IFRAME ID="anIframe" NAME="anIframe" ');
	document.write('SRC="http://www.africaguide.com/travel/index.php?frame=1');

	if (thisType != null) {
		document.write('&cmd=1');
		document.write('&type=' + thisType);
	}
	else if (thisCountryCode != null) {
		document.write('&cmd=2');
		document.write('&country_id=' + thisCountryCode);
	}

	document.write('" height=' + ht);
	document.write(' width=' + pixelwidth + ' marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=1 scrolling=no>');
	document.write('</IFRAME>');
}