function imagepop(num) {

	var index = num - 1;
	
	if(widths[index] && heights[index]) {
	
		w = window.open('', 'imageview', 'width=' + widths[index] + ',height=' + (heights[index] + 20));
		//w.document.open('text/html', 'replace');
		w.document.writeln('<html><head>');
		w.document.writeln('<title>' + document.title + '</title>');
		w.document.writeln('<link href="styles/common.css" rel="stylesheet" type="text/css">');
		w.document.writeln('</head>');
		w.document.writeln('<body style="margin:0px; padding:0px; text-align:center;">');
		w.document.writeln('<div><img src="images/lg/' + prefix + '_' + num + '.jpg" width="' + widths[index] + '" height="' + heights[index] + '"></div>');
		w.document.writeln('<div style="text-align:center"><a href="javascript:window.close()">Close Window</a></div>');
		w.document.writeln('</body></html>');
		w.document.close();

	}
		
}

function alt_colorcheck() { //v1.1

	var msg_displayed = document.cookie && document.cookie.indexOf("colorcheckmessagedisplayed=1") > -1

	if(document.referrer && document.referrer.indexOf('http://' + document.domain) == 0) {
		msg_displayed = true;
	}
	
	if (!msg_displayed && screen.colorDepth && screen.colorDepth < 32) { 
		window.alert('The Architectus site looks best on displays set to true colour (32 bit) mode.\nYour display appears to be set to display fewer colours.\nIf you like, you can change this in your display control panel.'); 
		document.cookie = "colorcheckmessagedisplayed=1";
	} 
	
} 
