layShow='';

function popscroll (url,w,h) {
LeftPosition =(screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
window.open(url,'new','width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes')
}

function popnoscroll (url,w,h) {
LeftPosition =(screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
window.open(url,'new','width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no')
}

function pop (url,w,h,s,f) {
LeftPosition =(screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
window.open(url,'new','width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+s+',fullscreen='+f+'')
}

function showLay(layId) {
if(layShow!='' && layShow!=layId){
eval(""+layShow+".style.display='none';");
};
eval("styleUsed="+layId+".style.display;");
if (styleUsed=="none") { eval(""+layId+".style.display='block';"); } 
else { eval(""+layId+".style.display='none';"); }
layShow=layId;
}
