Figured out the problem was that I was not getting the zIndex correctly in IE on line 48. Everything is working great now. 
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>DHTML</title>
<script type="text/javascript">
//<![CDATA[
var drag = new function() {this.drag = 0;}
document.onmousedown=function(e) {drag.drag = 1; move(e,1);};
document.onmousemove=function(e) {if (drag.drag==1) {move(e,0);}};
document.onmouseup = function(e) {drag.drag=0;move(e,2);};
var cur_x_init = 0;
var cur_y_init = 0;
var cur_x_dif = 0;
var cur_y_dif = 0;
var dragged_x_init = 0;
var dragged_y_init = 0;
var dragged_z = 0;
function move(e,init)
{
var dragged,dragged_x_half,dragged_x_new,dragged_y_half,dragged_y_new,ie,re=true,t,z;
if (!e) {e = window.event;}//IE6 OR: if (document.all) {e = window.event;}//IE6
if (e.target) {var t = e.target; var ie = false;}
else if (e.srcElement) {var t = e.srcElement; var ie = true;}
if (t.className.substr(0,5)=='drag ')
{
dragged = document.getElementById(t.className.substr(5));
if (init!=2)
{
if (init==1)
{
cur_x_init=e.clientX;
cur_y_init=e.clientY;
dragged_x_init=dragged.offsetLeft;
dragged_y_init=dragged.offsetTop;
dragged_x_new=0;
dragged_y_new=0;
if (dragged_z!=9001)
{
if (window.getComputedStyle) {z = document.defaultView.getComputedStyle(dragged,null).getPropertyValue('z-index');}
else if (dragged.currentStyle) {z = dragged.currentStyle.zIndex;}
if (z!=9001) {dragged_z=z;}
dragged = dragged.style.zIndex=9001;
}
}
else
{
cur_x_dif=e.clientX-cur_x_init;
cur_y_dif=e.clientY-cur_y_init;
dragged_x_half=dragged.clientWidth/2;
dragged_y_half=dragged.clientHeight/2;
dragged_x_new=dragged_x_init+cur_x_dif+dragged_x_half;
dragged_y_new=dragged_y_init+cur_y_dif+dragged_y_half;
dragged.style.left=dragged_x_new+'px';
dragged.style.top=dragged_y_new+'px';
}
document.getElementById('status').value = 'ID = '+t.className.substr(5)+'\ncur_x_init = '+cur_x_init+'\ncur_x = '+e.clientX+'\ncur_x_dif = '+cur_x_dif+'\ndragged_x_init = '+dragged_x_init+'\ndragged_x_new = '+dragged_x_new+'\ndragged_z = '+dragged_z;
re = false;
}
else {document.getElementById(t.className.substr(5)).style.zIndex=dragged_z;}
}
else {re = true;}
return re;
}
//]]>
</script>
<style type="text/css">
body {overflow: hidden;}
.drag {cursor: move;}
div.prompts {background: #ccc; border: solid 1px; border-color: #ccc #aaa #aaa #ccc; height: 398px; margin-top: -198px; margin-left: -369px; position: absolute; width: 738px;}
div.prompts h2 {background-color: #ddd; height: 20px; line-height: 20px; margin: 0px; text-align: center;}
div.prompts h2:hover {background-color: #fc6;}
div.prompts h2 span {display: block; text-align: center; width: 738px;}
div.prompts textarea {height: 373px; width: 732px;}
#prompt1 {left: 50%; top: 50%; z-index: 3;}
#prompt2 {background-color: #fdd; left: 55%; top: 55%; z-index: 2;}
#prompt3 {background-color: #dfd; left: 60%; top: 60%; z-index: 1;}
#prompt4 {background-color: #ddf; left: 65%; top: 65%; z-index: 0;}
</style>
<!--[if lte IE 7]><style type="text/css">div.prompts textarea {float: right;}</style><![endif]-->
</head>
<body>
<div class="prompts" id="prompt1"><h2><span class="drag prompt1">Prompt 1 - This is the Drag Handle</span></h2><textarea id="status"></textarea></div>
<div class="prompts" id="prompt2"><h2><span class="drag prompt2">Prompt 2 - This is the Drag Handle</span></h2></div>
<div class="prompts" id="prompt3"><h2><span class="drag prompt3">Prompt 3 - This is the Drag Handle</span></h2></div>
<div class="prompts" id="prompt4"><h2><span class="drag prompt4">Prompt 4 - This is the Drag Handle</span></h2></div>
</body>
</html>
Bookmarks