PositionX = 200;
PositionY = 100;
defaultWidth  = 600;
defaultHeight = 500;
var AutoClose = false;
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=350,height=100,left='+PositionX+',top='+PositionY;

function popImage(imageURL,imageTitle){
	if (isNN){imgWin=window.open('about:blank','',optNN);}
	if (isIE){imgWin=window.open('about:blank','',optIE);}
	cx = screen.availWidth;
	cy = screen.availHeight;
	coordX = parseInt(cx/2 - 352);
	coordY = parseInt(cy/2 - 286);

	with (imgWin.document){
	writeln('<html><head><title>Cargando...Por favor espere</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
	writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
	writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
	writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
	writeln('width=100-(document.body.clientWidth-document.images[0].width);');
	writeln('height=100-(document.body.clientHeight-document.images[0].height);');
	writeln('window.resizeTo(width+12,height);}');
	writeln('if (isNN){');       
	writeln('window.innerWidth=document.images["George"].width;');
	writeln('window.innerHeight=document.images["George"].height;}}');

	writeln('function adjust_popup()');
	writeln('{');
	writeln('        var w, h, fixedW, fixedH, diffW, diffH;');
	writeln('        if (document.documentElement && document.body.clientHeight==0) {     // Catches IE6 and FF in DOCMODE');
	writeln('                fixedW = document.documentElement.clientWidth;');
	writeln('                fixedH = document.documentElement.clientHeight;');
	writeln('                window.resizeTo(fixedW, fixedH);');
	writeln('                diffW = fixedW - document.documentElement.clientWidth;');
	writeln('                diffH = fixedH - document.documentElement.clientHeight;');
	writeln('                w = fixedW + diffW + 16; // Vert Scrollbar Always On in DOCMODE.');
	writeln('                h = fixedH + diffH;');
	writeln('                if (w >= screen.availWidth) h += 16;');
	writeln('        } else if (document.all) {');
	writeln('                fixedW = document.body.clientWidth;');
	writeln('                fixedH = document.body.clientHeight;');
	writeln('                window.resizeTo(fixedW, fixedH);');
	writeln('                diffW = fixedW - document.body.clientWidth;');
	writeln('                diffH = fixedH - document.body.clientHeight;');
	writeln('                w = fixedW + diffW;');
	writeln('                h = fixedH + diffH;');
	writeln('                if (h >= screen.availHeight) w += 16;');
	writeln('                if (w >= screen.availWidth)  h += 16;');
	writeln('        } else {');
	writeln('                fixedW = window.innerWidth;');
	writeln('                fixedH = window.innerHeight;');
	writeln('                window.resizeTo(fixedW, fixedH);');
	writeln('                diffW = fixedW - window.innerWidth;');
	writeln('                diffH = fixedH - window.innerHeight;');
	writeln('                w = fixedW + diffW;');
	writeln('                h = fixedH + diffH;');
	writeln('                if (w >= screen.availWidth)  h += 16;');
	writeln('                if (h >= screen.availHeight) w += 16;');
	writeln('        }');
	writeln('        w = Math.min(w,screen.availWidth);');
	writeln('        h = Math.min(h,screen.availHeight);');
	writeln('        window.resizeTo(w,h);');
	writeln('        window.moveTo((screen.availWidth-w)/2, (screen.availHeight-h)/2);');
	writeln('}');
	writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
		if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();adjust_popup();self.focus()">')
		else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
	writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
	close();		
	}
}