
function Q_ppp_left(wdth) { return Math.floor((screen.width -wdth)/2); }
function Q_ppp_top(hght)  { return Math.floor((screen.height-hght)/2); }

function Q_on_click_thmb(indx,sbjct,wdth,hght) {
    if(document.getElementById('i_drct_view').checked) Q_show_img(indx,sbjct,wdth,hght);
    else window.location.href='index.php?g_clss=artwrk&artwrk='+indx;
}

function Q_show_exif(indx) {
	var wdth = 600;
	var hght = 600;
    var Q_lft  = screen.width  ? Math.floor((screen.width -wdth)/2)  : 100;
    var Q_top  = screen.height ? Math.floor((screen.height-hght)/2)  :  80;
    window.open('Q_get.php?g_clss=ppp_shw_exif&artwrk='+indx,'','width='+wdth+',height='+hght+',left='+Q_lft+',top='+Q_top+',scrollbars=1');
}

function Q_show_img(indx,sbjct,wdth,hght) {
    window.open('Q_get.php?g_clss=ppp_shw_img&artwrk='+indx,''
        ,'width='+Q_popup.mdfd_wdth(wdth)+',height='+Q_popup.mdfd_hght(hght)+',left='+Q_popup.cntr_lft(wdth)+',top='+Q_popup.cntr_top(hght)+',scrollbars=0');
}

function Q_show_img_orgnl(indx,sbjct) {
    var wdth  = screen.width  ? screen.width  : 800;
    var hght  = screen.height ? screen.height : 600;
    window.open('Q_get.php?g_clss=ppp_shw_img_orgnl&artwrk='+indx,'','left=0,top=0,width='+wdth+',height='+hght+',scrollbars=1,resizable=1');
}

function Q_popup_article(uri,sbjct,wdth,hght) {
    var Q_lft  = screen.width  ? Math.floor((screen.width -wdth)/2)  : 100;
    var Q_top  = screen.height ? Math.floor((screen.height-hght)/2)  :  80;
    window.open(uri,'','width='+wdth+',height='+hght+',left='+Q_lft+',top='+Q_top+',scrollbars=1');
}
