Alright I have it working now, here's the resulting code if anyone would like to see it. Just so everyone knows, most of this code has been borrowed from various other forums and is only partially my own.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
<html xmlns="
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<SCRIPT LANGUAGE='JavaScript'>
<!--
// ***********************************************
// AUTHOR:
LLC
// URL:
// Use the script, just leave this message intact.
// Download your FREE CGI/Perl Scripts today!
// (
)
// ***********************************************
var changeRate = 2000; // 1000 = 1 second
var linkNumber = 0;
var bustcachevar=0 //bust potential caching of external pages after initial request? (1=yes, 0=no)
var loadedobjects=""
var rootdomain="
var bustcacheparameter=""
var extern_links = new Array(3)
extern_links[0] = "external.htm";
extern_links[1] = "external2.htm";
extern_links[2] = "external3.htm";
function changeStatus() {
if (linkNumber == extern_links.length) {
linkNumber = 0;
}
linkNumber++;
insert(linkNumber, 'top')
setTimeout("changeStatus();",changeRate);
}
function insert(link_num, containerid){
var url = extern_links[link_num-1];
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
if (bustcachevar) //if bust caching of external page
bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
page_request.open('GET', url+bustcacheparameter, true)
page_request.send(null)
}
function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML=page_request.responseText
}
function loadobjs(){
if (!document.getElementById)
return
for (i=0; i<arguments.length; i++){
var file=arguments
var fileref=""
if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
if (file.indexOf(".js")!=-1){ //If object is a js file
fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", file);
}
else if (file.indexOf(".css")!=-1){ //If object is a css file
fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", file);
}
}
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(fileref)
loadedobjects+=file+" " //Remember this object as being already added to page
}
}
}
changeStatus(); // leave here to run right away
// -->
</SCRIPT>
<style type="text/css">
body {
margin:0px;
}
#top {
position:relative;
height:80%;
width:100%;
background-color: #ffffff;
}
#bottom {
position:relative;
height:20%;
width:100%;
padding-top:5px;
background-color: #ffffff;
}
</style>
</head>
<body>
<div id="top">
</div>
<div id="bottom">
<a href="javascript:insert(1, 'top');">external</a>
<a href="javascript:insert(2, 'top');">external1</a>
<a href="javascript:insert(3, 'top');">external2</a>
</div>
</body>
</html>