function GalleryShowWin(myID, myCLASS, myImg, myImgW, myImgH, myTitleTxt) {
    //Displey Ellement
        document.getElementById(myID).style.display = "";
    //set opacity to 0
        document.getElementById(myID).style['opacity'] = 0.0;
        document.getElementById(myID).style['-moz-opacity'] = 0.0;
        if(document.getElementById(myID).filters) document.getElementById(myID).style.filter = "alpha(opacity=" + 0 + ")";
    //defind Image
    document.images['GalleryImg'].src= myImg;
    //Call Image
        var ClientWth = ((document.body.clientWidth - myImgW) / 2);
        var ClientHht = ((document.body.clientHeight - myImgH) / 2);
    //Get Scroll position
    //defind X Y
    var ClientxPos = 0;
    var ClientYPos = 0;
    var ClientWth = 0;
    var ClientHht = 0;
    var ClientAltWth = 0;
    var ClientAltHht = 0;
    if(window.pageXOffset && window.pageYOffset && window.innerWidth && window.innerHeight){
        ClientxPos = window.pageXOffset;
        ClientYPos = window.pageYOffset;
        ClientWth = ((window.innerWidth - myImgW) / 2);
        ClientHht = ((window.innerHeight - myImgH) / 2);
    }
    if(document.documentElement){
        ClientxPos = document.documentElement.scrollLeft;
        ClientYPos = document.documentElement.scrollTop;
        ClientWth = ((document.documentElement.clientWidth - myImgW) / 2);
        ClientHht = ((document.documentElement.clientHeight - myImgH) / 2);
    }
    if(document.body && !document.getElementById(myID).filters){
        ClientxPos = document.body.scrollLeft;
        ClientYPos = document.body.scrollTop;
        ClientWth = ((document.body.clientWidth - myImgW) / 2);
        ClientHht = ((document.body.clientHeight - myImgH) / 2);
    }
    //set Div position
        document.getElementById(myID).style['left'] = ClientWth + ClientxPos;
        document.getElementById(myID).style['top'] = ClientHht + ClientYPos;
    //set Table Width
        document.getElementById(myID).style['width'] = (myImgW + 36);
    //Set Title Text
        var InputLngth = (myTitleTxt.length * 8)
        document.getElementById('ImageWindowTitleID').value = "" + myTitleTxt;
        document.getElementById('ImageWindowTitleID').style['width'] = InputLngth;
    //start Opacity Effect
    for(i=0; i<10; ++i) {
        setTimeout(function(){fadeCallback(myID);}, (70*i));
    }
}
function fadeCallback(myID){
    myOpacity = getOpacity(myID);
    setOpacity(myID, myOpacity + 1);
}
function getOpacity(myID){
    myOpacity = 0;
    //IE
    if(document.getElementById(myID).filters) {
        filter = document.getElementById(myID).style.filter;
        if(document.getElementById(myID).filters) {
                if (value = (filter || '').match(/alpha\(opacity=(.*)\)/)) {
                  if (value[1]) myOpacity = parseFloat(value[1]) / 10;
                }
        }
    } else {
        //Mozzila
        myOpacity = document.getElementById(myID).style['opacity'] * 10;
    }
    return myOpacity;
}
//Sets an element's opacity
function setOpacity(myID, myOpacity){
    //IE
    if(document.getElementById(myID).filters) {
        document.getElementById(myID).style.filter = "alpha(opacity=" + (myOpacity * 10) + ")";
    } else {
        //Mozzila
        document.getElementById(myID).style['opacity'] = myOpacity / 10;
        document.getElementById(myID).style['-moz-opacity'] =  myOpacity / 10;
    }
}
function GalleryCloseWin(myID) {
    document.getElementById(myID).style.display = "none";
}
