﻿// JScript File

function showpopup(html, pop_width, pop_height)
{  
    div = document.getElementById("fp_div");
    if(html != null)
        div.innerHTML = html;
    else
        return;
		var centerWidth = ((getWindowWidth()) - pop_width) / 2;
    var centerHeight = ((getWindowHeight()) - pop_height) / 2; 
     if (centerHeight < 0)
		centerHeight = 25;
				
    div.style.position = "absolute";
    div.style.left = centerWidth + "px";
    div.style.top = centerHeight + "px";
    div.style.visibility = "visible";
    div.style.zIndex = "500";
    scroll(0,0);
    if (isIE6()) hideselects("fp_div");
}

function getWindowWidth() {
    var ww = 0;
    if (self.innerWidth)
	    ww = self.innerWidth;
    else if (document.documentElement && document.documentElement.clientWidth)
	    ww = document.documentElement.clientWidth;
    else if (document.body)
	    ww = document.body.clientWidth;
    return ww;
}

function getWindowHeight() {
    var wh = 0;
    if (self.innerHeight)
	    wh = self.innerHeight;
    else if (document.documentElement && document.documentElement.clientHeight)
	    wh = document.documentElement.clientHeight;
    else if (document.body)
	    wh = document.body.clientHeight;
    return wh;
}

function hidepopup()
{
    dohide = true;
    if (isIE6) showselects;
    div = document.getElementById("fp_div");
    div.style.visibility = "hidden";
    div.style.zIndex = "-1";
    div.innerHTML = "";
}