﻿     
var text = 0;

var message=new Array();
  message[0] = "Sign up for Print Oasis 2009 Print Buyers Conference May 17-19 Phoenix, AZ"
  message[1] = "Special Report: Budgeting for Print in 2009"
  message[2] = "Gain Access to over 3000 articles, tips and Q&A's for print buyers"
  message[3] = "Next educational Roadshow - Concord, New Hampshire Oct. 9, 2008"
  message[4] = "New! Best Practices for Sustainability in Print Certification"

var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["images/banner/banner1.jpg", "Join.aspx", ""] //plain image syntax
fadeimages[1]=["images/banner/banner3.jpg", "http://www.pcpi.org/pcpi/ProfessionalCertification.aspx", "_self"] //image with link and target syntax
fadeimages[2]=["images/banner/banner4.jpg", "http://www.pcpi.org/pcpi", "_self"] //image with link and target syntax
// fadeimages[1] = ["images/banner/banner2.jpg", "http://www.printoasis.com/printoasis", "_self"] //image with link syntax

function getQuote() {
var r_text = new Array ();
r_text[0] = "“The leaders in the industry will understand, embrace and adopt sustainability in their business model in order to remain viable.” <br><i>Tim Traub, National Account Manager, Outlook Group Corp</i>";
r_text[1] = "“A print company's collateral material is their portfolio. I look at their collateral as a potential reflection of the quality of work they would produce for me as a client.” <br><i>Valerie Cox, Designer, American Student Assistance</i>";
r_text[2] = "“Green issues and sustainability have been hot topics within our company for a number of years now, but recently, more guidelines have been put in place regarding FSC paper usage for print projects.” <br><i>Melissa Weber, Sr. Print Buyer, HSBC</i>";
r_text[3] = "“I've seen interest grow from 0% of customers to 20% of customers in the past year.” <br><i>Mike Davis, CEO, Theo Davis Printing</i>";
r_text[4] = "“We've realized our greatest savings through more careful strategizing such as using versioning and variable data. We've fine‐tuned our print order quantities. We've also become more adept at matching jobs with vendor capabilities.”<br><i>Hal Garstein,Director, Manufacturing and Distribution, The Deal, LLC</i>";
r_text[5] = "“Printers have to be qualified before we print with them. It makes things go more smoothly, and the printer is able to supply a more accurate quote once they know more about our work, or to honorably decline to work with us if they don't feel their company has sufficient capability.”<br><i>Ulfras, Production Manager, NCSDO</i>";
r_text[6] = "“I feel the Obama Administration is going to negatively impact my business, and most businesses, by increasing corporate tax rates, increasing regulation and various other environmental initiatives. This is going to make the cost of doing business go up, causing many industries to cut jobs.”<br><i>Tim, Print Buyer</i>";
r_text[7] = "“Professional networking is very important. The easier we make it for our peers to communicate with us, the easier it is to stay on top of industry trends and share quickly changing market information.”<br><i>David Strawn, Sr. Purchasing Agent</i>";
r_text[8] = "“It is important to know how your representative acts in social settings as an indicator of the quality of personal interaction they might have with their peers or fellow employees. Information-gathering and networking can lead to opportunities not otherwise known to you, personally or professionally.”<br><i>Clarke Montford, Print Buyer</i>";
r_text[9] = "“Customer service - real customer service - from receiving the order, sending samples, and invoicing properly, will win additional projects every time.”<br><i>David Mitchell, Commodity Manager - Print Materials, Arbonne International</i>";
r_text[10] = "“Any industry standard reduces the chance of miscommunication. It gives me an outline of issues I need to address if I have any questions on how a particular vendor handles said issue.”<br><i>Mike Malloy, Printing and Outsourcing Manager, Valencia Community College, Orlando</i>";
r_text[11] = "“The impact of a recession could result in the INCREASE of our print budgets. Our inventory levels will not recede and could require more marketing dollars to be spent to maintain the capacity we are accustomed to which is generated by our current direct mail programs.” <br><i>Lynn Hamilton, Production Coordinator, Oceania Cruises</i>";
var i = Math.floor(12*Math.random())
document.write(r_text[i]);
}

// function changeText() {
//  if (message.length > 0) {
//    document.aspnetForm.ctl00_body_txtDescript.value=message[text];
//    text++;
//  }
//  if (text == 5) {text = 0; }  // change the # 4 at the left to the maximum # of message lines you want included
//    window.setTimeout("changeText()", 15000); }  // change the # on the left to adjust the speed of the
                                               // scroll. The smaller the # the faster the speed


//function addLoadEvent(func) {
//  var oldonload = window.onload;
//  if (typeof window.onload != 'function') {
//    window.onload = func;
//  } else {
//    window.onload = function() {
//      if (oldonload) {
//        oldonload();
//      }
//      func();
//    }
//  }
//}

//addLoadEvent(function() {
//  changeText();
//});

      
      
//EDIT 'bannercode.php' to assign banner images and appropriate links
 
 
var fadebgcolor="white"

////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])", 150)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}


