﻿
//var w = 820;
//var h = 600;
//var xm = 1024;//screen.width;
//var ym = 768;//screen.height;
//var left = (xm / 2) - (w / 2);
//var top = (ym / 2) - (h / 2);

//left = left + 30;
//top = top + 16;

//function getPosition(e) {
//    e = e || window.event;
//    var cursor = {x:0, y:0};
//    if (e.pageX || e.pageY) {
//        cursor.x = e.pageX;
//        cursor.y = e.pageY;
//    } 
//    else {
//        var de = document.documentElement;
//        var b = document.body;
//        cursor.x = e.clientX + 
//            (de.scrollLeft || b.scrollLeft) - (de.clientLeft || 0);
//        cursor.y = e.clientY + 
//            (de.scrollTop || b.scrollTop) - (de.clientTop || 0);
//    }
//    return cursor;
//}


//function ImagePopUp(divname)
// {
//     var cursor =    getPosition(divname);
//     if(cursor != null)
//     {
//      left = cursor.x;
//      top = cursor.y;
//     }
//    
//    if (document.getElementById(divname).style.display = 'none')
//    {
//        document.getElementById(divname).style.position = 'absolute';
//        document.getElementById(divname).style.top = top + 'px';
//        document.getElementById(divname).style.left = left + 'px';
//        document.getElementById(divname).style.display = 'block';
//        
//        //document.getElementById(divname).style.marginLeft = left/4 + 'px';
//        //document.getElementById(divname).style.marginTop = (left * .1)  + 'px';
//        //alert("Left" + left + "Top" + top + "x" + x + "y " + y);
//        //window.status = getdivsize(divname);
//    }
//}

//function ImagePopDown(divname)
//{
//    if (document.getElementById(divname).style.display = 'block')
//     {
//        document.getElementById(divname).style.display = 'none';
//     }
//}

//  //document.getElementById(divname).style.top = top;   //(window.event.clientY - (y)) + 'px';
//  //document.getElementById(divname).style.left = left; //(window.event.clientX - document.getElementById(divname).offsetWidth) + 'px';