function pTit(cpt)
	{
	document.write('<tr><td class=ptt>'+cpt+'</td></tr>')
	}
	
	
function pBut(hrefa,cpt,sl)
	{
	st="?";
	
	if (hrefa.indexOf('?')>0) st="&";
	dog='href='+hrefa+st+'1';
	btn=(sl)?('<tr><td class=pbSl><a '+dog+' class=menu>'+cpt+'</a></td></tr>'):('<tr><td class=pbt onMouseOver="this.className=\'pbMs\'" onMouseOut="this.className=\'pbt\'"><a  '+dog+'  class=menu>'+cpt+'</a></td></tr>');
	document.write('<A '+dog+'>'+btn+'</a>')
	}

function pTit1(cpt)
	{
	document.write('<tr><td class=ptt1>'+cpt+'</td></tr>')
	}
	
function pBut1(hrefa,cpt,sl)
	{
	st="?";
	if (hrefa.indexOf('?')>0) st="&";
	dog='href='+hrefa+st+'2';
	btn=(sl)?('<tr><td class=pbSl1><a '+dog+' class=menu2>'+cpt+'</a></td></tr>'):('<tr><td class=pbt1 onMouseOver="this.className=\'pbMs1\'" onMouseOut="this.className=\'pbt1\'"><a '+dog+' class=menu2>'+cpt+'</a></td></tr>');
	document.write('<A '+dog+'>'+btn+'</a>')
	}
	

net = (document.layers && true);

widgetBuf = (net) ? 0:50

function popWin(url, name, width, height, scroll, resizable) {

    bWidth = (net) ? top.innerWidth:parseInt(top.document.body.clientWidth);
    bHeight = (net) ? top.innerHeight:parseInt(top.document.body.clientHeight);
    bLeft = (net) ? top.screenX:parseInt(top.screenLeft);
    bTop = (net) ? top.screenY:parseInt(top.screenTop);

    scroll = (scroll) ? scroll:"auto"
    resizable = (resizable) ? resizable:"yes"
    if (!bLeft) {
        bLeft = 0;
        bWidth = screen.width;
    }
    if (!bTop) {
        bTop = 0;
        bHeight = screen.height;
    }
    xer = bLeft + ((bWidth/2) - width/2);
    yer = (bTop - widgetBuf) + ((bHeight/2) - height/2);
    if (xer < 2) {
        xer = 2;
    }
    if (xer < 2) {
        xer = 2;
    }
    paramStr = "width=" + width + ",height=" + height + ",screenX=" + xer + ",screenY=" + yer + ",left=" + xer + ",top=" + yer + ",dependent=1,directories=0,location=0,menubar=0,resizable="+resizable+",scrollbars="+scroll+",toolbar=0";
    top[name] = window.open(url,name, paramStr);
    top[name].focus();
}


function launchImg(num,wm,hm) {
    popWin("../openphoto.php?file="+num,"Photo", wm, hm, "no", "no");
}	
