// Fading Ticker JavaScript         |
// Provided by www.bloggerstip.com  |

// Ticker Messages ( HTML Tags supported)
var ticker_text = new Array("<p class='quote'>&ldquo;Soul singer Trace Canini&rsquo;s dark,<br />husky voice was spellbinding in a smoky,<br />laid-back Jazz rendition of But Who May Abide&rdquo;</p><p class='quote_source'><em>The Australian</em>, December 2007</p>","<p class='quote'>&ldquo;Gospel Diva Canini dominated<br />with sheer brilliance&rdquo;</p><p class='quote_source'><em>The Advertiser</em>, December 2007</p>","<p class='quote'>&ldquo;Canini is Adelaide&rsquo;s<br />Best Kept Secret&rdquo;</p><p class='quote_source'><em>The Adelaide Review</em>, December 2007</p>","<p class='quote'>&ldquo;Wow! What a blast, confronting and outrageous.<br />Part of the Happening – you know!&rdquo;</p><p class='quote_source'>Attendee, Country Arts SA/Port Augusta 2008</p>","<p class='quote'>&ldquo;A great anatomy lesson. Honest and adorable.<br />Very talented, gifted and kind!&rdquo;</p><p class='quote_source'>Attendee, Country Arts SA/Port Augusta 2008</p>");
var ticker_width = 442; // The width of the Ticker
var ticker_height = 186; // The height of the Ticker
var timeOutVal = 500; // Delay in milliseconds

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1; var ns6=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1; var ns4=document.layers; var tickerObj; var ticker_left_ns4=(screen.width/2-20)-Math.round(ticker_width/2);

// Setting tickerObj depending on Browser
function setTickerObj(){ if(ie4){tickerObj=document.all.js_ticker;} if(ns6){tickerObj=document.getElementById("js_ticker");} }

var def_10='A',def_11='B',def_12='C',def_13='D',def_14='E',def_15='F'; var colorVal=15; var div_count=0;
// Fading Color code Generating function
function fade_desat(getColorIntVal){ var returnVal; if(getColorIntVal>=10){ for(var i=0; i<=15; i++){ if((getColorIntVal==i)){ returnVal = eval('def_' + i); } } } else { returnVal=getColorIntVal; } return(returnVal); } 

// Main
function writeDiv(){
 if(ie4||ns6) { tickerObj.innerHTML= '<font color="#' +  joinColor(fade_desat(colorVal)) + '">' + ticker_text[div_count] +  '</font>' ; }
 if(ns4) {
  tickerObj=document.ticker_ns4;
  tickerObj.document.write('<font color="#' +  joinColor(fade_desat(colorVal)) + '">' + ticker_text[div_count] +  '</font>');
  tickerObj.document.close();
 }
 if((colorVal>0)  && (colorVal!=0)){ colorVal--; } else { colorVal=15; if(div_count<ticker_text.length){ div_count++; }
  if(div_count==ticker_text.length){ setTimeout("resetAll()",timeOutVal);setTimeout("writeDiv()",timeOutVal); } }
 if(div_count<ticker_text.length){ setTimeout("writeDiv()",timeOutVal); }
}

function joinColor(getColor){ return (getColor + '0' + getColor + '0' + getColor + '0'); } // Generate Final Hex Color
function resetAll(){ div_count=0; colorVal=15; } // Reset

// Setting Delay on MouseOver and MouseOut
var temp_timeOutVal=timeOutVal;
function delay_timeOutVal(){ timeOutVal=100000000000000; setTimeout("writeDiv()",timeOutVal); }
function resume_timeOutVal(){ timeOutVal=temp_timeOutVal; setTimeout("writeDiv()",timeOutVal); }

//nav rollover
function doRollover(img_name){
	eval("document.nav_" + img_name + ".src=\"/files/images/nav_" + img_name + "_over.png\"");
}
function doRollout(img_name){
	eval("document.nav_" + img_name + ".src=\"/files/images/nav_" + img_name + ".png\"");
}
