/* global parameters */
var winRef;
/*var vPopWin_width = 600;
var vPopWin_height = 650;*/
var vPopWin_width = screen.width - 80;
var vPopWin_height = screen.height - 160;
var screenSizeHeight = 768;
var screenSizeWidth = 1024;

// open popup window
function popupWindow(winurl, winwidth, winheight, resizable, scrollbars, winpopname){
	if (winRef != null && !winRef.closed) {
		temp = winRef;
		temp.name = "temp";
		temp.close();
	}
	if (!winwidth) winwidth = vPopWin_width;
	if (!winheight) winheight = vPopWin_height;
	if (!resizable) resizable = "no";
	if (!scrollbars) scrollbars = "no";
	  
	wintop = (screen.height - winheight - 50) / 2;
	winleft = (screen.width - winwidth) / 2;
	if (winpopname == null){
	     winpopname = "popWin";
	     winRef = window.open(winurl, winpopname, "width="+winwidth+"px, height="+winheight+"px, top="+wintop+"px, left="+winleft+"px, location=no, status=no, menubar=no, resizable="+resizable+", scrollbars="+scrollbars);
	     winRef.focus();
	}
}

function popupFocus(){
     if (winRef != null && !winRef.closed)
          winRef.focus();
}


function window_onscroll()
{
    if(document.all && document.getElementById) //added for IE4
    {
        if(window.document.getElementById("scrollPict"))
		{
            window.document.getElementById("scrollPict").style.top = document.body.scrollTop + pictTop;
		}
    }
    else if(document.all && !document.getElementById) //added for IE4
    {
        if(document.all['scrollPict'])
		{
            document.all['scrollPict'].style.top = document.body.scrollTop + pictTop;
		}
    }
}

function openTC()
{
	popupWindow("tc_popup.asp", 610, 560, 1, 1);
}
