
/*
* Creativyst(R) Eyelid Scroller:
*
*      (C) Copyright 2004 Creativyst, Inc.
*            ALL RIGHTS RESERVED
*
* Use of this software in running applications, with
* or without modification, is permitted provided
* that the conditions published at:
* http://www.creativyst.com/Prod/18/ClientEG/elCP.htm 
* are met.
*
*    This software may not be redistributed
*
*     - This comment may not be removed -
*
*
*/


/* Configurations:
*  elWidth         The width of the scroller
*  elHeight        The height of the scroller
*  elMoveIncr      How far to move on each frame closing
*  elOpenIncr      How far to move on each frame opening
*  elFrameRate     How often (in miliseconds) to move the frame
*  elPauseDelay    How long to pause (in milisecs) for each message
*  elUseBallistics  1 to slow down near end of scoll.
*
*  See below for how to add static and/or dynamic content for display
*
*/
var elWidth= 540;
var elHeight= 110;
var elMoveIncr=15;
var elOpenIncr = 10;
var elFrameRate = 60;       // was 40
var elPauseDelay = 15000;    // Maximum if elVaryPause
var elPauseMin = 10000;      // If elVaryPause
var elClosePause = 0;       // 0 for no pause
var elVaryPause = 1;        // Vary pause based on msg length
var elMiddle = 0;            // 1 for vertical middle, 0 for top


var elUseBallistics = 1;    // 0 for linear movers (not used)

var elContent=new Array();  // don't change
elContent[0] = "";


/* Static Content:
*  Fill elements of the elContent[] array with static messages you'd like
*  to display on the scroller.  You can use the eyelid scroller to
*  display only these static messages, or you can include a static
*  message or two to be displayed along with dynamic JSMsg feed data (see below).
*
*  Delete or comment out these array lines (but not the above declaration)
*  if you don't want to display static messages.
*
*  elContent[0]="\"\"<br><br> - ";
*/

elContent[0]="\"This is way too late, but I wanted to let you know just how much I appreciated all the hard work you obviously put into CigarFest 2006. It was simply fantastic. The cigars ... Oh, the cigars! And the giveaways! And the food! And the special deals! And the girls! Oops, I’m not supposed to say that. Anyway, besides all that it was just great to be in a room with so many fellow cigar-smokers. It feels lonely sometimes! Met friends there, and made some new ones. Thanks for a terrific experience, and count me in for next year!\"<br><br> - JL of Bethlehem, PA";
elContent[1]="\"Just wanted to let you know that I went to the Cigar event this weekend. First time. It was great. You guys did a great job. Appreciate all the cigars, food and everything else.\"<br><br> - DR of Robesonia, PA";
elContent[2]="\"What a great event you guys put on. I was honored to be a part of it and your whole crew should be very proud of the job you all did. You guys were ROCK STARS!! Thanks again and I hope you have it at the same place next year......the venue was perfect IMO!\"<br><br> - SF of Hackettstown, NJ";
elContent[3]="\"I never realized how much I would like 'aromatherapy'. What a great event! Thanks and congratulations.\"<br><br> - JG of Elmira, NY";
elContent[4]="\"This year’s CigarFest was awesome!!! It was a great time and well worth the money. The venue was perfect. I hope that you choose Split Rock for next year’s fest.\"<br><br> - BB of Richmond VA";
elContent[5]="\"We had a great time at Cigarfest 2006. You and your crew did an outstanding job coordinating this entire event! Thank you for providing us a place to meet like-minded people. Everyone on your staff was excellent. Again, thank you for everything! You are an excellent host.\"<br><br> - MV of Chesapeake VA";
elContent[6]="\"I'm struggling with how to explain to you what an incredibly awesome time I had at this years CigarFest. Being that I've been a huge NASCAR fan since 1979 being at this years CigarFest, my first, was like hanging out with all the great drivers only these were Cigar Stars! Let's just say Saturday was... well... Unbelievable!!! Nick Perdomo, Philip Wynne, Aylin Ozgener, Charlie Torano... WOW!\"<br><br> - JK of Norfolk, VA";
elContent[7]="\"Cigar Fest was awesome!!! It was my first but not my last!!! Plan to make it an annual event!!!\"<br><br> - MP of Fleetwood, PA";
elContent[8]="\Hi, this was my first CigarFest. It was well worth the 800 mile drive from Rockford, IL. The food and entertainment was great and the cigars, cigars, cigars. Had a great time and stopped by your store on Monday in Bethlehem. Your store is also great. Better than any I have found out in the Chicago area yet. Look forward to finding out when next year's show will be, hope to see you all there.\"<br><br> - BM of Rockford, IL";
elContent[9]="\"I want to thank everyone from CI for making this year better then last. I can't wait till next year.\"<br><br> - BV of Rutherford, NJ";
elContent[10]="\"Awesome for the weekend! Absolutely fantastic CigarFest! This was my third one and this was the best ever. They just seem to keep getting better and better and i just can't wait for you to announce the next one for next year. It was great!\"<br><br> - JC of Salisbury, MD";
elContent[11]="\"I would just like to thank all those responsible for yet another fantastic herf fest! Leaps and bounds over last years effort, can’t wait for next year!! Thanks again, keep up the good work!!\"<br><br> - MB of Forte Meade, MA";
elContent[12]="\"To all the management & staff at CI, a ' HEARTFELT THANK YOU ' . The event was very well planned and and it was great talking to many of you. Job well done. Great time at 'After Fest Party' also.\"<br><br> - RM of Willow Grove, PA";
elContent[13]="\"CigarFest was great!!! I think you put together a fantastic show at a great price... It was even better than last year's!! I will never miss a CigarFest if I can help it!!!!! GREAT JOB GUYS!!!! You outdid yourselves again and I can’t wait to see what happens next year!\"<br><br> - TS of Harrisburg, PA";
elContent[14]="\"Great bags.  Lots of great cigars.  Worth the 700 mile drive!\"<br><br> - DK of Chicago,IL";
elContent[15]="\"The Fest was over the top. It was really great to meet the fine folks I got to meet.\"<br><br> - RO of Groton, MA";
elContent[16]="\"CigarFest '06…This is our 2nd trip to CigarFest….by far much better than '05.  Looking forward to '07.  GREAT JOB!  See ya next year.\"<br><br> - BMS of Fort Drum, NY";
elContent[17]="\"My first C-Fest definitely lived up to it's reputation.  This was a 'wicked awsome party!'\"<br><br> - BP of Hull, MA";
elContent[18]="\"It's amazing how each year the staff at CI/Cbid puts together such a memorable event! All the employees and vendors were very relaxed and having fun which showed again how well organized everything was. Oh and the cigars...Just entering and recieving the great door prizes was worth the admission alone. I looking forward to Cfest 07!!!!!!\"<br><br> - Strider32";
elContent[19]="\"Best ever CigarFest.  I've never seen so many great vendors under one roof!\"<br><br> - MP of Chicago, IL";
elContent[20]="\"This is my 3rd 'Fest and by far it has been the BEST!  Great job!\"<br><br> - ERG of Holland Twp, NJ";
elContent[21]="\"Always worth the trip.  Thanks.\"<br><br> - ED of Baldwin, NY";
elContent[22]="\"Thank You To ALL!!!!  I'm glad I went and I can't wait to do it again next year.  I thought thre facility at Split Rock worked out rather well and could probably handle a few more people. The only real line I found was for the Victor Sinclair fresh roll.  Also, Thank You for opening the doors at 1. That worked perfect and attributed to keeping the lines down.  What about a semi-annual event??? LOL!!! :)\"<br><br> - SeriesR#6";
elContent[23]="\"Bigger and even better than last year!! Great selection of cigars and loved the humidor they came in. Everything about this year's event was just super. Can't wait until next year.\"<br><br> - JM of Cumbola, PA";
elContent[24]="\"Great herf again!  Bring a herf to the USS Intrepid in NYC!\"<br><br> - TM of Peeksill, NY";
elContent[25]="\"Missed last year, but made it in '06.  What a time!  Never had so much cigar fun.  Will for sure be back in '07.  Thanks to all responsible.\"<br><br> - TT	of Mansfield, OH";
elContent[26]="\"Great times.  Keep it up!\"<br><br> - DGK of Owings Mills, MO";
elContent[27]="\"The show was incredible.  My first time here…had a ball.  Will do it again.\"<br><br> - APB of Red Lion, PA";
elContent[28]="\"This has been the BEST CigarFest yet!  More room than the past 3 years.  I love the work you all have done.  Great job!!\"<br><br> - BVB of Bethlehem, PA";
elContent[29]="\"Everything about C-Fest this year was phenomenal! The Split Rock venue, Saturday brunch, the humidors, duffel bags, logistics of the lines, food, entertainment, vendors and CIGARS! The whole thing was great!   Kudos to the CI Team for putting huge smiles on many, many faces!   THANKS to all of you!!\"<br><br> - tchap";
elContent[30]="\"Miss October was great.  Keep it up!\"<br><br> - SGD of Oceanside, NY";
elContent[31]="\"Just wanted to let you know that my friends & myself enjoyed the festivites at cigarfest 2006. We are looking forward to next years already. Good smokes, good times & good company. Thanks.\"<br><br> - DW of Woodbine, MD";

/* Dynamic Content (JSMsg feeds):
*  JSMsgNS     
*      Namespace of the JSMsg feed who's messages you'd
*      like to display.  You must include the JSMsg
*      link in a JavaScript tag ABOVE this
*      script.
*
*      You may display messages from multiple JSMsg feeds
*      by listing multiple namespaces in the JSMsgNS variable.
*      e.g.  
*
*          JSMsgNS = "niq cvtnew"; 
*
*      Leave this set to JSMsgNS = ""; if you only need
*      to display static messages from the above arrays.
*
*  JSMsgSeq
*      Messages from muliple newsfeeds are normally interleaved
*      but they can be sequential by setting the JSMsgSeq variable
*      to 1
*
*/
var JSMsgNS = "";
var JSMsgSeq = 0;


/* ==========================================================================
* End of user configurable variables
* ==========================================================================
*/


var bsOrgArray = new Array(); bsOrgArray[0] = ""; var elCur_i = 0; var DOMObjC; var DOMObjT; var DOMObjB; var IEObj; var NS4xObj; var BalIncr = elMoveIncr; var elBeenHere; var elMousePaused = 0; var MessagePaused = 0; var MsgPauseNow = elPauseDelay; var bsISRWaiting = 0; var elSmallestContent = 0; var elBiggestContent = 0; var elBiggestDif = 0; var elState = 0; var Globi = 0; var elMPCount = 0; var elCritical = 0; function elInitialize()
{ var divobj; var cpyi; if(!elBeenHere) { elBeenHere = 1; setTimeout("elInitialize()", 1100); return;}
else { for(cpyi = 0;cpyi < elContent.length;cpyi++) { bsOrgArray[cpyi] = elContent[cpyi];}
if(!elClosePause) { elClosePause = 1;}
if(!elOpenIncr) { elOpenIncr = elMoveIncr;}
elContent = JSMsgIf(elContent, JSMsgNS, JSMsgSeq); elSizeContent(); if(document.getElementById) { divobj = document.getElementById('ScrollerFrame'); divobj.style.width = elWidth + 'px'; divobj.style.height = elHeight + 'px'; divobj = document.getElementById('elWindow'); divobj.style.width = elWidth + 'px'; divobj.style.height = elHeight + 'px'; divobj = document.getElementById('elCWindow'); divobj.style.width = elWidth + 'px'; divobj.style.height = elHeight + 'px'; divobj.style.zIndex = 1; DOMObjC = divobj; divobj = document.getElementById('elTLid'); divobj.style.width = elWidth + 'px'; divobj.style.height = elHeight + 'px'; divobj.style.zIndex = 2; DOMObjT = divobj; divobj = document.getElementById('elBLid'); divobj.style.width = elWidth + 'px'; divobj.style.height = elHeight + 'px'; divobj.style.zIndex = 3; DOMObjB = divobj; DOMObjT.style.top = (elHeight*(-1)) + 'px'; DOMObjB.style.top = '0px'; DOMObjC.style.top = ((elHeight*2) * (-1)) + 'px'; moverDOM();}
else if(document.all) { ScrollerFrame.style.width = elWidth; IEObj=eval(elCWindow); IEObj.style.pixelTop=((elHeight*2) * (-1)); moverIE();}
else if(document.layers) { NS4xObj=document.elSlideWindow.document.elContentWindow; moverNS4x();}
}
}
function moverDOM()
{ var reducer, tmp, tmpT, tmpB; var TTop = parseInt(DOMObjT.style.top); var BTop = parseInt(DOMObjB.style.top); Globi++; if(!elState) { if(elMousePaused) { elMPCount++; if(elMPCount > 500) { elMousePaused = 0;}
setTimeout("moverDOM()", elFrameRate); return;}
elState = 1; setTimeout("moverDOM()", elFrameRate);}
else if(elState == 1) { tmp = elHeight / 2; tmp += elMoveIncr; tmp *= (-1); if(BTop <= tmp) { elState = 2; setTimeout("moverDOM()", elClosePause); return;}
else { tmpB = BTop - elMoveIncr; DOMObjB.style.top = tmpB + "px"; tmpT = TTop + elMoveIncr; DOMObjT.style.top = tmpT + "px"; setTimeout("moverDOM()", elFrameRate);}
}
else if(elState == 2) { if(elCritical) { setTimeout("moverDOM()", elFrameRate);}
if(elMiddle) { DOMObjC.innerHTML = '<table height="100%"><tr><td>' + elContent[elCur_i] + '<\/td><\/tr><\/table>';}
else { DOMObjC.innerHTML = elContent[elCur_i];}
elState = 3; tmpB = BTop + elOpenIncr; DOMObjB.style.top = tmpB + "px"; tmpT = TTop - elOpenIncr; DOMObjT.style.top = tmpT + "px"; setTimeout("moverDOM()", elClosePause); return;}
else if(elState == 3) { if(BTop >= 0) { elState = 0; tmp = elGetOpenDelay(); elCur_i++; if(elCur_i >= elContent.length) { elCur_i = 0;}
setTimeout("moverDOM()", tmp); return;}
else { tmpB = BTop + elOpenIncr; DOMObjB.style.top = tmpB + "px"; tmpT = TTop - elOpenIncr; DOMObjT.style.top = tmpT + "px"; setTimeout("moverDOM()", elFrameRate);}
}
}
function moverIE()
{ var tmp; if(elMiddle) { IEObj.innerHTML = '<table height="100%"><tr><td>' + elContent[elCur_i] + '<\/td><\/tr><\/table>';}
else { IEObj.innerHTML = elContent[elCur_i];}
elCur_i++; if(elCur_i >= elContent.length) { elCur_i = 0;}
elState = 0; tmp = elGetOpenDelay(); setTimeout("moverIE()", tmp);}
function moverNS4x()
{ NS4xObj.document.write( elContent[elCur_i] ); NS4xObj.document.close(); elCur_i++; if(elCur_i >= elContent.length) { elCur_i = 0;}
elState = 0; tmp = elGetOpenDelay(); setTimeout("moverNS4x()", tmp);}
function elGetOpenDelay()
{ var tmp; var thisdif; if(elVaryPause) { thisdif = elContent[elCur_i].length - elSmallestContent; tmp = thisdif / elBiggestDif; tmp = elPauseDelay * tmp; tmp = parseInt(tmp); if(tmp < elPauseMin) { tmp = elPauseMin;}
return(tmp);}
return(elPauseDelay);}
function elSizeContent()
{ var cpyi; elSmallestContent = 5000; elBiggestContent = 0; for(cpyi = 0;cpyi < elContent.length;cpyi++) { if(elContent[cpyi].length < elSmallestContent) { elSmallestContent = elContent[cpyi].length;}
if(elContent[cpyi].length > elBiggestContent) { elBiggestContent = elContent[cpyi].length;}
}
elBiggestDif = elBiggestContent - elSmallestContent;}
function elChangeFeeds(newJSMsgNS)
{ elCritical = 1; elContent.length = 0; JSMsgNS = newJSMsgNS; elContent = JSMsgIf(elContent, JSMsgNS, JSMsgSeq); elSizeContent(); elCur_i = 0; elCritical = 0;}
function MousePause()
{ elMousePaused = 1;}
function MouseStart()
{ elMousePaused = 0;}
function RunScroller()
{ var msg; msg = ''; msg += '<div ID="ScrollerFrame">'; if(!document.getElementById && !document.all) { msg += '<ilayer name="elSlideWindow" width="' + elWidth + '"; height="' + elHeight + '";>\n'; msg += '<layer name="elContentWindow" width="' + elWidth + '"; onMouseover="MousePause();" onMouseout="MouseStart();">'; msg += '<\/layer>'; msg += '<\/ilayer>';}
document.write(msg); if (document.getElementById || document.all) { document.write('<div id="elWindow" class="elWindow" style="position:relative;overflow:hidden;width:' +elWidth+ ';height:' +elHeight+ ';clip:rect(0 ' +elWidth+ ' ' +elHeight+ ' 0);" onMouseover="MousePause();" onMouseout="MouseStart();">'); document.write('<div id="elTLid" class="elTLid" style="position:relative;height:0;width:' +elWidth+ ';"><\/div>'); document.write('<div id="elBLid" class="elBLid" style="position:relative;height:0;width:' +elWidth+ ';"><\/div>'); document.write('<div id="elCWindow" class="elCWindow" style="position:relative;"><\/div>'); document.write('<\/div>');}
document.write('<\/div>'); elInitialize();}
function JSMsgIf(msgAr, myNs, mySeq)
{ var TotNS,LongestNS; var NSAr = new Array(); var i,j,k,o; if(!myNs) { myNs = "";}
if(!mySeq) { mySeq = 0;}
o = msgAr.length; if(myNs) { NSAr = myNs.split(" "); TotNS = NSAr.length; LongestNS = 0; j = 0; for(i = 0;i < TotNS;i++) { j = jsmMetaMsg(NSAr[i], "MetaCount"); if(j > LongestNS) { LongestNS = j;}
}
if(!j) { return(msgAr);}
k = o; if(mySeq) { for(j = 0;j < TotNS;j++) { for(i = 0;i < LongestNS;i++) { if(jsmMetaMsg(NSAr[j],"MetaCount") <= i) { continue;}
msgAr[k] = jsmGetN(NSAr[j], "LinkTitle", i); if(!msgAr[k]) { msgAr[k] = jsmGetN(NSAr[j], "Body", i); msgAr[k] += "<BR>   -"; t = jsmGetN(NSAr[j], "Attrib",i); if(t.length > 17) { t = t.substr(0,14); t += "...";}
msgAr[k] += t;}
msgAr[k] = msgAr[k].replace(/&/g, "&"); msgAr[k] = msgAr[k].replace(/&apos;/g, "\'"); k++;}
}
}
else { for(j = 0;j < LongestNS;j++) { for(i = 0;i < TotNS;i++) { if(jsmMetaMsg(NSAr[i],"MetaCount") <= j) { continue;}
msgAr[k] = jsmGetN(NSAr[i], "LinkTitle", j); if(!msgAr[k]) { msgAr[k] = jsmGetN(NSAr[i], "Body", j); msgAr[k] += "<BR>   -"; t = jsmGetN(NSAr[i], "Attrib",j); if(t.length > 17) { t = t.substr(0,14); t += "...";}
msgAr[k] += t;}
msgAr[k] = msgAr[k].replace(/&/g, "&"); msgAr[k] = msgAr[k].replace(/&apos;/g, "\'"); k++;}
}
}
}
return(msgAr);}
function jsmGetN(ns,MsgPart,number)
{ var rv, c, er; c = "rv = " + ns + ".GetN('" + MsgPart + "'," + number + ");"; er = eval(c); return(rv);}
function jsmGet(ns,MsgPart,offset)
{ var rv, c, er; c = "rv = " + ns + ".Get('" + MsgPart + "'," + offset + ");"; er = eval(c); return(rv);}
function jsmGetDay(ns,MsgPart)
{ var rv, c, er; c = "rv = " + ns + ".GetDay('" + MsgPart + "');"; er = eval(c); return(rv);}
function jsmMetaMsg(ns,MsgPart)
{ var rv, c, er; c = "rv = " + ns + ".MetaMsg('" + MsgPart + "');"; er = eval(c); return(rv);}
RunScroller(); 
