var ie=document.all
var ns6=document.getElementById&&!document.all
var yposition= 0;

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat" && !window.opera)? document.documentElement : document.body
}

function enlarger(which, e, position, imgwidth, imgheight){
		crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage;

		document.onmousemove = alertCoord;

		loadDivData(which, 'showimage', 'GET', yposition);
		crossobj.style.visibility="visible";
		return false;

}

///////////////////

function alertCoord(e) {
  if( !e ) {
    if( window.event ) {
      //Internet Explorer
      e = window.event;
    } else {
      //total failure, we have no way of referencing the event
      return;
    }
  }
  if( typeof( e.pageX ) == 'number' ) {
    //most browsers
    var xcoord = e.pageX;
    var ycoord = e.pageY;
  } else if( typeof( e.clientX ) == 'number' ) {
    //Internet Explorer and older browsers
    //other browsers provide this, but follow the pageX/Y branch
    var xcoord = e.clientX;
    var ycoord = e.clientY;
    var badOldBrowser = ( window.navigator.userAgent.indexOf( 'Opera' ) + 1 ) ||
     ( window.ScriptEngine && ScriptEngine().indexOf( 'InScript' ) + 1 ) ||
     ( navigator.vendor == 'KDE' )
    if( !badOldBrowser ) {
      if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
        //IE 4, 5 & 6 (in non-standards compliant mode)
        xcoord += document.body.scrollLeft;
        ycoord += document.body.scrollTop;
      } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
        //IE 6 (in standards compliant mode)
        xcoord += document.documentElement.scrollLeft;
        ycoord += document.documentElement.scrollTop;
      }
    }
  } else {
    //total failure, we have no way of obtaining the mouse coordinates
    return;
  }

  yposition = ycoord;
}

//////////////

	




function closepreview(){
	crossobj.style.visibility="hidden"
}

function loadDivData(url, div_id, send_type, left) {

	left = parseFloat(left);

	document.getElementById(div_id).style.position='absolute';
	document.getElementById(div_id).style.left=50;
	document.getElementById(div_id).style.top=50;

	var xmlhttp = false;

                              if (window.XMLHttpRequest) {

                       xmlhttp = new XMLHttpRequest();

               } 

               else if (window.ActiveXObject) {

                       xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

               }


               if (url != "" && div_id != "") {


						if (send_type == 'GET') {

                               xmlhttp.open('GET', url, true);

                               xmlhttp.onreadystatechange = function() {

                                      if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
											document.getElementById(div_id).innerHTML = '<div align="right" id="dragbar"><span id="closetext" onClick="closepreview()">Close Window [x] &nbsp;</span> </div>' + xmlhttp.responseText;
                                      }

                               }

                       xmlhttp.send(null);

                       }

               }

        }