if (screen.availWidth<801||window.innerWidth<805)
{
	var viewer = '800';
	var width = '550';
	var height = '400';
}
else
{
	var viewer = '1024';
	var width = '750';
	var height = '600';
}

function openViewer(artist,image)
{
    PopvURL='viewer_'+viewer+'.asp?artist='+artist+'&image='+image;
    if(!PopvWin || PopvWin.closed){
        PopvWin=PopvWinOpen(width,height);
    }
    else {
        PopvWin.close();
        PopvWin=null;
        PopvWin=PopvWinOpen(width,height);
    }
}
var PopvURL="";
var PopvWin=null;
var openpopvwin=null;
function PopvWinOpen(width,height){
    var x =(screen.availWidth-width)/2;
    var y =(screen.availHeight-height)/2;
	var winfeatures="width="+width+",height="+height+",top="+y+",left="+x+",status=no,toolbar=no,menubar=no,location=no,resizable,scrollbars=0";
	openpopvwin=null;
	openpopvwin=window.open(PopvURL,"xarawin",winfeatures);
	return openpopvwin;
}

function openViewer2(artist,image,width,height)
{
    PopvURL2='viewer_plain.asp?artist='+artist+'&image='+image;
    if(!PopvWin2 || PopvWin2.closed){
        PopvWin2=PopvWinOpen2(width,height);
    }
    else {
        PopvWin2.close();
        PopvWin2=null;
        PopvWin2=PopvWinOpen2(width,height);
    }
}
var PopvURL2="";
var PopvWin2=null;
var openpopvwin2=null;
function PopvWinOpen2(width,height){
    var x =(screen.availWidth-width)/2;
    var y =(screen.availHeight-height)/2;
	var winfeatures2="width="+width+",height="+height+",top="+y+",left="+x+",status=no,toolbar=no,menubar=no,location=no,resizable,scrollbars=0";
	openpopvwin2=null;
	openpopvwin2=window.open(PopvURL2,"xarawin2",winfeatures2);
	return openpopvwin2;
}

function openViewer3(artist,image,width,height)
{
    PopvURL3='viewer_rollover.asp?artist='+artist+'&image='+image;
    if(!PopvWin3 || PopvWin3.closed){
        PopvWin3=PopvWinOpen3(width,height);
    }
    else {
        PopvWin3.close();
        PopvWin3=null;
        PopvWin3=PopvWinOpen3(width,height);
    }
}
var PopvURL3="";
var PopvWin3=null;
var openpopvwin3=null;
function PopvWinOpen3(width,height){
    var x =(screen.availWidth-width)/2;
    var y =(screen.availHeight-height)/2;
	var winfeatures3="width="+width+",height="+height+",top="+y+",left="+x+",status=no,toolbar=no,menubar=no,location=no,resizable,scrollbars=0";
	openpopvwin3=null;
	openpopvwin3=window.open(PopvURL3,"xarawin3",winfeatures3);
	return openpopvwin3;
}