looking for some javascript that will grab the contens of a txt file and save them to a variable.

this is for a website i want to create which loads html code into a layer to reduce overall loading times of my pages.

so far using dreamweaver i have this code...

----The button---
<b onClick="MM_setTextOfLayer('main','','this is the contact page')">Contact[/b]
---

---The Java produced by dw of which i understand 3/4---

<script language="JavaScript">
<!--
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_setTextOfLayer(objName,x,newText) { //v3.0
if ((obj=MM_findObj(objName))!=null) with (obj)
if (navigator.appName=='Netscape') {document.write(unescape(newText)); document.close();}
else innerHTML = unescape(newText);
}
//-->
</script>

---

basically instead of "this is the contact page" i want to load html code from "contact.txt"

now all i need is a pointer on how to do this...
the only thing i don't know how to do is to get the contents of the txt file. i can define variables etc myself.

any help is welcomed. if you need me to clarify or rephrase my question please let me know.
thanx.