// JavaScript Document

function domticker(content, divId, divClass, delay, fadeornot){
this.content=content
this.tickerid=divId //ID of master ticker div. Message is contained inside first child of ticker div
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over ticker (and pause it if it is)
this.pointer=1
this.opacitystring=(typeof fadeornot!="undefined")? "width: 100%; filter:progid:DXImageTransform.Microsoft.alpha(opacity=100); -moz-opacity: 1" : ""
if (this.opacitystring!="") this.delay+=500 //add 1/2 sec to account for fade effect, if enabled
this.opacitysetting=0.2 //Opacity value when reset. Internal use.
document.write('<div id="'+divId+'" class="'+divClass+'"><div style="'+this.opacitystring+'">'+content[0]+'</div></div>')
var instanceOfTicker=this
setTimeout(function(){instanceOfTicker.initialize()}, delay)
}

domticker.prototype.initialize=function(){
var instanceOfTicker=this
this.contentdiv=document.getElementById(this.tickerid).firstChild //div of inner content that holds the messages
document.getElementById(this.tickerid).onmouseover=function(){instanceOfTicker.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){instanceOfTicker.mouseoverBol=0}
this.rotatemsg()
}

domticker.prototype.rotatemsg=function(){
var instanceOfTicker=this
if (this.mouseoverBol==1) //if mouse is currently over ticker, do nothing (pause it)
setTimeout(function(){instanceOfTicker.rotatemsg()}, 100)
else{
this.fadetransition("reset") //FADE EFFECT- RESET OPACITY
this.contentdiv.innerHTML=this.content[this.pointer]
this.fadetimer1=setInterval(function(){instanceOfTicker.fadetransition('up', 'fadetimer1')}, 100) //FADE EFFECT- PLAY IT
this.pointer=(this.pointer<this.content.length-1)? this.pointer+1 : 0
setTimeout(function(){instanceOfTicker.rotatemsg()}, this.delay) //update container
}
}

// -------------------------------------------------------------------
// fadetransition()- cross browser fade method for IE5.5+ and Mozilla/Firefox
// -------------------------------------------------------------------

domticker.prototype.fadetransition=function(fadetype, timerid){
var contentdiv=this.contentdiv
if (fadetype=="reset")
this.opacitysetting=0.2
if (contentdiv.filters && contentdiv.filters[0]){
if (typeof contentdiv.filters[0].opacity=="number") //IE6+
contentdiv.filters[0].opacity=this.opacitysetting*100
else //IE 5.5
contentdiv.style.filter="alpha(opacity="+this.opacitysetting*100+")"
}
else if (typeof contentdiv.style.MozOpacity!="undefined" && this.opacitystring!=""){
contentdiv.style.MozOpacity=this.opacitysetting
}
else
this.opacitysetting=1
if (fadetype=="up")
this.opacitysetting+=0.2
if (fadetype=="up" && this.opacitysetting>=1)
clearInterval(this[timerid])
}

var tickercontent=new Array()
tickercontent[0]='<br /><strong>SAGE NORTH AMERICA</strong><br /><br />"We used the "Genuinely Penned" font to launch a new product to our customers. It not only provided a very personal touch for our customers, it also stood out in the mail from everything else. We had one of the largest responses we have ever seen!"<br /><br /><i>Marketing Manager, Jeremy Ploessel</i>'
tickercontent[1]='<br /><strong>LANDRY & ASSOCIATES</strong><br /><br />"It is without hesitation that I can recommend dmh Marketing Partners… They have consistently exceeded all of our performance expectations… If you are serious about generating a maximum direct response with any campaign… then it would be wise to consider the service of dmh Marketing Partners as a part of your marketing game plan."<br /><br /><i>President, Paul Landry</i>'
tickercontent[2]='<br /><strong>NATIONAL NON-PROFIT</strong><br /><br />"The best font I have ever seen… the quality surpasses anything I\'ve seen. Turn times were met on time and the price is unbelievable."<br /><br /><i>Development Director, Rodger McKnight</i>'
tickercontent[3]='<br /><strong>COVENANT HOUSE</strong><br /><br />"Thank you for the holiday greetings. And thank you for the great work that you have done for us these past couple of years. You\'re very reliable and professional and I\'ve worked with enough people to know how exceptional that makes you. Covenant House does great work with kids and we can only do that because of great people like you who help get our fundraising mail out."<br /><br /><i>SVP, Direct Marketing, Joan H. Smyth Dengler</i>'
tickercontent[4]='<br /><strong>CHRIST FOR ALL NATIONS</strong><br /><br />"It really is a pleasure to work with you. Your commitment and excellence in service helps to contribute toward the heart and goal of CfaN\'s Mission. "Winning Millions to Christ."<br /><br /><i>Project Manager, Brad Braland</i>'
tickercontent[5]='<br /><strong>REYNOLDS ACADEMY</strong><br /><br />"It is without hesitation that I recommend dmh Marketing Partners for anyone who is serious about increasing their ROI on direct mail."<br /><br /><i>Tom Delaney</i>'
tickercontent[6]='<br /><strong>ADVOCACE MEDIA, LLC</strong><br /><br />"Our consulting firm helps faith-based non-profits increase income.  We\'re using dmh Marketing\'s Genuinely Penned process to dramatically improve the response rates for direct mail projects designed to raise funds for our clients.  The end product looks great and everyone at dmh has been very responsive, professional and easy to work with.  Most importantly, we\'ve seen response rates soar! It is not uncommon to see response rates triple when using Genuinely Penned."<br /><br /><i>Senior Development Counselor, Jerry Grimes</i>'
tickercontent[7]='<br /><strong>D DANIEL ADVERTISING AGENCY</strong><br /><br />"Since partnering with dmh Marketing Partners, the results from our direct mailers have literally tripled.  The personalized touch of their Genuinely Penned products has taken our clients to a whole new level of marketing success.  We\'ve done nearly 100 jobs with dmh in the last 18 months and we\'ve been very pleased every time."<br /><br /><i>Vice President of Sales, Jeremy Paulovich</i>'
