// JavaScript Document

function LoadPage(page,usediv) {
	    
		// Set up request varible
         try {xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");}  catch (e) { alert("Error: Could not load page.");}
         //Show page is loading
         document.getElementById(usediv).innerHTML = '<center><img src="http://www.caribbeanredcross.org/images/bar-circle.gif" style="margin-top:200px;"></center>';
         //scroll to top
         scroll(0,0);
         //send data
         xmlhttp.onreadystatechange = function(){
                 //Check page is completed and there were no problems.
                 if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
                        //Write data returned to page
                        document.getElementById(usediv).innerHTML = xmlhttp.responseText;
                 }
         }
         xmlhttp.open("GET", page);
         xmlhttp.send(null);
         //Stop any link loading normaly
		 LoadPage2('http://www.caribbeanredcross.org/flags.html','flag');
         return false;

}

function LoadPage2(page2,usediv2) {
	    
		// Set up request varible
         try {xmlhttp2 = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");}  catch (e) { alert("Error: Could not load page.");}
         //Show page is loading
         document.getElementById(usediv2).innerHTML = '<center><img src="http://www.caribbeanredcross.org/images/bar-circle.gif" style="margin-top:10px;"></center>';
         //scroll to top
         scroll(0,0);
         //send data
         xmlhttp2.onreadystatechange = function(){
                 //Check page is completed and there were no problems.
                 if ((xmlhttp2.readyState == 4) && (xmlhttp2.status == 200)) {
                        //Write data returned to page
                        document.getElementById(usediv2).innerHTML = xmlhttp2.responseText;
                 }
         }
         xmlhttp2.open("GET", page2);
         xmlhttp2.send(null);
         //Stop any link loading normaly
         return false;

}