is = new ottosniff();
function ottosniff() {
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else this.b = b
	this.version = navigator.appVersion
	this.v = parseInt(this.version)
	this.ns = (this.b=="ns" && this.v>=5)
	this.op = (navigator.userAgent.indexOf('Opera')>-1)
	this.safari = (navigator.userAgent.indexOf('Safari')>-1)
	this.op7 = (navigator.userAgent.indexOf('Opera')>-1 && this.v>=7 && this.v<8)
	this.op78 = (navigator.userAgent.indexOf('Opera')>-1 && this.v>=7 || navigator.userAgent.indexOf('Opera')>-1 && this.v>=8)
	this.ie5 = (this.version.indexOf('MSIE 5')>-1)
	this.ie6 = (this.version.indexOf('MSIE 6')>-1)
	this.ie7 = (this.version.indexOf('MSIE 7')>-1)
	this.ie56 = (this.ie5||this.ie6)
	this.iewin = (this.ie56 && navigator.userAgent.indexOf('Windows')>-1 || this.ie7 && navigator.userAgent.indexOf('Windows')>-1)
	this.iemac = (this.ie56 && navigator.userAgent.indexOf('Mac')>-1)
	this.moz = (navigator.userAgent.indexOf('Mozilla')>-1)
	this.ff = (navigator.userAgent.indexOf('Firefox')>-1)
	this.moz13 = (navigator.userAgent.indexOf('Mozilla')>-1 && navigator.userAgent.indexOf('1.3')>-1) 
	this.oldmoz = (navigator.userAgent.indexOf('Mozilla')>-1 && navigator.userAgent.indexOf('1.4')>-1 && !this.ff ||navigator.userAgent.indexOf('Mozilla')>-1 && navigator.userAgent.indexOf('1.5')>-1 && !this.ff ||navigator.userAgent.indexOf('Mozilla')>-1 && navigator.userAgent.indexOf('1.6')>-1 && !this.ff)
	this.ns6 = (navigator.userAgent.indexOf('Netscape6')>-1)
	this.docom = (this.ie56||this.ns||this.iewin||this.op||this.iemac||this.safari||this.moz||this.oldmoz||this.ns6)
}

PositionX = 100;
PositionY = 100;
defaultWidth  = 500;
defaultHeight = 500;
var AutoClose = true;

var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;

function popImage(imageURL,imageTitle){

	imgWin=window.open('about:blank','',optIE);

	with (imgWin.document){
writeln('<html><head><title>Loading... </title><style>body{margin:0px;}</style>');
writeln('<sc'+'ript>');

writeln('function reSizeToImage(){');
writeln('window.resizeTo(100,100);');

if (is.ie7){
writeln('width=100-(document.body.clientWidth-document.images[0].width)+140;');
} else {
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
}
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');


writeln('function doTitle(){document.title="'+imageTitle+'";}');
writeln('</sc'+'ript>');
if (!AutoClose) 
	writeln('</head><body bgcolor="#FFFFFF" scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
	else 
	writeln('</head><body bgcolor="#FFFFFF" scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
	writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
	close();		
	}
}

