 var winheight=100;
 var winwidth=100;
 var cat=null;

 step=10;

 var nav=navigator.userAgent.toLowerCase();
 var isopera=false;
 if (nav.indexOf('opera')!=-1) isopera=true

function catswindows(imgname,imgwidth,imgheight,imgtitle) 
{

 if (!document.layers&&!document.all&&!document.getElementById)
  {
   paramstp="height="+imgheight+",width="+imgwidth+",top=6"+
   ",left=6,scrollbars=no,location=no"+
   ",directories=no,status=no,menubar=no,toolbar=no,resizable=no"
   cat=window.open("","cat",paramstp);
   oldstr='<html><title>'+imgtitle+'</title><body background="'+imgname+'"></b'+'ody></h'+'tml>';
   cat.document.write(oldstr);
   if (cat.focus){cat.focus();}
   return;
  }
 
 if (document.all)
  {

  LeftPosition=(screen.width)?(screen.width-winwidth)/2:100;
  TopPosition=(screen.height)?(screen.height-winheight)/2:100;
  paramstp="height="+winheight+",width="+winwidth+",top="+TopPosition+
  ",left="+LeftPosition+",scrollbars=no,location=no"+
  ",directories=no,status=no,menubar=no,toolbar=no,resizable=no"}

 cat=window.open("","cat",paramstp);

 if (document.all)
  {
   string="<html><head><title>"+imgtitle+"</title>"+'<s'+'cript Language=Jav'+'aScript'+' src="right-click-off.js"></script>'+"<body topmargin=0 leftmargin=0 bgcolor=#FFFFFF>";
   string1="<div id=loadintxt style='position:absolute;width:100%;top:45%;text-align:center;visibility:visible;font-family:Arial;font-size:16px;font-weight:bold'>Loading...</div>";
   string2="<div id=errtxt style='position:absolute;width:100%;top:45%;text-align:center;font-family:Arial;font-size:16px;color:#000000;font-weight:bold;visibility:hidden'>Picture unavailable at the moment</div>";
   string3='<s'+'cript>'+'var animColorIndex=0;colorArray=["#FFFFFF","#CCCCCC","#999999","#666666","#333333","#000000","#333333","#666666","#999999","#CCCCCC"];';
   string4='function textLooping(){if(animColorIndex==10)animColorIndex=0;'+'loadintxt.style.color=colorArray[animColorIndex];animColorIndex++;}animInterval=setInterval("textLooping()",200);';
   string5="function erroccur(){clearInterval(animInterval);loadintxt.style.visibility='hidden';errtxt.style.visibility='visible';}";
   string6='function init(){clearInterval(animInterval);'+"loadintxt.style.visibility='hidden';"+'fltr.filters.item(0).Apply();fltr.filters.item(0).Play();'+'fltr.style.visibility="visible";}'+'</s'+'cript>';
   string7="<img id='fltr' style='filter:BlendTrans(Duration=5);visibility:visible' src='"+imgname+"' border=0"+" width="+imgwidth+" height="+imgheight+" onload='init()' onerror='erroccur()'>"+"</b"+"ody></h"+"tml>";
  } 
 
cat.document.writeln(string7);
cat.document.writeln(string);
cat.document.writeln(string1);
cat.document.writeln(string2);
cat.document.writeln(string3);
cat.document.writeln(string4);
cat.document.writeln(string5);
cat.document.writeln(string6);
cat.document.writeln(string7);

 x=y=step;

 if (document.all)
  {
   while (x | y)
   {
    cat.resizeBy(x,y);
    LeftPosition=(screen.width-cat.document.body.clientWidth)/2;
    TopPosition=(screen.height-cat.document.body.clientHeight)/2;
    if (LeftPosition<0) LeftPosition=0;
    if (TopPosition<0) TopPosition=0;
    cat.moveTo(LeftPosition,TopPosition);
    if (cat.document.body.clientWidth>=imgwidth) x=0;
    if (cat.document.body.clientHeight>=imgheight) y=0;
   }
  }

 else
  if (document.getElementById&&!document.all)
  {
   while (x | y)
   {
    cat.resizeBy(x,y);
    LeftPosition=(screen.width-cat.window.innerWidth)/2;
    TopPosition=(screen.height-cat.window.innerHeight)/2;
    if (LeftPosition<0) LeftPosition=0;
    if (TopPosition<0) TopPosition=0;
    cat.moveTo(LeftPosition,TopPosition);
    if (cat.window.innerWidth>=imgwidth) x=0;
    if (cat.window.innerHeight>=imgheight) y=0;
   }
  }
 
 if(cat.focus){cat.focus();} 
 return;
}

function CloseCatWin()
 {if(cat!=null && cat.open)cat.close()}
 
window.onfocus=CloseCatWin;