posX=100 
posY=100
function getHtmlPage(location,title,removehref,w,l,t,h,divtag) {  // used to get html page from server
    posX=t
    posY=l
    var strURL = location
    var xmlHttpReq = false; 
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest(); 
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
             updateHtmlPage(title,removehref,w,l,t,h,self.xmlHttpReq.responseText,divtag)
        }
    }
    self.xmlHttpReq.send(getquerystring());
}
function getquerystring() {
    qstr = 'programs='+ escape(location)  
    return qstr;
}
function updateHtmlPage(title,removehref,w,l,t,h,data,divtag){ 
var st = data.indexOf('<!-- bodystart -->')
var en = data.indexOf('<!-- bodyend -->')
if ((st  > '0') && (en > '0') ){
   data = data.substring(0,en) 
   data = data.substring(st)
}
if (!removehref) {   // this fouls up if i use a href="#"
  // remove a href
  while ( data.indexOf('href') != -1){
    var st = data.indexOf('href')
    if (st) {
    data = data.substr(0,st-1)+"nothing"+data.substr(st+4)
   }
 }
}
//data.replace("href", "nothing")
//data.replace( new RegExp( "href", "gi" ), "[X]" );  //neither of these worked!
//  <!-- bodystart -->
//  <!-- bodyend -->
//alert (document.getElementById('mypopup').style.z-index)
if (divtag) {
   document.getElementById(divtag).innerHTML=data; // these are the titles
   }else{
if (winList['mypopup']) {
    document.getElementById('mypopuptitle').innerHTML = title;
    if (w){ document.getElementById('mypopup').style.width = w;} 
    if (w){document.getElementById('mypopupclientarea').style.width = w;} 
    var neww=document.getElementById('mypopupclientarea').style.width
    var neww = w.replace("px","");
    neww = neww - 15
    neww = neww+"px"
    document.getElementById('mypopupclientarea').style.width =neww;
    if (l){ document.getElementById('mypopup').style.left= l;}
    if (t){ document.getElementById('mypopup').style.top = posY;}
    if (h){document.getElementById('mypopupclientarea').style.height = h;}
    if (data){document.getElementById('mypopupclientarea').innerHTML = data;}
    document.getElementById('mypopupclientarea').scrollTop=0; 
    winList['mypopup'].open()
 } else{
    alert ("Error getting the data!  Sorry!")
  }
}
} //if divtag
// this function requires
//<link href="/wwizfiles/files/popup.css" rel="stylesheet" type="text/css" />
//<script type="text/javascript" src = "/wwizfiles/files/popupwin.js"></scrip
