var sw = screen.width;
if(sw <= 800){
	theWidth = 772;
	bannerUPId = 'UP.gif';
	bannerDOWNId = 'DOWN.gif';
	flashWidth = 380;
	flashHeight = 80;
	flashNr = 3;
	columnWidth = 240;
	styleFile = 'main_style.css';
	imDir = 150;
	styleNr = 1;
}
if(sw > 800 && sw <= 1024){
	imDir = 194;
	styleNr = 2;
	theWidth = 996;
	bannerUPId = 'UP-996.jpg';
	bannerDOWNId = 'DOWN-712.jpg';
	flashWidth = 502;
	flashHeight = 108;
	flashNr = 4;
	columnWidth = 310;
	styleFile = 'main_style2.css';
	}
if(sw >= 1024 && sw < 1360){
	imDir = 194;
	styleNr = 3;
	theWidth = 1245;
	bannerUPId = 'Up1245.jpg';
	bannerDOWNId = 'Down1245.jpg';
	flashWidth = 628;
	flashHeight = 135;
	flashNr = 4;
	columnWidth = 388;
	styleFile = 'main_style3.css';
	}
if(sw >= 1360 && sw < 1440){
	imDir = 194;
	styleNr = 5;
	theWidth = 1323;
	bannerUPId = 'Up1360.jpg';
	bannerDOWNId = 'Down1360.jpg';
	flashWidth = 628;
	flashHeight = 135;
	flashNr = 4;
	columnWidth = 412;
	styleFile = 'main_style3.css';
	}		
if(sw >= 1440){
	imDir = 194;
	styleNr = 5;
	theWidth = 1400;
	bannerUPId = 'Up1400.jpg';
	bannerDOWNId = 'Down1400.jpg';
	flashWidth = 628;
	flashHeight = 135;
	flashNr = 4;
	columnWidth = 436;
	styleFile = 'main_style3.css';
	}		

var oPopup = window.createPopup();

function popup(text,xPos,yPos,boxHeight,theID)
{
    var oPopBody = oPopup.document.body;
    oPopBody.style.backgroundColor = "#aaaaaa";
    oPopBody.style.color = "white";
    oPopBody.style.fontFamily = "Verdana, Arial";
    oPopBody.style.fontSize = "11";
    oPopBody.style.border = "solid white 1px";
    oPopBody.innerHTML = text;
    oPopup.show(xPos, yPos, 180, boxHeight, theID);
}
function email(){
	email = 'info@paintings.name';
	document.location.href = 'mailto:'+email;
}	
function showWin(im,w,h,title){
	page = 'http://paintings.name/showWin.php?im='+im+'&title='+title;	 
	w = w + 13;
	h = h + 32;
	window.showModelessDialog(page,"Dialog Box Arguments # 2","dialogHeight: "+h+"px; dialogWidth: "+w+"px; dialogTop: px; dialogLeft: px; edge: Sunken; scroll: no; center: Yes; help: No; resizable: Yes; status: Yes;");
}
	