





        function popUp(URL,X,Y) {
                        id = "Viewer";
                        eval( id + " = window.open('" + URL + "','" + id + "','toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=" + (X+0) + ",height=" + Y + ",left=100,top=" + (screen.height-(Y+120))/2 + "');");
                        Viewer.moveTo((screen.width-(X))/2,(screen.height-(Y+120))/2);
                        if ((X-100)>=screen.width) {
                                Viewer.moveTo(0,0);
                        }
                        if ((Y-100)>=screen.height) {
                                Viewer.moveTo(0,0);
                        }
                        Viewer.focus();
                }


        function popUpScroll(URL,X,Y) {
                        id = "Viewer";
                        eval( id + " = window.open('" + URL + "','" + id + "','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + (X+0) + ",height=" + Y + ",left=100,top=" + (screen.height-(Y+120))/2 + "');");
                        Viewer.moveTo((screen.width-(X))/2,(screen.height-(Y+120))/2);
                        if ((X-100)>=screen.width) {
                                Viewer.moveTo(0,0);
                        }
                        if ((Y-100)>=screen.height) {
                                Viewer.moveTo(0,0);
                        }
                        Viewer.focus();
                }


function flipBoxHopto(who) {
	var tmp; 
	if (document.images['b_' + who].src.indexOf('_on') == -1) { 
		tmp = document.images['b_' + who].src.replace('_off', '_on');
		document.getElementById('box_' + who).style.display = 'none';
		document.images['b_' + who].src = tmp;
		setCookieHopto  ('laststate_'+who, 'off');

	} else { 
		tmp = document.images['b_' + who].src.replace('_on', '_off');
		document.getElementById('box_' + who).style.display = 'block';
		document.images['b_' + who].src = tmp;
		setCookieHopto  ('laststate_'+who, 'on');

	} 
}

function setCookieHopto  (name, value, expires,  path, domain, secure)
{
  if (expires) expires = expires.toGMTString();
  document.cookie = name+"="+escape(value)+
                            (expires ? "; expires="+expires : "")+
                            (path    ? "; path="   +path    : "")+
                            (domain  ? "; domain=" +domain  : "")+
                            (secure  ? "; secure"           : "");
}

