function ShowWindow(height, width, html){
	var div1 = document.createElement("div");
	div1.id = "Show1";
	document.body.appendChild(div1);
	document.getElementById('Show1').style.background = "#095da4";
	document.getElementById('Show1').style.width = "100%";
	document.getElementById("show1").style.position = "absolute";
	document.getElementById('Show1').style.height = document.body.offsetHeight;
	document.getElementById('Show1').style.top='0px';
	document.getElementById('Show1').style.left='0px';
	document.getElementById('Show1').style.filter="Alpha(Opacity=10)";
	
    var div = document.createElement("div");
    div.id = "Show";
    document.body.appendChild(div);
    document.getElementById("Show").style.height = height
    document.getElementById("Show").style.width = width;
	document.getElementById("Show").style.zIndex = "1000";
    document.getElementById("show").style.position = "absolute";
    post = Getpost(document.getElementById("Show"));
    document.getElementById("Show").style.top = post.Y;
    document.getElementById("Show").style.left = post.X;
    document.getElementById("Show").innerHTML = html;
	try{
		window.clearInterval(Timer);
	}
	catch(e)
	{
		
	}
    var Timer = window.onscroll = function(){
        setTimeout(function(){
            post = Getpost(document.getElementById("Show"));
            document.getElementById("Show").style.top = post.Y;
            document.getElementById("Show").style.left = post.X;
        }, 250)
    }
   $('select').hide();
}

function CloseWindows(){
    try {
        document.body.removeChild(document.getElementById('Show'));
		document.body.removeChild(document.getElementById('Show1'));
        $('select').show();
    } 
    catch (e) {
        return;
    }
}

function Getpost(obj){
    var width = document.body.clientWidth;
    var height = window.screen.availHeight;
    x = parseInt((width - obj.offsetWidth) / 2);
    y = parseInt((height / 2 - obj.offsetHeight) / 2) + getScroll().t + 100;
    return {
        X: parseInt(x),
        Y: parseInt(y)
    };
}

function getScroll(){
    var t, l, w, h;
    if (document.documentElement && document.documentElement.scrollTop) {
        t = document.documentElement.scrollTop;
        l = document.documentElement.scrollLeft;
        w = document.documentElement.scrollWidth;
        h = document.documentElement.scrollHeight;
    }
    else 
        if (document.body) {
            t = document.body.scrollTop;
            l = document.body.scrollLeft;
            w = document.body.scrollWidth;
            h = document.body.scrollHeight;
        }
    return {
        t: t,
        l: l,
        w: w,
        h: h
    };
}
