import java.applet.Applet;
import java.awt.*;
import java.io.DataInputStream;
import java.io.FilterInputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.*;
public class RiadaHeadline extends RiadaJfc3
{
protected boolean ActionExecute(char ac[], int ai[], String as[])
{
String as1[] = {
""
};
if(super.ActionExecute(ac, ai, as))
return true;
switch(TokenGetI(ac, ai, -1, true, as1))
{
case 50: // '2'
if(!r0(r1(), ac, ai))
return false;
break;
case 51: // '3'
if(VariableGetI("random") > 0 && VariableGetI("random") < r27)
{
Random random = new Random(System.currentTimeMillis());
for(int j = 0; j < r28.size(); j++)
((Object[])r28.elementAt(j))[14] = "0";
for(int k = 0; k < VariableGetI("random"); k++)
{
int l = (int)Math.rint(random.nextDouble() * (double)(r28.size() - 1));
if(r0(l, 14) != 1)
{
((Object[])r28.elementAt(l))[14] = "1";
} else
{
int i1 = l + 1;
do
{
if(i1 >= r28.size())
i1 = 0;
if(r0(i1, 14) != 1)
{
((Object[])r28.elementAt(i1))[14] = "1";
break;
}
i1++;
} while(true);
}
}
} else
{
for(int i = 0; i < r28.size(); i++)
((Object[])r28.elementAt(i))[14] = "1";
}
r2();
break;
default:
return false;
}
return true;
}
protected void AdvertiseStop()
{
super.AdvertiseStop();
r0(false, ((int []) (null)));
}
private void r0(Graphics g)
{
g.setColor(r0);
g.fillRect(0, 0, super.projectSize.width, super.projectSize.height);
if(r1 >= 0)
r0(g, 0, 0, r1(r1), super.projectSize.width, super.projectSize.height, r4, r2, r3, majorVersion, r6, 0);
r0(g, r12, r9, r8, r25, r24, r10, executing, r11, new Rectangle(0, 0, super.projectSize.width, super.projectSize.height));
}
public void BlockTest()
{
if(r64 != null)
{
int i = r41;
int j = r38;
r3();
if(i != r41 || j != r38)
r0(false, ((int []) (null)));
}
}
private void r0(Graphics g, Color color, Color color1, Color color2, int i, Color color3, int j,
boolean flag, int k, Rectangle rectangle)
{
if(i > 0)
{
r0(g, color3, color3, color3, 0, Color.black, i, false, 2, rectangle);
rectangle.grow(-i, -i);
}
switch(k)
{
case 1: // '\001'
r0(g, color1, color1, color1, 0, Color.black, j, false, 2, rectangle);
return;
case 2: // '\002'
int k1 = j + 1;
for(int l = 0; l < j; l++)
{
if(flag)
{
color = new Color(r0(color.getRGB(), color1.getRGB(), k1, false));
color2 = new Color(r0(color2.getRGB(), color1.getRGB(), k1, false));
k1--;
}
g.setColor(color);
g.drawLine(rectangle.x + l, rectangle.y + l, (rectangle.x + rectangle.width) - l - 1, rectangle.y + l);
g.drawLine(rectangle.x + l, rectangle.y + l, rectangle.x + l, (rectangle.y + rectangle.height) - l - 1);
g.setColor(color2);
g.drawLine(rectangle.x + l, (rectangle.y + rectangle.height) - l - 1, (rectangle.x + rectangle.width) - l - 1, (rectangle.y + rectangle.height) - l - 1);
g.drawLine((rectangle.x + rectangle.width) - l - 1, rectangle.y + l, (rectangle.x + rectangle.width) - l - 1, (rectangle.y + rectangle.height) - l - 1);
}
return;
case 3: // '\003'
int i1 = j / 2;
int l1 = j - i1;
r0(g, color, color1, color2, 0, Color.black, i1, flag, 2, rectangle);
rectangle.grow(-i1, -i1);
r0(g, color2, color1, color, 0, Color.black, l1, flag, 2, rectangle);
return;
case 4: // '\004'
int j1 = j / 3;
int i2 = j1;
int j2 = j % 3;
j1 += j2 / 2;
if(j2 % 2 != 0)
i2++;
r0(g, color, color1, color2, 0, Color.black, j1, flag, 2, rectangle);
rectangle.grow(-j1, -j1);
r0(g, color, color1, color2, 0, Color.black, i2, flag, 1, rectangle);
rectangle.grow(-i2, -i2);
r0(g, color2, color1, color, 0, Color.black, j1, flag, 2, rectangle);
return;
}
}
private synchronized void r0()
{
r14++;
if(r23 != 0L && r23 >= r14)
{
r48 = true;
r2();
r14 = 0L;
}
}
private int r0(int i, int j, int k, boolean flag)
{
int l = (i & 0xff0000) >> 16;
int i1 = (i & 0xff00) >> 8;
int j1 = i & 0xff;
int k1 = (j & 0xff0000) >> 16;
int l1 = (j & 0xff00) >> 8;
int i2 = j & 0xff;
int j2;
int k2;
int l2;
if(flag)
{
double d = (double)k / 255D;
j2 = (int)((double)Math.abs(k1 - l) * d);
k2 = (int)((double)Math.abs(l1 - i1) * d);
l2 = (int)((double)Math.abs(i2 - j1) * d);
} else
{
j2 = Math.abs(k1 - l) / k;
k2 = Math.abs(l1 - i1) / k;
l2 = Math.abs(i2 - j1) / k;
}
k1 = k1 >= l ? l + j2 : l - j2;
l1 = l1 >= i1 ? i1 + k2 : i1 - k2;
i2 = i2 >= j1 ? j1 + l2 : j1 - l2;
return 0xff000000 | k1 << 16 | l1 << 8 | i2;
}
private int r0(int i)
{
int j = r45[1];
byte byte0 = -1;
int l = r45[4];
int i1 = l;
if(i < 0 || i > super.projectSize.height && i < l)
return -1;
int k;
for(; j <= r45[2]; j = k + 1)
{
int j1;
for(j1 = j; j1 + 1 < r35.size(); j1++)
{
int k1 = j1 + 1;
if(((Integer)((Object[])r35.elementAt(k1))[7]).intValue() == 1)
break;
}
k = j1;
l += r5(j, k);
if(i >= i1 && i <= l)
return j;
}
return -1;
}
private Font r0(String s, int i, int j)
{
for(int k = 0; k < audio.size(); k++)
{
Font font = (Font)audio.elementAt(k);
if(font.getSize() == j && font.getStyle() == i && font.getName() == s)
return font;
}
Font font1 = new Font(s, i, j);
audio.addElement(font1);
return font1;
}
private void r1(Graphics g)
{
if(r19 >= 0)
r0(g, 0, 0, r1(r19), super.projectSize.width, super.projectSize.height, r22, r20, r21, r17, r18, 0);
if(r58 != null && r52 != null)
{
g.setColor(r51);
g.fillPolygon(r58);
g.fillPolygon(r52);
}
}
public String getAppletInfo()
{
return "RiadaHeadline Copyright \251 1997-2000, Riada International Pty. Ltd. ([url]http://www.riada.com[/url])";
}
private int r1()
{
r28.addElement(((Object) (new Object[16])));
for(int i = 0; i < 16; i++)
{
int j = r27;
if(i <= 16)
((Object[])r28.elementAt(j))[i] = "0";
}
int k = r27;
((Object[])r28.elementAt(k))[2] = "";
k = r27;
((Object[])r28.elementAt(k))[4] = "Arial";
k = r27;
((Object[])r28.elementAt(k))[5] = "11";
k = r27;
((Object[])r28.elementAt(k))[8] = "127";
k = r27;
((Object[])r28.elementAt(k))[11] = "1";
k = r27;
((Object[])r28.elementAt(k))[12] = "";
k = r27;
((Object[])r28.elementAt(k))[13] = "";
k = r27;
((Object[])r28.elementAt(k))[15] = "";
k = r27;
((Object[])r28.elementAt(k))[14] = "1";
return r27++;
}
private String r0(String s)
{
try
{
StringBuffer stringbuffer = new StringBuffer();
URLConnection urlconnection = (new URL(getDocumentBase(), s)).openConnection();
urlconnection.setUseCaches(false);
DataInputStream datainputstream = new DataInputStream(Runtime.getRuntime().getLocalizedInputStream(urlconnection.getInputStream()));
String s1;
while((s1 = datainputstream.readLine()) != null)
stringbuffer.append(s1 + "\n");
datainputstream.close();
return stringbuffer.toString();
}
catch(Exception exception)
{
exception.printStackTrace();
}
Message("Problem reading file: '" + s + "'");
return null;
}
private int r0(int i, int j)
{
try
{
return Integer.parseInt((String)((Object[])r28.elementAt(i))[j]);
}
catch(NumberFormatException _ex)
{
return 0;
}
}
private Object r1(int i, int j)
{
return ((Object[])r28.elementAt(i))[j];
}
private String r2(int i, int j)
{
return (String)((Object[])r28.elementAt(i))[j];
}
private boolean r0(int i, char ac[], int ai[])
{
int j = 0;
String as[] = {
""
};
while((j = TokenGetI(ac, ai, -1, true, as)) >= 0)
{
TokenGetI(ac, ai, 0, true, as);
String s = as[0];
if(j > 16)
{
if(false)
continue;
} else
{
((Object[])r28.elementAt(i))[j] = s;
if(true)
continue;
}
return false;
}
return true;
}
private void r0(int i, int j, int k)
{
String s = Integer.toString(k);
if(j <= 16)
((Object[])r28.elementAt(i))[j] = s;
}
private boolean r0(int i, int j, Object obj)
{
if(j > 16)
{
return false;
} else
{
((Object[])r28.elementAt(i))[j] = obj;
return true;
}
}
private synchronized void r2()
{
r35 = new Vector(5, 5);
int i = 0;
int ai[] = {
0
};
int ai1[] = {
0
};
int ai2[] = {
0
};
int ai3[] = {
0
};
Date date = new Date();
int j = date.getDay();
r36 = VariableGetI("lineSpacing");
r7 = VariableGetI("blockSpacing");
r56 = VariableGetI("scrollRate");
r34 = VariableGetI("linePause");
r5 = VariableGetI("blockPause");
r46 = VariableGetI("pagePause");
r16 = Math.max(2, VariableGetI("fadeRate"));
r61 = VariableGetI("typePause");
oldScriptStart = VariableGetI("highlight") == 1;
r29 = VariableGetI("highlightColor");
r47 = Long.parseLong((String)VariableGet("refresh"));
r23 = Long.parseLong((String)VariableGet("fileCycles"));
r37 = VariableGetI("mode");
r30 = VariableGetI("hMargin");
r63 = VariableGetI("vMargin");
r12 = new Color(VariableGetI("borderTopColor"));
r9 = new Color(VariableGetI("borderMidColor"));
r8 = new Color(VariableGetI("borderBotColor"));
r25 = VariableGetI("frameSize");
r24 = new Color(VariableGetI("frameColor"));
r10 = VariableGetI("borderSize");
executing = VariableGetI("borderSmooth") == 1;
r11 = VariableGetI("borderStyle");
r50 = VariableGetI("scrollButtons") == 1;
r53 = VariableGetI("scrollDownX");
r54 = VariableGetI("scrollDownY");
r59 = VariableGetI("scrollUpX");
r60 = VariableGetI("scrollUpY");
r51 = new Color(VariableGetI("scrollColor"));
r57 = VariableGetI("scrollSize");
r0 = new Color(VariableGetI("bgColor"));
r1 = VariableGetI("bgImage");
r4 = VariableGetI("bgStyle");
majorVersion = VariableGetI("bgAlignX");
r6 = VariableGetI("bgAlignY");
r2 = VariableGetI("bgOffsetX");
r3 = VariableGetI("bgOffsetY");
r19 = VariableGetI("fgImage");
r22 = VariableGetI("fgStyle");
r17 = VariableGetI("fgAlignX");
r18 = VariableGetI("fgAlignY");
r20 = VariableGetI("fgOffsetX");
r21 = VariableGetI("fgOffsetY");
r13 = new Rectangle(r30 + r10 + r25, r63 + r10 + r25, super.projectSize.width - (r30 + r10 + r25) * 2, super.projectSize.height - (r63 + r10 + r25) * 2);
r58 = r52 = null;
if(r50 && (r37 == 0 || r37 == 1 || r37 >= 6 && r37 <= 9))
{
int ai4[] = {
0, r57 / 2, r57, 0
};
int ai5[] = {
r57, 0, r57, r57
};
int ai6[] = {
0, r57 / 2, r57, 0
};
int ai7[] = {
0, r57, 0, 0
};
for(int j1 = 0; j1 < ai4.length; j1++)
{
ai4[j1] += r59;
ai5[j1] += r60;
ai6[j1] += r53;
ai7[j1] += r54;
}
r58 = new Polygon(ai4, ai5, ai4.length);
r52 = new Polygon(ai6, ai7, ai6.length);
}
for(int k = 0; k < r27; k++)
{
int l = r0(k, 0);
if(r0(k, 14) == 1 && (r0(k, 8) & 1 << j) == 1 << j && ((String)((Object[])r28.elementAt(k))[9] == "0" || !date.after(new Date((String)((Object[])r28.elementAt(k))[9]))) && ((String)((Object[])r28.elementAt(k))[10] == "0" || !date.before(new Date((String)((Object[])r28.elementAt(k))[10]))))
label0:
switch(l)
{
default:
break;
case 0: // '\0'
String s = null;
if(r48 && ((String)((Object[])r28.elementAt(k))[15]).length() != 0)
{
if(r0(Expand((String)((Object[])r28.elementAt(k))[15])) == null)
break;
String s1 = r0(Expand((String)((Object[])r28.elementAt(k))[15]));
((Object[])r28.elementAt(k))[2] = s1;
}
Object obj = null;
int k1 = 0;
boolean flag = true;
s = Expand((String)((Object[])r28.elementAt(k))[2]) + '\n';
do
{
int l1 = r0(s.toCharArray(), super.appletGraphics, r0((String)((Object[])r28.elementAt(k))[4], r0(k, 6), r0(k, 5)), k1, ai, ai1, ai3, ai2);
if(l1 == k1)
break label0;
Object aobj[] = r0(l, k, s.substring(k1, l1), ai1[0], ai[0], ai2[0], ai3[0], false);
if(flag)
aobj[7] = new Integer(r0(k, 11));
flag = false;
r35.addElement(((Object) (aobj)));
i += ai1[0];
char ac[] = s.toCharArray();
int i2;
for(i2 = l1; i2 < ac.length && (ac[i2] == ' ' || ac[i2] == '\t'); i2++);
l1 = i2;
k1 = l1;
} while(true);
case 1: // '\001'
Image image = r1(r0(k, 3));
if(image != null)
{
int i1 = image.getHeight(this);
r35.addElement(((Object) (r0(l, k, new Integer(r0(k, 3)), i1, image.getWidth(this), 0, 0, r0(k, 11) == 1))));
i += i1;
}
break;
case 2: // '\002'
r35.addElement(((Object) (r0(l, k, new Integer(0), 1, 0, 0, 0, r0(k, 11) == 1))));
i++;
break;
}
}
r48 = false;
r32 = System.currentTimeMillis();
}
private void r0(Graphics g, int i, int j, Image image, int k, int l, int i1,
int j1, int k1, int l1, int i2, int j2)
{
if(image == null)
return;
int k2 = image.getWidth(this);
int l2 = image.getHeight(this);
if(k2 == -1 || l2 == -1)
return;
switch(i1)
{
case 0: // '\0'
g.drawImage(image, Align(k, k2, j1, l1, j2) + i, Align(l, l2, k1, i2, j2) + j, this);
return;
case 1: // '\001'
for(int i3 = j2; i3 < k; i3 += k2)
{
for(int j3 = j2; j3 < l; j3 += l2)
g.drawImage(image, i3 + i, j3 + j, this);
}
return;
case 2: // '\002'
g.drawImage(image, i + j2, j + j2, k - j2 * 2 - 1, l - j2 * 2 - 1, this);
return;
}
}
private Image r1(int i)
{
Image image = (Image)r31.elementAt(i * 2);
if(i >= 0 && i * 2 < r31.size() && image != null)
{
if((r49.statusID(i, true) & 4) != 0)
{
Message("Problem loading image '" + (String)r31.elementAt(i * 2 + 1) + "'");
r31.setElementAt(null, i * 2);
return null;
} else
{
return image;
}
} else
{
return null;
}
}
private void r1(String s)
{
Image image = null;
for(int i = 0; i < r31.size(); i += 2)
if(((String)r31.elementAt(i + 1)).equals(s))
image = (Image)r31.elementAt(i);
if(image == null)
{
image = getImage(getDocumentBase(), s);
r49.addImage(image, r31.size() / 2);
r49.statusID(r31.size() / 2, true);
}
r31.addElement(image);
r31.addElement(s);
}
public boolean imageUpdate(Image image, int i, int j, int k, int l, int i1)
{
int j1 = -1;
boolean flag = false;
boolean flag1 = false;
for(int k1 = 0; k1 < r31.size(); k1 += 2)
{
if((Image)r31.elementAt(k1) != image)
continue;
j1 = k1 / 2;
break;
}
if((i & 0x40) != 0)
return true;
if((i & 0x30) != 0 && r64 != null && advertising)
{
l = image.getWidth(this);
i1 = image.getHeight(this);
if(j1 != -1 && (j1 == r1 || j1 == r19))
flag = true;
int l1 = 0;
if(r35 != null)
{
for(int i2 = 0; i2 < r35.size(); i2++)
{
if(((Integer)((Object[])r35.elementAt(i2))[0]).intValue() == 1 && ((Integer)((Object[])r35.elementAt(i2))[1]).intValue() == j1)
{
if(((Integer)((Object[])r35.elementAt(i2))[3]).intValue() == -1 || ((Integer)((Object[])r35.elementAt(i2))[2]).intValue() == -1)
{
((Object[])r35.elementAt(i2))[3] = new Integer(l);
((Object[])r35.elementAt(i2))[2] = new Integer(i1);
flag1 = flag = true;
}
if(r45[4] + l1 <= r13.height && r45[4] + l1 + i1 >= r13.y)
flag = true;
}
l1 += r5(i2, i2);
}
}
if(flag1)
r2();
if(flag)
r0(false, ((int []) (null)));
}
return (i & 0x20) == 0;
}
public void init()
{
r49 = new MediaTracker(this);
super.init();
}
private int r0(char ac[], int i)
{
for(; i < ac.length && (ac[i] == ' ' || ac[i] == '\t'); i++);
return i;
}
private int r0(char ac[], Graphics g, Font font, int i, int ai[], int ai1[], int ai2[],
int ai3[])
{
int j = -1;
int k = 0;
int l = i;
int i1 = super.projectSize.width - 2 * (r30 + r10 + r25) - 2;
char c = '\0';
FontMetrics fontmetrics = g.getFontMetrics(font);
ai[0] = ai3[0] = 0;
ai2[0] = fontmetrics.getMaxAscent();
ai1[0] = ai2[0] + fontmetrics.getMaxDescent() + fontmetrics.getLeading();
int j1;
for(j1 = l; j1 < ac.length && (ac[j1] == ' ' || ac[j1] == '\t'); j1++);
for(l = j1; l < ac.length; l++)
{
char c1 = ac[l];
if(c1 == '\n')
{
ai3[0] = 0;
l++;
break;
}
if(Character.isSpace(c1) && !Character.isSpace(c))
{
k = ai[0];
j = l;
ai3[0]++;
}
ai[0] += fontmetrics.charWidth(c1);
if(ai[0] > i1)
{
if(j == -1)
{
l--;
} else
{
l = j;
ai[0] = k;
if(ai3[0] > 0)
ai3[0]--;
}
break;
}
c = c1;
}
return l;
}
private Object[] r0(int i, int j, Object obj, int k, int l, int i1, int j1,
boolean flag)
{
Object aobj[] = new Object[8];
aobj[0] = new Integer(i);
aobj[4] = new Integer(j);
aobj[1] = obj;
aobj[2] = new Integer(k);
aobj[3] = new Integer(l);
aobj[5] = new Integer(i1);
aobj[6] = new Integer(j1);
aobj[7] = new Integer(flag ? 1 : 0);
return aobj;
}
private int r0(Graphics g, int i, int j, int k, boolean flag, boolean flag1, int l,
int ai[])
{
int i1 = ((Integer)((Object[])r35.elementAt(i))[2]).intValue();
if(k + i1 < r13.y || k > r13.y + r13.height)
return i1;
int j1 = ((Integer)((Object[])r35.elementAt(i))[3]).intValue();
int k1 = ((Integer)((Object[])r35.elementAt(i))[5]).intValue();
int l1 = ((Integer)((Object[])r35.elementAt(i))[6]).intValue();
int i2 = ((Integer)((Object[])r35.elementAt(i))[4]).intValue();
int j2 = r0(i2, 1);
int k2 = r0(i2, 7);
if(i >= r41 && i <= r38 && oldScriptStart)
k2 = r29;
else
k2 = flag1 ? r0(r0.getRGB(), k2, l, true) : k2;
switch(((Integer)((Object[])r35.elementAt(i))[0]).intValue())
{
case 0: // '\0'
String s = (String)((Object[])r35.elementAt(i))[1];
g.setColor(new Color(k2));
int l2 = s.length();
if(flag)
{
if(ai[5] != i)
{
ai[6] = 0;
ai[5] = i;
}
ai[6]++;
if(ai[6] >= l2)
{
ai[5] = -1;
ai[6] = l2;
} else
{
ai[7] = 0;
Script("OnType", true);
}
l2 = ai[6];
}
r0(g, r0((String)((Object[])r28.elementAt(i2))[4], r0(i2, 6), r0(i2, 5)), k, s.toCharArray(),
j1, i1, l1, j2, k1, l2);
break;
case 1: // '\001'
if(j1 == -1 || i1 == -1)
return 0;
r0(g, r13.x, k, r1(((Integer)((Object[])r35.elementAt(i))[1]).intValue()), r13.width, i1, 0, 0, 0,
j2 != 3 ? j2 : 1, 0, 0);
break;
default:
g.setColor(new Color(k2));
g.drawLine(r13.x, k, r13.x + r13.width, k);
break;
}
return i1;
}
private void r0(Graphics g, Font font, int i, char ac[], int j, int k, int l,
int i1, int j1, int k1)
{
int l1 = r30 + r10 + r25;
int i2 = 0;
int j2 = super.projectSize.width - 2 * l1 - 2 - j;
boolean flag = false;
char c = '\0';
boolean flag1 = false;
if(!g.getFont().equals(font))
g.setFont(font);
i += l;
for(; k1 > 0 && Character.isSpace(ac[k1 - 1]); k1--);
switch(i1)
{
default:
break;
case 1: // '\001'
l1 += j2 / 2;
break;
case 2: // '\002'
l1 += j2;
break;
case 3: // '\003'
FontMetrics fontmetrics = g.getFontMetrics(font);
int k2;
int l2;
if(j1 == 0 || ac[k1 - 1] == '\n')
{
k2 = 0;
l2 = 0;
} else
{
k2 = j2 / Math.max(j1, 1);
l2 = j2 % Math.max(j1, 1);
}
for(int i3 = 0; i3 < k1; i3++)
{
if(Character.isSpace(ac[i3]) && !Character.isSpace(c))
{
g.drawChars(ac, i2, i3 - i2, l1, i);
l1 += fontmetrics.stringWidth(String.copyValueOf(ac, i2, i3 - i2)) + k2;
if(l2 > 0)
{
l1++;
l2--;
}
i2 = i3;
}
c = ac[i3];
}
break;
}
g.drawChars(ac, i2, k1 - i2, l1, i);
}
private Object[] r2(int i)
{
return (Object[])r35.elementAt(i);
}
private int r3(int i, int j)
{
return ((Integer)((Object[])r35.elementAt(i))[j]).intValue();
}
private synchronized void r3()
{
if(r43 < 0 || r43 > super.projectSize.height || r42 < 0 || r42 > super.projectSize.width || r4(r42, r43) != 0)
break MISSING_BLOCK_LABEL_141;
r41 = r0(r43);
this;
if(r41 == -1) goto _L2; else goto _L1
_L1:
int i;
for(i = r41; i + 1 < r35.size(); i++)
{
int k = i + 1;
if(((Integer)((Object[])r35.elementAt(k))[7]).intValue() == 1)
break;
}
i;
goto _L3
_L2:
-1;
_L3:
r38;
break MISSING_BLOCK_LABEL_151;
r41 = r38 = -1;
if(r41 != r44)
if(r41 == -1)
{
showStatus("");
} else
{
int j = r41;
j = ((Integer)((Object[])r35.elementAt(j))[4]).intValue();
String s = (String)((Object[])r28.elementAt(j))[13];
int l = r41;
l = ((Integer)((Object[])r35.elementAt(l))[4]).intValue();
String s1 = (String)((Object[])r28.elementAt(l))[12];
if(s.length() > 0 || s1.length() > 0)
Script(s, false);
else
r41 = r38 = -1;
}
r44 = r41;
return;
}
public boolean mouseDown(Event event, int i, int j)
{
if(r64 != null && MouseEvent(event, i, j, 501, "OnMouseDown"))
{
registered = true;
r42 = r39 = i;
r43 = r40 = j;
}
return true;
}
public boolean mouseDrag(Event event, int i, int j)
{
if(r64 != null && MouseEvent(event, i, j, 506, "OnMouseDrag"))
{
r45[4] += j - r40;
r0(false, ((int []) (null)));
r40 = r43 = j;
r42 = i;
}
return true;
}
public boolean mouseEnter(Event event, int i, int j)
{
if(r64 != null && MouseEvent(event, i, j, 504, "OnMouseEnter"))
{
r43 = j;
r42 = i;
BlockTest();
}
return true;
}
public boolean mouseExit(Event event, int i, int j)
{
if(r64 != null && MouseEvent(event, i, j, 505, "OnMouseExit"))
{
r42 = -1;
r43 = -1;
BlockTest();
}
return true;
}
public boolean mouseMove(Event event, int i, int j)
{
if(r64 != null && MouseEvent(event, i, j, 503, "OnMouseMove"))
{
r43 = j;
r42 = i;
BlockTest();
}
return true;
}
public boolean mouseUp(Event event, int i, int j)
{
if(r64 != null && MouseEvent(event, i, j, 502, "OnMouseUp"))
{
int k = r4(i, j);
registered = false;
r43 = j;
r42 = i;
if(k != 0)
{
int ai[] = {
0, 0, 0, 0, 0, 0, 0, 0
};
System.arraycopy(r45, 0, ai, 0, r45.length);
r55 += k;
ai[4] += k;
r0(false, ai);
return true;
}
if(Math.abs(r39 - i) <= 2 && Math.abs(r40 - j) <= 2)
{
r3();
int l;
if(r41 != -1)
Script((String)((Object[])r28.elementAt(l = ((Integer)((Object[])r35.elementAt(l = r41))[4]).intValue()))[12], false);
}
}
return true;
}
private int r3(int i)
{
for(; i + 1 < r35.size(); i++)
{
int j = i + 1;
if(((Integer)((Object[])r35.elementAt(j))[7]).intValue() == 1)
break;
}
return i;
}
private synchronized long r0(boolean flag, int ai[])
{
if(!advertising)
return 0L;
long l = 0L;
if(ai == null)
{
ai = new int[r45.length];
System.arraycopy(r45, 0, ai, 0, r45.length);
}
Graphics g = super.appletImage.getGraphics();
r0(g);
g.clipRect(r13.x, r13.y, r13.width, r13.height);
r3();
switch(r37)
{
case 0: // '\0'
case 1: // '\001'
case 6: // '\006'
case 7: // '\007'
case 8: // '\b'
case 9: // '\t'
if(flag && (ai[0] == 0x7fffffff || ai[4] > r13.y + r13.height))
ai[4] = r13.y + r13.height;
ai[2] = r35.size() - 1;
l = r2(g, flag, ai);
break;
case 3: // '\003'
case 5: // '\005'
ai[4] = r13.y;
l = r1(g, flag, ai);
break;
case 2: // '\002'
case 4: // '\004'
default:
ai[4] = r13.y;
l = r0(g, flag, ai);
break;
}
r1(g);
g.dispose();
if(!super.advertising)
{
synchronized(super.offGraphics)
{
super.offGraphics.drawImage(super.appletImage, 0, 0, null);
}
repaint();
}
return l;
}
private int r0(Graphics g, boolean flag, int ai[])
{
int i = 0;
int j = r13.y;
long l1 = System.currentTimeMillis();
if(flag)
{
if(ai[0] < 0)
r15 = l1 + (long)r16;
long l2 = Math.max(0L, r15 - l1);
double d = (double)r16 / (double)Math.max(1L, (long)r16 - l2);
long l3 = (long)(255D / d);
i += 12 / (256 - ai[0]);
ai[0] = (int)l3;
}
int i1;
for(i1 = ai[1]; i1 + 1 < r35.size(); i1++)
{
int j1 = i1 + 1;
if(((Integer)((Object[])r35.elementAt(j1))[7]).intValue() == 1)
break;
}
int k;
i1 = k = i1;
int k1;
for(k1 = ai[3]; k1 + 1 < r35.size(); k1++)
{
int k2 = k1 + 1;
if(((Integer)((Object[])r35.elementAt(k2))[7]).intValue() == 1)
break;
}
int l = k1;
if(r37 != 4)
{
int i2;
for(; i1 < r35.size(); i1 = i2)
{
if(r5(ai[1], i1) > r13.y + r13.height)
break;
k = i1;
for(i2 = i1 + 1; i2 + 1 < r35.size(); i2++)
{
int i3 = i2 + 1;
if(((Integer)((Object[])r35.elementAt(i3))[7]).intValue() == 1)
break;
}
}
}
if(flag)
ai[2] = l;
i1 = k;
for(int j2 = ai[1]; j2 <= l; j2++)
{
j += r36 + r0(g, j2, 0, j, false, j2 >= ai[3] && j2 <= l, ai[0], ai);
if(j2 + 1 < r35.size())
{
int j3 = j2 + 1;
if(((Integer)((Object[])r35.elementAt(j3))[7]).intValue() == 1)
j += r7;
}
}
if(flag && ai[0] >= 255)
{
ai[3] = l + 1;
i += r5;
if(ai[3] > i1)
{
i += r46;
ai[3] = ai[1] = i1 + 1;
}
if(ai[1] >= r35.size())
{
r0();
ai[3] = ai[1] = 0;
}
ai[0] = -1;
i += r5;
}
return i;
}
private int r1(Graphics g, boolean flag, int ai[])
{
int i = 0;
int j = r13.y;
if(flag)
ai[7] = 1;
int l;
for(l = ai[1]; l + 1 < r35.size(); l++)
{
int i1 = l + 1;
if(((Integer)((Object[])r35.elementAt(i1))[7]).intValue() == 1)
break;
}
int k;
l = k = l;
int j1;
for(j1 = ai[3]; j1 + 1 < r35.size(); j1++)
{
int k1 = j1 + 1;
if(((Integer)((Object[])r35.elementAt(k1))[7]).intValue() == 1)
break;
}
j1 = j1;
if(r37 != 5)
{
int l1;
for(; l < r35.size(); l = l1)
{
if(r5(ai[1], l) > r13.y + r13.height)
break;
k = l;
for(l1 = l + 1; l1 + 1 < r35.size(); l1++)
{
int j2 = l1 + 1;
if(((Integer)((Object[])r35.elementAt(j2))[7]).intValue() == 1)
break;
}
}
}
ai[2] = l;
l = k;
for(int i2 = ai[1]; i2 <= ai[3]; i2++)
{
j += r36 + r0(g, i2, 0, j, i2 == ai[3] && flag, false, 0, ai);
if(i2 + 1 < r35.size())
{
int k2 = i2 + 1;
if(((Integer)((Object[])r35.elementAt(k2))[7]).intValue() == 1)
j += r7;
}
}
if(ai[7] != 0 && flag)
{
if(ai[3]++ == j1)
i += r5;
i += r34;
if(ai[3] > l)
{
i += r46;
ai[3] = ai[1] = l + 1;
}
if(ai[1] >= r35.size())
{
r0();
ai[3] = ai[1] = 0;
}
int l2;
for(l2 = ai[1]; l2 + 1 < r35.size(); l2++)
{
int i3 = l2 + 1;
if(((Integer)((Object[])r35.elementAt(i3))[7]).intValue() == 1)
break;
}
ai[2] = l2;
} else
{
i += r61;
}
return i;
}
public void paint(Graphics g)
{
if(super.offImage != null && super.offGraphics != null)
{
synchronized(super.offGraphics)
{
g.drawImage(super.offImage, 0, 0, null);
}
return;
} else
{
return;
}
}
protected synchronized String Read(String s, boolean flag, boolean flag1)
{
r48 = true;
return super.Read(s, flag, flag1);
}
protected boolean ReadParams(boolean flag)
{
if(flag)
ScriptInit();
for(StringTokenizer stringtokenizer = new StringTokenizer(Expand(ParamGet("Images")), "|"); stringtokenizer.hasMoreTokens(); r1(stringtokenizer.nextToken()));
return true;
}
public RiadaHeadline()
{
audio = new Vector(1, 1);
r48 = false;
advertising = false;
registered = false;
r43 = -1;
r42 = -1;
r41 = -1;
r38 = -1;
r44 = -2;
docBase = "refresh,0,lineSpacing,0,blockSpacing,20,scrollRate,20,linePause,250,blockPause,1000,pagePause,2000,"+
"fadeRate,1000,typePause,100,fileCycles,0,mode,0,highlight,1,highlightColor,16777215,random,0,hMargin,5,"+
"vMargin,0,borderTopColor,15792112,borderMidColor,8961416,borderBotColor,0,frameSize,0,frameColor,0,"+
"borderSize,5,borderSmooth,1,borderStyle,2,scrollButtons,0,scrollDownX,0,scrollDownY,0,scrollUpX,0,scrollUpY,"+
"0,scrollColor,65280,scrollSize,10,bgColor,8961416,bgImage,-1,bgStyle,0,bgAlignX,1,bgAlignY,1,bgOffsetX,0,"+
"bgOffsetY,0,fgImage,-1,fgStyle,0,fgAlignX,1,fgAlignY,1,fgOffsetX,0,fgOffsetY,0";
super.requiredLibrary = "1.03";
super.productName = "RiadaHeadline";
super.productCode = "005";
super.oldScriptStart = false;
}
public void run()
{
long l = 0L;
super.run();
if(Thread.currentThread() == r64)
{
ScriptStart();
advertising = true;
r45[4] = 0x7fffffff;
r45[0] = -1;
int ai[] = {
0, 0, 0, 0, 0, 0, 0, 0
};
while(r64 == Thread.currentThread())
{
long l1 = System.currentTimeMillis();
System.arraycopy(r45, 0, ai, 0, r45.length);
long l3 = r0(!registered, ai);
if(!registered)
{
Pause(Math.max(0L, l3 - (System.currentTimeMillis() - l1)));
System.arraycopy(ai, 0, r45, 0, r45.length);
}
r45[4] += r55;
r55 = 0;
}
}
if(Thread.currentThread() == r62)
while(r62 == Thread.currentThread())
{
long l2 = System.currentTimeMillis();
if(advertising && r47 > 0L)
{
r2();
r0(!registered, ((int []) (null)));
Pause(Math.max(0L, r47 - (System.currentTimeMillis() - l2)));
} else
{
Pause(1000L);
}
}
}
protected void ScriptInit()
{
super.ScriptInit();
ReadTokens(docBase);
r28 = new Vector(5, 5);
r31 = new Vector(0, 2);
r27 = 0;
Script("OnInitialize", true);
Script("OnStart", true);
}
private int r4(int i, int j)
{
if(r58 != null && r52 != null)
{
if(r58.inside(i, j))
return -10;
if(r52.inside(i, j))
return 10;
}
return 0;
}
private int r2(Graphics g, boolean flag, int ai[])
{
int i = 0;
int k = r56;
int l = 0;
boolean flag2 = r37 >= 6 && r37 <= 9;
ai[7] = 1;
for(int i1 = 0; i1 < r35.size(); i1++)
{
int j = ((Integer)((Object[])r35.elementAt(i1))[2]).intValue();
boolean flag1 = (r37 == 1 || r37 == 8 || r37 == 9) && j + i + ai[4] == r13.y + r13.height;
if((r37 == 1 || r37 == 8 || r37 == 9) && j + i + ai[4] > r13.y + r13.height)
{
i += j;
} else
{
if(flag2)
{
l = (int)(255D / Math.max(1.0D, (double)r13.height / Math.max(1.0D, r13.height - (ai[4] + i))));
if(r37 == 6 || r37 == 8)
l = 255 - l;
}
i += r0(g, i1, 0, ai[4] + i, flag1, flag2, l, ai);
}
if(i1 + 1 < r35.size())
{
int j1 = i1 + 1;
if(((Integer)((Object[])r35.elementAt(j1))[7]).intValue() == 1)
{
i += r7;
if(ai[7] != 0 && i + ai[4] == r13.y + r13.height)
k += r5;
}
}
if(ai[7] != 0 && i + ai[4] == r13.y + r13.height)
k += r34;
i += r36;
}
k += ai[7] == 0 ? r61 : r56;
if(ai[7] != 0 && ai[4] + i == r13.y + r13.height)
k += r46;
if(ai[7] != 0 && flag && --ai[4] + i < r13.y)
{
r0();
ai[4] = r13.y + r13.height;
}
return k;
}
public void start()
{
super.start();
if(r64 == null)
{
r64 = new Thread(this);
r64.start();
}
if(r62 == null)
{
r62 = new Thread(this);
r62.start();
}
}
public void stop()
{
Script("OnStop", true);
super.stop();
r64 = null;
r62 = null;
System.gc();
}
private int r5(int i, int j)
{
int k = 0;
if(i < r35.size())
for(; i <= j; i++)
{
if(((Integer)((Object[])r35.elementAt(i))[2]).intValue() != -1)
k += ((Integer)((Object[])r35.elementAt(i))[2]).intValue();
if(i + 1 < r35.size())
{
int l = i + 1;
if(((Integer)((Object[])r35.elementAt(l))[7]).intValue() == 1)
k += r7;
}
k += r36;
}
return k;
}
public final void update(Graphics g)
{
paint(g);
}
private boolean advertising;
private int majorVersion;
private int r6;
private Color r0;
private int r1;
private int r2;
private int r3;
private int r4;
private int r5;
private int r7;
private Color r8;
private Color r9;
private int r10;
private boolean executing;
private int r11;
private Color r12;
private Rectangle r13;
private long r14;
private long r15;
private int r16;
private int r17;
private int r18;
private int r19;
private int r20;
private int r21;
private int r22;
private long r23;
private Vector audio;
private Color r24;
private int r25;
private static final int r26 = 16;
private int r27;
private Vector r28;
private boolean oldScriptStart;
private int r29;
private int r30;
private Vector r31;
private long r32;
private static final int r33 = 8;
private int r34;
private Vector r35;
private int r36;
private int r37;
private boolean registered;
private int r38;
private int r39;
private int r40;
private int r41;
private int r42;
private int r43;
private int r44;
private int r45[] = {
-1, 0, 0, 0, 0x7fffffff, -1, -1, 0
};
private int r46;
private long r47;
private boolean r48;
private MediaTracker r49;
private boolean r50;
private Color r51;
private Polygon r52;
private int r53;
private int r54;
private int r55;
private int r56;
private int r57;
private Polygon r58;
private int r59;
private int r60;
private String docBase;
private int r61;
private Thread r62;
private int r63;
private Thread r64;
}