// JavaScript Document
var popUpWin=0;
function popUpWindow(URLStr,Desc, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = window.open('', 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
  popUpWin.document.write('<html>\n<head>\n<title>',Desc,'</title>\n</head>\n<body style="margin: 0px;" bgcolor="#FFFFFF">\n<img src="',URLStr,'" width="',width,'" height="',height,'" alt="',Desc,'">\n</body>\n</html>\n');
}


// ajaksy

function changeGroup(id,hide)
{
    for(i=0;i<suba.length;i++)
    {
         el = document.getElementById('sub'+suba[i]);
	 el.setAttribute('class','normal2');
    }
    document.getElementById('sub'+id).setAttribute('class','selected2');
    if (hide == '0')
    {
	document.getElementById('showpdfa').href = 'gen_pdf.php?subg_id='+id;
	document.getElementById('showpdf').style.display = 'block';
    }
    else
    {
	document.getElementById('showpdf').style.display = 'none';
    }
advAJAX.get({
    url: "ajax.php",
    subg_id: id,
    ajax: "true",
    onSuccess : function(obj) { document.getElementById('maincell').innerHTML = obj.responseText; initLightbox(); }
});


    return false;
}

function changePage(id,page)
{

advAJAX.get({
    url: "ajax.php",
    subg_id: id,
    page: page,
    ajax: "true",
    onSuccess : function(obj) { document.getElementById('maincell').innerHTML = obj.responseText; initLightbox(); }
});


    return false;
}





