// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 800;
defaultHeight = 600;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = false;

// Do not edit below this line...
// ================================
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=800,height=600,left='+PositionX+',top='+PositionY;

function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}

with (imgWin.document){

writeln('<html><head><title>Loading...</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(760,height);}');

writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');
writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');


writeln('function right(e) {');
writeln('  var msg = "Sorry, you don\'t have permission to right-click.";');
writeln('  if (navigator.appName == \'Netscape\' && e.which == 3) {');
writeln('    alert(msg);');
writeln('    return false;');
writeln('  }');
writeln('  if (navigator.appName == \'Microsoft Internet Explorer\' && event.button==2) {');
writeln('    alert(msg);');
writeln('    return false;');
writeln('  }else return true;');
writeln('}');

writeln('function trap() {');
writeln('if(document.images){');
writeln(' for(i=0;i<document.images.length;i++){');
writeln(' document.images[i].onmousedown = right;');
writeln(' document.images[i].onmouseup = right;}}}');
writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus();trap()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus();trap()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}

// ----------- Setups ------------------
// Set the address, width, height, top
// and left dimensions for the popup
// window below.
// -------------------------------------

PopUpURL    = "";
PopUpLeft   =  100;
PopUpTop    =  100;
PopUpWidth  =  500;
PopUpHeight =  100;

// -------------------------------------
// Do not edit anything below this line.
// -------------------------------------

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
popO='left='+PopUpLeft+',top='+PopUpTop+',width='+PopUpWidth+',height='+PopUpHeight

if (isIE||isNN){
document.oncontextmenu=checkV;
}else{
document.captureEvents(Event.MOUSEDOWN || Event.MOUSEUP);
document.onmousedown=checkV;}

function checkV(e){
if (isN4){
if (e.which==2||e.which==3){
return false;
}}else{
return false;}}
var page1;
var page1Width;
var page1Height;
var opened = false;
function spawnNewWindow1(sHref,i,j)
{
var cont="<html><body bgcolor=\"#BCBDBB\">Loading ...</body></html>";
if (opened)	opened = !page1.closed;

if (opened)
{
	page1.resizeTo(750,550);
	page1.moveTo(15,10);
	page1.document.body.innerHTML = "Loading...";
	page1.focus();
	width=150-(page1Width-i);
	height=100-(page1Height-j);
	page1.resizeTo(width,height);
}
else
{
	page1=window.open("about:blank", "win2", "scrollbars=no,menubar=no,resizable=0,copyhistory=0,width="+i+",height="+j);
	page1.resizeTo(750,550);
	page1.moveTo(15,10);
	page1.document.writeln(cont);
	page1.focus();
	opened = true;
	page1Width = page1.document.body.clientWidth;
	page1Height = page1.document.body.clientHeight;
	width=150-(page1Width-i);
	height=100-(page1Height-j);
	page1.resizeTo(550,750);
}
page1.location.href=sHref;
}

function fullScreen1(theURL) {
window.open(theURL, '', 'fullscreen=no,scrollbars=no, height = 550, width = 750');
}

function fullScreen2(theURL) {
window.open(theURL, '', 'fullscreen=no, scrollbars=no, height = 380, width = 750');
}

function fullScreen3(theURL) {
window.open(theURL, '', 'fullscreen=no, scrollbars=no, height = 430, width = 750');
}
