wn = 0;
if ( navigator.appName.indexOf("Netscape") > -1 ) NS = 1; else NS = 0;

hpad = NS?15:18;
vpad = NS?15:26;
function newin(itm,hsize,vsize) {
   wnfocus();
   if ( itm.length > 0 ) {
      if ( hsize ) { hsize += hpad; vsize += vpad; rz = 0; } else rz = 1;
      wn = window.open(itm,"coello","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars="+rz+",resizable="+rz+",width="+hsize+",height="+vsize);
   }
   return false;
}

function wnfocus() {
   if ( wn && !wn.closed ) wn.close();
}

function Size(who,url,x,y,scale,hs,al) { 
   ratio = parent.logo.tw / 1272;
   w = Math.round( x * ratio );
   h = Math.round( y * ratio );
   document.write("<img src='"+url+"' width="+w+" height="+h+" vspace=0 hspace="+hs+" align="+al+" BORDER=0>");
}

function newin(itm,hsize,vsize) {
   wnfocus();
   if ( itm.length > 0 ) {
      if ( hsize ) { hsize += hpad; vsize += vpad; rz = 0; } else rz = 1;
      wn = window.open(itm,"coello","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars="+rz+",resizable="+rz+",width="+hsize+",height="+vsize);
   }
   return false;
}

function MakeArray() {
   this.length = MakeArray.arguments.length;
   for (var i=1; i<=MakeArray.arguments.length; i++) this[i] = MakeArray.arguments[i-1];
}

var pic = new MakeArray(1);
    pic.length = 0;
function setpic(name,adrs,width,height,lit) {
   i = pic.length + 1;
   pic[i] = new MakeArray(name,adrs,width,height,lit);
   pic.length++;
}

function loadpic(itm) {
   who = parent.right.document;
   i = itm.selectedIndex;
   j = itm[i].value;
   if ( !pic[j][2] ) return;
   ra = rb = 1;
   rw = Math.round( parent.logo.tw * 0.6 );
   rh = Math.round( parent.logo.th * 0.8 );
   if ( rw < pic[j][3] ) ra = rw / pic[j][3];
   if ( rh < pic[j][4] ) rb = rh / pic[j][4];
   if ( ra < rb ) ratio = ra; else ratio = rb;
   width  = pic[j][3] * ratio;
   height = pic[j][4] * ratio;
   who.open();
   who.bgColor = 0;
   who.write('<html>\n<head><script language="JavaScript" src="script.js" type="text/javascript">tw=863;th=783;</script></head><body bgcolor="black"><center>\n<table width="95%" height="95%">\n<tr valign="middle">\n<td align="center"><table border="2"><tr><td><img src='+pic[j][2]+' width="'+width+'" height="'+height+'"><br></td></tr></table><font color="#73FDC9" size="+1">'+pic[j][5]+'</font></td></tr></table></center></body>\n</html>');
   who.close();
}

function setopt(name) {
   for ( i=1; i<pic.length+1; i++ ) {
      if ( name == pic[i][1] ) document.write("<option value ="+i+">"+pic[i][5]+"</option>\n");
   }
}

function picnext(itm) {
   itm.selectedIndex++;
   loadpic(itm);
   itm.focus();
   return(false);
}

function picprev(itm) {
   if ( itm.selectedIndex ) itm.selectedIndex--;
   loadpic(itm);
   itm.focus();
   return(false);
}

function piclast(itm) {
   itm.selectedIndex = itm.length - 2;
   loadpic(itm);
   itm.focus();
   return(false);
}

function disp(txt) {
   window.status = txt;
   return(true);
}