
/***********************************************
* George's Expandable Ticker- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//configure tickercontents[] to set the messges you wish be displayed (HTML codes accepted)
var tickercontents=new Array()
tickercontents[0]='<a href="http://www.redcross.org" target="_new"><img src="images_templ/tsunami_relief.gif" width="300" height="56" border="0"></a><table width="300" border="0" cellspacing="0" cellpadding="5"><tr valign="top"><td width="150"> <p><strong><font color="#0066FF" size="2">5% gross</font></strong> of all schools booked through March 30 2005 will go directly to American Red Cross Tsunami Appeal.</p></td><td width="150"><p><font color="#FF6600" size="2"><strong>5% of all custom club sales</strong></font> will also go to the Red Cross Tsunami Appeal.</p></td></tr><tr><td colspan="2"><p class="topdots">We hope that all Golf Schools throughout the USA consider assisting the ravaged nations by donating a percentage of their income throughout the coming months.</p></td></tr></table>'
//tickercontents[1]='<img src="images_templ/valentine_special.jpg" width="300" height="56"><table width="300" border="0" cellspacing="0" cellpadding="0"><tr><td><p>Purchase a <strong>Gift Certificate for Valentine\'s Day</strong> and we will extend your school to include AN EXTRA DAY !!</p> <p class="topdots"> We will upgrade your 3 day school to a 4 DAY ULTIMATE SCHOOL !! The regular cost for the Four Day Ultimate School is $995.Your Gift certificate for your 4 day school will cost you just....... <font color="#E00000" size="3"><strong>$695! </strong></font></p></td></tr><tr><td><p class="topdots">This is a savings of <strong>$300</strong>!! All schools will be directed by Jason Denaro Ph.D</p><p>Certificates ordered prior to Feb. 14 2005 will be donated directly to American Red Cross Tsunami Appeal. <strong>Your Gift Certificate can be used for one year up to Valentine\'s Day 2006.</strong></p></td></tr></table>'


//specify how many characters of a message (for each msg) to show in expanded menu:
var charslimit=30

//Below specifies the "expand text". Do not remove onClick=".." portion.
var expandtext='<p><a href="#" onClick="dropdownit(event);return false">Click here to see all Specials.</a> <img src="images_templ/submenu.gif" border=0></p>'

//configure below variables to set dimensions and main color of the ticker
var tickerwidth='300px'
var tickerheight='200px' //not including "Expand" text
var tickerbgcolor='#ffffff'

//configure the below variable to determine the delay between ticking of messages (in miliseconds)
var tickdelay=10500

////Do not edit pass this line////////////////

var ie4=document.all || navigator.userAgent.search(/opera.7/i)!=-1 //lump Opera 7 with IE
var ns6=document.getElementById && !document.all && !window.opera
var ns4=document.layers

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

if (ns4){
expandtext=expandtext.replace(/dropdownit\(event\); *return false/gi, "return dropdownitNS4(event,this)")
tickerheightNS4=parseInt(tickerheight)+19
tickerlistheightNS4=tickerheight
}

var currentmessage=0
var tickercontentstotal=''

if (ie4||ns6) //OUTPUT DROP DOWN MENU
document.write('<div id="tickerexpand" class="expandmenu" style="visibility:hidden"></div>')

function rotatecontent(){
if (ns4){ //OUTPUT HTML for ticker area for NS4
tickerobj.document.tickernssub.document.write(tickercontents[currentmessage]+'')
tickerobj.document.tickernssub.document.close()
}
else if (ie4||ns6){
tickerobj.innerHTML=tickercontents[currentmessage]
previousmessage=(currentmessage==0)? tickercontents.length-1 : currentmessage-1
tickerexpand_item=ns6? document.getElementById("expand"+currentmessage) : eval("expand"+currentmessage)
tickerexpand_previousitem=ns6? document.getElementById("expand"+previousmessage) : eval("expand"+previousmessage)
tickerexpand_previousitem.className=""
tickerexpand_item.className="expandmenu_highlight"
}
currentmessage=(currentmessage==tickercontents.length-1)? 0 : currentmessage+1
rotatemsgtimer=setTimeout("rotatecontent()",tickdelay)
}

function dropdownit(e){
if (ns6) e.stopPropagation()
else e.cancelBubble=true
tickerexpandobj.style.visibility=tickerexpandobj.style.visibility=="hidden"? "visible" : "hidden"
expandbuttonLeft=ns6? e.pageX-e.layerX : ietruebody().scrollLeft+event.clientX-event.offsetX
expandbuttonTop=ns6? e.pageY-e.layerY : ietruebody().scrollTop+event.clientY-event.offsetY
tickerexpandobj.style.left=expandbuttonLeft+"px"
tickerexpandobj.style.top=expandbuttonTop+expandbuttonobj.offsetHeight-3+"px"
}

function dropdownitNS4(e, currentobj){
tickerexpandobj.left=tickerobj.pageX
tickerexpandobj.top=tickerobj.pageY+parseInt(tickerlistheightNS4)+tickerobj.document.expandbuttonNS4.document.height
tickerexpandobj.visibility=(tickerexpandobj.visibility=="hide")? "show" : "hide"
return false
}

function jumptomsg(whichmsg){
clearTimeout(rotatemsgtimer)
if (ie4||ns6)
tickerexpand_item.className=""
currentmessage=whichmsg
rotatecontent()
}

function initialize_ticker(){
if (ns4) document.tickernsmain.visibility="show"
tickerobj=ie4? tickerlist : ns6? document.getElementById("tickerlist") : ns4? document.tickernsmain : ""
tickerexpandobj=ie4? tickerexpand : ns6? document.getElementById("tickerexpand") : ns4? document.expandlayer : ""
expandbuttonobj=ie4? expandbutton : ns6? document.getElementById("expandbutton") : ""
for (i=0;i<tickercontents.length;i++){ //get total scroller contents
tempstringcontainer=tickercontents[i].replace(/\<[^\>]+\>/g, ''); //remove HTML tags
tickercontentstotal+='<div id="expand'+i+'">- <a href="javascript:jumptomsg('+i+')">'+tempstringcontainer.substring(0, charslimit)+'...</a></div>'
}
if (ie4||ns6){
tickerexpandobj.innerHTML=tickercontentstotal
expandbuttonobj.innerHTML=expandtext
document.onclick=function(){
tickerexpandobj.style.visibility="hidden"
}
}
else if (ns4){
tickerexpandobj.document.write(tickercontentstotal)
tickerexpandobj.document.close()
tickerexpandobj.clip.width=parseInt(tickerwidth)*0.9
tickerobj.document.expandbuttonNS4.document.write(expandtext)
tickerobj.document.expandbuttonNS4.document.close()
tickerexpandobj.captureEvents(Event.CLICK)
tickerexpandobj.onclick=function(){
tickerexpandobj.visibility="hide"
}
}
rotatecontent()
}

if (ie4||ns6) //OUT HTML FOR TICKER AREA for IE/NS6
document.write('<table id="tickerarea" border="0" style="width:'+tickerwidth+';" bgcolor="'+tickerbgcolor+'" cellspacing="0" cellpadding="0"><tr><td id="tickerlist" width="100%" height="'+tickerheight+'" style="padding-left:3px" valign="top"></td></tr><tr><td width="90%"><div id="expandbutton" style="position:relative"></div></td></tr></table>')

window.onload=initialize_ticker



<!-- Begin
function emailCheck (emailStr) {

var checkTLD=1;

/* The following is the list of known TLDs that an e-mail address must end with. */

var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;

/* The following pattern is used to check if the entered e-mail address
fits the user@domain format.  It also is used to separate the username
from the domain. */

var emailPat=/^(.+)@(.+)$/;

/* The following string represents the pattern for matching all special
characters.  We don't want to allow special characters in the address. 
These characters include ( ) < > @ , ; : \ " . [ ] */

var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";

/* The following string represents the range of characters allowed in a 
username or domainname.  It really states which chars aren't allowed.*/

var validChars="\[^\\s" + specialChars + "\]";

/* The following pattern applies if the "user" is a quoted string (in
which case, there are no rules about which characters are allowed
and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
is a legal e-mail address. */

var quotedUser="(\"[^\"]*\")";

/* The following pattern applies for domains that are IP addresses,
rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
e-mail address. NOTE: The square brackets are required. */

var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;

/* The following string represents an atom (basically a series of non-special characters.) */

var atom=validChars + '+';

/* The following string represents one word in the typical username.
For example, in john.doe@somewhere.com, john and doe are words.
Basically, a word is either an atom or quoted string. */

var word="(" + atom + "|" + quotedUser + ")";

// The following pattern describes the structure of the user

var userPat=new RegExp("^" + word + "(\\." + word + ")*$");

/* The following pattern describes the structure of a normal symbolic
domain, as opposed to ipDomainPat, shown above. */

var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");

/* Finally, let's start trying to figure out if the supplied address is valid. */

/* Begin with the coarse pattern to simply break up user@domain into
different pieces that are easy to analyze. */

var matchArray=emailStr.match(emailPat);

if (matchArray==null) {

/* Too many/few @'s or something; basically, this address doesn't
even fit the general mould of a valid e-mail address. */

alert("Email address seems incorrect (check @ and .'s)");
return false;
}
var user=matchArray[1];
var domain=matchArray[2];

// Start by checking that only basic ASCII characters are in the strings (0-127).

for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
alert("Ths username contains invalid characters.");
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("Ths domain name contains invalid characters.");
return false;
   }
}

// See if "user" is valid 

if (user.match(userPat)==null) {

// user is not valid

alert("The username doesn't seem to be valid.");
return false;
}

/* if the e-mail address is at an IP address (as opposed to a symbolic
host name) make sure the IP address is valid. */

var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {

// this is an IP address

for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("Destination IP address is invalid!");
return false;
   }
}
return true;
}

// Domain is symbolic name.  Check if it's valid.
 
var atomPat=new RegExp("^" + atom + "$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {
alert("The domain name does not seem to be valid.");
return false;
   }
}

/* domain name seems valid, but now make sure that it ends in a
known top-level domain (like com, edu, gov) or a two-letter word,
representing country (uk, nl), and that there's a hostname preceding 
the domain or country. */

if (checkTLD && domArr[domArr.length-1].length!=2 && 
domArr[domArr.length-1].search(knownDomsPat)==-1) {
alert("The address must end in a well-known domain or two letter " + "country.");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("This address is missing a hostname!");
return false;
}

// If we've gotten this far, everything's valid!
return true;
}

//  End -->