



function getElementsByName_iefix(tag, name) {
     
     var elem = document.getElementsByTagName(tag);
     var arr = new Array();
     for(i = 0,iarr = 0; i < elem.length; i++) {
          att = elem[i].getAttribute("name");
          if(att == name) {
               arr[iarr] = elem[i];
               iarr++;
          }
     }
     return arr;
}


function popfloatingimage(imageurl) {
	s = "<img src='"+imageurl+"'>";
	loadHTML(s, "floatingimage");
	var o = new getObj("floatingimage");
	o.style.display = "block";
	o.style.top = "32px";
	o.style.left = "156px";	
};

function unpopfloatingimage() {
	var o = new getObj("floatingimage");
	o.style.display = "none";

};


function loadXMLDoc(url) {

    // branch for native XMLHttpRequest object
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = processReqChange;
        req.open("GET", url, true);
        req.send(null);
    // branch for IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = processReqChange;
            req.open("GET", url, true);
            req.send();
        }
    }
};

function processReqChange() 
{
    // only if req shows "complete"
    if (req.readyState == 4) {
        // only if "OK"
        if (req.status == 200) {
            // ...processing statements go here...
			response  = req.responseText;			
			loadHTML(response, ajaxReturnDivID);
			
        } else {
            alert("There was a problem retrieving the XML data:\n" + req.statusText);
        }
    }
};



function loadHTML(text,id)
{
//alert(id);
	if (document.getElementById)
	{
		x = document.getElementById(id);
		x.innerHTML = '';
		x.innerHTML = text;
	}
	else if (document.all)
	{
		x = document.all[id];
		x.innerHTML = text;
	}
	else if (document.layers)
	{
		x = document.layers[id];
		text2 = '<P CLASS="testclass">' + text + '</P>';
		x.document.open();
		x.document.write(text2);
		x.document.close();
	}
}


function getObj(name) {
  if (document.getElementById) {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  } else if (document.all)  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  } else if (document.layers)  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

