PositionX = 150;
PositionY = 150;

// 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 = true;

// 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=150,height=100,left='+PositionX+',top='+PositionY;

function openPopupImage(imageURL,imageTitle){
  imageURL.replace(/"&acute;"/g,"");
  imageTitle.replace(/"&acute;"/g,"");
  
  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(300,300);');
		writeln('width=300-(document.body.clientWidth-document.images[0].width);');
		writeln('height=300-(document.body.clientHeight-document.images[0].height);');
		writeln('window.resizeTo(width,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('</sc'+'ript>');
		if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();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();		
	}
}

function openPopupVideo(imageURL,imageTitle,w,h){
  imageURL.replace(/"&acute;"/g,"");
  imageTitle.replace(/"&acute;"/g,"");
  
  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('+w+','+h+');}');
    writeln('if (isNN){');       
    writeln('window.innerWidth='+w+';');
    writeln('window.innerHeight='+h+';}}');
    writeln('function doTitle(){document.title="'+imageTitle+'";}');
    writeln('</sc'+'ript>');
    if (!AutoClose) {
     writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">');
    }
    else 
    {
    writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
    writeln('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" hspace="0" vspace="0" WIDTH="'+w+'" HEIGHT="'+h+'">');
    writeln('<PARAM NAME="movie" VALUE="'+imageURL+'">');
    writeln('<PARAM NAME="quality" VALUE="high">');
    writeln('<EMBED src="'+imageURL+'" quality="high" WIDTH="'+w+'" HEIGHT="'+h+'" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" hspace="0" vspace="0">');
    writeln('</EMBED></OBJECT>');
    writeln('</body></html>');
    }
    close();		
  }
}

function Right(str, n)
        /***
                IN: str - the string we are RIGHTing
                    n - the number of characters we want to return

                RETVAL: n characters from the right side of the string
        ***/
        {
                if (n <= 0)     // Invalid bound, return blank string
                   return "";
                else if (n > str.length)   // Invalid bound, return
                   return str;                     // entire string
                else { // Valid bound, return appropriate substring
                   var iLen = str.length;
                   return str.substring(iLen, iLen - n);
                }
        }

function apri(pag)
{
  //if (Right(pag, 4) == 'html') || (Right(pag, 3) == 'htm') {
  //  window.open(pag,'','toolbar=no,scrollbars=no,width=370,height=263');
  //} else {
    openPopupImage(pag,'');
  //}
}

function apri(pag,txt)
{
	//window.open(pag,txt,'toolbar=no,scrollbars=no,width=400,height=320');
	openPopupImage(pag,txt);
}

function apri(pag,w,h)
{
	//window.open(pag,'','toolbar=no,scrollbars=no,width='+w+',height='+h);
	openPopupImage(pag,'');
}

function apri1(pag)
{
      window.open(pag,'','toolbar=no,scrollbars=no,width=370,height=263');
}

function openPopupElement(pag, bar)
{
 window.open(pag,'',bar);
}

function MM_openBrWindow(pag,txt,t) {
  window.open(pag,txt,t);
}

function openWindow(url, name) {
 popupWin = window.open(url, name, 'menubars,status,resizable=yes,left=100,top=200,height=230,width=320');
}
var win = null;
function openCenteredWindow(mypage,myname,w,h,features) {
var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}