// NOTE: this script is compressed. See original version for commented code.

if(!window.JSFX)JSFX=new Object(); var LinkFadeInStep=50; var LinkFadeOutStep=20; var LinkEndColor="CCCCCC"; var LinkStartColor="CCCCCC"; var LinkFadeRunning=false; document.onmouseover = theOnOver; document.onmouseout = theOnOut; if(document.captureEvents)

document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT); function hex2dec(hex){return(parseInt(hex,16));}

function dec2hex(dec){return (dec < 16 ? "0" : "") + dec.toString(16);}

function getColor(start, end, percent)

{ var r1=hex2dec(start.slice(0,2)); var g1=hex2dec(start.slice(2,4)); var b1=hex2dec(start.slice(4,6)); var r2=hex2dec(end.slice(0,2)); var g2=hex2dec(end.slice(2,4)); var b2=hex2dec(end.slice(4,6)); var pc=percent/100; var r=Math.floor(r1+(pc*(r2-r1)) + .5); var g=Math.floor(g1+(pc*(g2-g1)) + .5); var b=Math.floor(b1+(pc*(b2-b1)) + .5); return("#" + dec2hex(r) + dec2hex(g) + dec2hex(b));}

JSFX.getCurrentElementColor = function(el)

{ var result = LinkStartColor; if (el.currentStyle)

result = (el.currentStyle.color); else if (document.defaultView)

result = (document.defaultView.getComputedStyle(el,'').getPropertyValue('color')); else if(el.style.color)

result = el.style.color; if(result.charAt(0) == "#")

result = result.slice(1, 8); else if(result.charAt(0) == "r")

{ var v1 = result.slice(result.indexOf("(")+1, result.indexOf(")") ); var v2 = v1.split(","); result = (dec2hex(parseInt(v2[0])) + dec2hex(parseInt(v2[1])) + dec2hex(parseInt(v2[2])));}

return result;}

JSFX.findTagIE = function(el)

{ while (el && el.tagName != 'A')

el = el.parentElement; return(el);}

JSFX.findTagNS= function(el)

{ while (el && el.nodeName != 'A')

el = el.parentNode; return(el);}

function theOnOver(e)

{ var lnk; if(window.event)

lnk=JSFX.findTagIE(event.srcElement); else

lnk=JSFX.findTagNS(e.target); if(lnk)

JSFX.linkFadeUp(lnk);}

JSFX.linkFadeUp = function(lnk)

{ if(lnk.state == null)

{ lnk.state = "OFF"; lnk.index = 0; lnk.startColor = JSFX.getCurrentElementColor(lnk); lnk.endColor = LinkEndColor;}

if(lnk.state == "OFF")

{ lnk.state = "FADE_UP"; JSFX.startLinkFader();}

else if( lnk.state == "FADE_UP_DOWN" || lnk.state == "FADE_DOWN")

{ lnk.state = "FADE_UP";}

}

function theOnOut(e)

{ var lnk; if(window.event)

lnk=JSFX.findTagIE(event.srcElement); else

lnk=JSFX.findTagNS(e.target); if(lnk)

JSFX.linkFadeDown(lnk);}

JSFX.linkFadeDown = function(lnk)

{ if(lnk.state=="ON")

{ lnk.state="FADE_DOWN"; JSFX.startLinkFader();}

else if(lnk.state == "FADE_UP")

{ lnk.state="FADE_UP_DOWN";}

}

JSFX.startLinkFader = function()

{ if(!LinkFadeRunning)

JSFX.LinkFadeAnimation();}

JSFX.LinkFadeAnimation = function()

{ LinkFadeRunning = false; for(i=0 ; i<document.links.length ; i++)

{ var lnk = document.links[i]; if(lnk.state)

{ if(lnk.state == "FADE_UP")

{ lnk.index+=LinkFadeInStep; if(lnk.index > 100)

lnk.index = 100; lnk.style.color=getColor(lnk.startColor, lnk.endColor, lnk.index); if(lnk.index == 100)

lnk.state="ON"; else

LinkFadeRunning = true;}

else if(lnk.state == "FADE_UP_DOWN")

{ lnk.index+=LinkFadeOutStep; if(lnk.index>100)

lnk.index = 100; lnk.style.color=getColor(lnk.startColor, lnk.endColor, lnk.index); if(lnk.index == 100)

lnk.state="FADE_DOWN"; LinkFadeRunning = true;}

else if(lnk.state == "FADE_DOWN")

{ lnk.index-=LinkFadeOutStep; if(lnk.index<0)

lnk.index = 0; lnk.style.color=getColor(lnk.startColor, lnk.endColor, lnk.index); if(lnk.index == 0)

lnk.state="OFF"; else

LinkFadeRunning = true;}

}

}

if(LinkFadeRunning)

setTimeout("JSFX.LinkFadeAnimation()", 40);}



































// START: Mouse over fade script for anchors

// This script below has been compressed to reduce file size. Refer to original script for commented code.

var fadeTo = "FF0000"; var fiBy = 6; var foBy = 10; var speed = 10; var ignoreClass = "ignore"; var opera, ie, dom, x = 0, oc, fader, ocs = new Array(); if (navigator.userAgent.indexOf("Opera") != -1) opera = true

else if (document.all && !opera) ie = true

else if (!document.all && document.getElementById) dom = true; function convertRGB(z)

{ var newfcS = "", splitter = ""; splitter = z.split(","); splitter[0] = parseInt(splitter[0].substring(4, splitter[0].length)); splitter[1] = parseInt(splitter[1]); splitter[2] = parseInt(splitter[2].substring(0, splitter[2].length-1)); for (var q = 0; q < 3; q++)

{ splitter[q] = splitter[q].toString(16); if (splitter[q].length == 1) splitter[q] = "0" + splitter[q]; newfcS += splitter[q];}

return newfcS;}

function currentColour(index)

{ var temp, cc; if (opera) cc = document.links[index].style.color

else if (ie) cc = document.links[index].currentStyle.color

else if (dom) cc = document.defaultView.getComputedStyle(document.links[index], '').getPropertyValue("color"); if (cc.length == 4 && cc.substring(0, 1) == "#")

{ temp = ""; for (var a = 0; a < 3; a++)

temp += cc.substring(a+1, a+2) + cc.substring(a+1, a+2); cc = temp;}

else if (cc.indexOf("rgb") != -1) cc = convertRGB(cc)

else if (cc.length == 7) cc = cc.substring(1, 7)

else cc = fadeTo; return cc;}

function convert2Dec(hex)

{ var rgb = new Array(); for (var u = 0; u < 3; u++)

rgb[u] = parseInt(hex.substring(u*2, u*2+2), 16); return rgb;}

function newRGB(f, n, d)

{ var change; if (d == 1) change = fiBy

else change = foBy; for (var g = 0; g < 3; g++)

{ if (n[g] > f[g] && n[g] - change >= 0) n[g] -= change; if (n[g] < f[g] && n[g] + change <= 255) n[g] += change;}

return n;}

function fade(index, d)

{ var fc, nc, temp = new Array(), finished = false; nc = convert2Dec(currentColour(index)); if (d == 1) fc = convert2Dec(fadeTo)

else fc = convert2Dec(ocs[x]); temp = convert2Dec(currentColour(index)); nc = newRGB(fc, nc, d); if ((nc[0] == temp[0]) && (nc[1] == temp[1]) && (nc[2] == temp[2]))

finished = true; if (!finished) document.links[x].style.color = "rgb(" + nc[0] + "," + nc[1] + "," + nc[2] + ")"

else clearInterval(fader);}

function findLink(over)

{ if (document.layers) return; if (fader)

{ clearInterval(fader); document.links[x].style.color = "#" + ocs[x];}

if (over && !this.id) this.id = over; x = 0; while (!(this.id == document.links[x].id) && (x < document.links.length))

x++; if (this.id == document.links[x].id)

{ oc = currentColour(x); fader = setInterval("fade(" + x + ", 1)", speed);}

}

function clearFade()

{ if (document.layers) return; if (fader) clearInterval(fader); fader = setInterval("fade(" + x + ", 0)", speed);}

function init()

{ for (var i = 0; i < document.links.length; i++)

{ ocs[i] = currentColour(i); var currentOver = document.links[i].onmouseover; var currentOut = document.links[i].onmouseout; var ignoreIt = document.links[i].className == ignoreClass; if (!ignoreIt) document.links[i].id = "link" + i; if (!currentOver && !currentOut && !ignoreIt)

{ document.links[i].onmouseover = findLink; document.links[i].onmouseout = clearFade;}

}

}

if (opera || ie || dom) window.onload = init; 

// END: Mouse over fade script for anchors



















<!-- Begin navigation link for top of pages

var isDOM = (document.getElementById ? true : false); 

var isIE4 = ((document.all && !isDOM) ? true : false);

var isNS4 = (document.layers ? true : false);

function getRef(id) {

if (isDOM) return document.getElementById(id);

if (isIE4) return document.all[id];

if (isNS4) return document.layers[id];

}

function getSty(id) {

return (isNS4 ? getRef(id) : getRef(id).style);

} 



var popTimer = 0;



var litNow = new Array();

function popOver(menuNum, itemNum) {

clearTimeout(popTimer);

hideAllBut(menuNum);

litNow = getTree(menuNum, itemNum);

changeCol(litNow, true);

targetNum = menu[menuNum][itemNum].target;

if (targetNum > 0) {

thisX = parseInt(menu[menuNum][0].ref.left) + parseInt(menu[menuNum][itemNum].ref.left);

thisY = parseInt(menu[menuNum][0].ref.top) + parseInt(menu[menuNum][itemNum].ref.top);

with (menu[targetNum][0].ref) {

left = parseInt(thisX + menu[targetNum][0].x);

top = parseInt(thisY + menu[targetNum][0].y);

visibility = 'visible';

      }

   }

}

function popOut(menuNum, itemNum) {

if ((menuNum == 0) && !menu[menuNum][itemNum].target)

hideAllBut(0)

else

popTimer = setTimeout('hideAllBut(0)', 500);

}

function getTree(menuNum, itemNum) {





itemArray = new Array(menu.length);



while(1) {

itemArray[menuNum] = itemNum;

if (menuNum == 0) return itemArray;

itemNum = menu[menuNum][0].parentItem;

menuNum = menu[menuNum][0].parentMenu;

   }

}





function changeCol(changeArray, isOver) {

for (menuCount = 0; menuCount < changeArray.length; menuCount++) {

if (changeArray[menuCount]) {

newCol = isOver ? menu[menuCount][0].overCol : menu[menuCount][0].backCol;

// Change the colours of the div/layer background.

with (menu[menuCount][changeArray[menuCount]].ref) {

if (isNS4) bgColor = newCol;

else backgroundColor = newCol;

         }

      }

   }

}

function hideAllBut(menuNum) {

var keepMenus = getTree(menuNum, 1);

for (count = 0; count < menu.length; count++)

if (!keepMenus[count])

menu[count][0].ref.visibility = 'hidden';

changeCol(litNow, false);

}







function Menu(isVert, popInd, x, y, width, overCol, backCol, borderClass, textClass) {

this.isVert = isVert;

this.popInd = popInd

this.x = x;

this.y = y;

this.width = width;

this.overCol = overCol;

this.backCol = backCol;

this.borderClass = borderClass;

this.textClass = textClass;

this.parentMenu = null;

this.parentItem = null;

this.ref = null;

}



function Item(text, href, frame, length, spacing, target) {

this.text = text;

this.href = href;

this.frame = frame;

this.length = length;

this.spacing = spacing;

this.target = target;

this.ref = null;

}



function writeMenus() {

if (!isDOM && !isIE4 && !isNS4) return;



for (currMenu = 0; currMenu < menu.length; currMenu++) with (menu[currMenu][0]) {

var str = '', itemX = 0, itemY = 0;



for (currItem = 1; currItem < menu[currMenu].length; currItem++) with (menu[currMenu][currItem]) {

var itemID = 'menu' + currMenu + 'item' + currItem;



var w = (isVert ? width : length);

var h = (isVert ? length : width);



if (isDOM || isIE4) {

str += '<div id="' + itemID + '" style="position: absolute; left: ' + itemX + '; top: ' + itemY + '; width: ' + w + '; height: ' + h + '; visibility: inherit; ';

if (backCol) str += 'background: ' + backCol + '; ';

str += '" ';

}

if (isNS4) {

str += '<layer id="' + itemID + '" left="' + itemX + '" top="' + itemY + '" width="' +  w + '" height="' + h + '" visibility="inherit" ';

if (backCol) str += 'bgcolor="' + backCol + '" ';

}

if (borderClass) str += 'class="' + borderClass + '" ';





str += 'onMouseOver="popOver(' + currMenu + ',' + currItem + ')" onMouseOut="popOut(' + currMenu + ',' + currItem + ')">';

str += '<table width="' + (w - 8) + '" border="0" cellspacing="0" cellpadding="' + (!isNS4 && borderClass ? 3 : 0) + '"><tr><td align="left" height="' + (h - 7) + '">' + '<a class="' + textClass + '" href="' + href + '"' + (frame ? ' target="' + frame + '">' : '>') + text + '</a></td>';

if (target > 0) {



menu[target][0].parentMenu = currMenu;

menu[target][0].parentItem = currItem;



if (popInd) str += '<td class="' + textClass + '" align="right">' + popInd + '</td>';

}

str += '</tr></table>' + (isNS4 ? '</layer>' : '</div>');

if (isVert) itemY += length + spacing;

else itemX += length + spacing;

}

if (isDOM) {

var newDiv = document.createElement('div');

document.getElementsByTagName('body').item(0).appendChild(newDiv);

newDiv.innerHTML = str;

ref = newDiv.style;

ref.position = 'absolute';

ref.visibility = 'hidden';

}



if (isIE4) {

document.body.insertAdjacentHTML('beforeEnd', '<div id="menu' + currMenu + 'div" ' + 'style="position: absolute; visibility: hidden">' + str + '</div>');

ref = getSty('menu' + currMenu + 'div');

}



if (isNS4) {

ref = new Layer(0);

ref.document.write(str);

ref.document.close();

}



for (currItem = 1; currItem < menu[currMenu].length; currItem++) {

itemName = 'menu' + currMenu + 'item' + currItem;

if (isDOM || isIE4) menu[currMenu][currItem].ref = getSty(itemName);

if (isNS4) menu[currMenu][currItem].ref = ref.document[itemName];

   }

}

with(menu[0][0]) {

ref.left = x;

ref.top = y;

ref.visibility = 'visible';

   }

}







var menu = new Array();



var defOver = '#333333', defBack = '#990000';



var defLength = 22;



menu[0] = new Array();

menu[0][0] = new Menu(false, '', 100, 83, 12, '#000000', '#000000', '', 'itemText');

menu[0][1] = new Item('  : EVENTS', '', '', 70, 20, 1);

menu[0][2] = new Item('  : ABOUT US', '', '', 80, 20, 2);

menu[0][3] = new Item('  : COLUMNISTS', '', '', 90, 20, 4);

menu[0][4] = new Item('  : WHERE TO GET IT', 'http://www.chicagoredeye.com/wheretogetit.htm', '', 110, 20, 0);

menu[0][5] = new Item('  : PLACE AN AD', 'http://www.chicagoredeye.com/classifieds.htm', '', 90, 20, 0);

menu[0][6] = new Item('  : REDEYE REWARDS', 'http://www.chicagoredeye.com/rewards.htm', '', 110, 20, 0);











// Events menu.

menu[1] = new Array();

menu[1][0] = new Menu(true, '>', 0, 10, 100, defOver, defBack, 'itemBorder', 'itemText');

menu[1][1] = new Item('Listings', 'http://www.chicagoredeye.com/listings.htm', '', defLength, 0, 0);

menu[1][2] = new Item('Photos', 'http://www.chicagoredeye.com/photos.htm', '', defLength, 0, 0);











// About us menu.

menu[2] = new Array();

menu[2][0] = new Menu(true, '>', 0, 10, 100, defOver, defBack, 'itemBorder', 'itemText');

menu[2][1] = new Item('Meet the Team', 'http://www.chicagoredeye.com/team.htm', '', defLength, 0, 0);

menu[2][2] = new Item('Current Campaign', 'http://www.chicagoredeye.com/cards.htm', '', defLength, 0, 0);









// REDEYE RAIDS

menu[3] = new Array();

menu[3][0] = new Item('', '#', '', defLength, 0, 0);









// Columnists menu.

menu[4] = new Array();

menu[4][0] = new Menu(true, '>', 0, 10, 125, defOver, defBack, 'itemBorder', 'itemText');

menu[4][1] = new Item('Laura Baron', 'http://www.chicagoredeye.com/baron.htm', '', defLength, 0, 0);

menu[4][2] = new Item('Mark Bazer', 'http://www.chicagoredeye.com/bazer.htm', '', defLength, 0, 0);

menu[4][3] = new Item('Maegan Carberry', 'http://www.chicagoredeye.com/carberry.htm', '', defLength, 0, 0);

menu[4][4] = new Item('Liz Crokin', 'http://www.chicagoredeye.com/crokin.htm', '', defLength, 0, 0);

menu[4][5] = new Item('Jimmy Greenfield', 'http://www.chicagoredeye.com/greenfield.htm', '', defLength, 0, 0);

menu[4][6] = new Item('Alison Neumer', 'http://www.chicagoredeye.com/neumer.htm', '', defLength, 0, 0);

menu[4][7] = new Item('Phillip Thompson', 'http://www.chicagoredeye.com/thompson.htm', '', defLength, 0, 0);

menu[4][8] = new Item('Whizzer', 'http://www.chicagoredeye.com/whizzer.htm', '', defLength, 0, 0);











// Subscribe menu.

menu[5] = new Array();

menu[5][0] = new Item('', '#', '', defLength, 0, 0);







// Classified menu.

menu[6] = new Array();

menu[6][0] = new Item('', 'http://www.chicagoredeye.com/classified.htm', '', defLength, 0, 0);







var popOldWidth = window.innerWidth;

nsResizeHandler = new Function('if (popOldWidth != window.innerWidth) location.reload()');



if (isNS4) document.captureEvents(Event.CLICK);

document.onclick = clickHandle;



function clickHandle(evt)

{

 if (isNS4) document.routeEvent(evt);

 hideAllBut(0);

}







function moveRoot()

{

 with(menu[0][0].ref) left = ((parseInt(left) < 100) ? 100 : 5);

}