/*
Rotating image or text(You can use for changing banners)
Author: Narayan Chand Thakur
Source: http://ncthakur.itgo.com/
This may be used freely as long as this message is intact.
*/
<!--

//you may add your image file or text below
var item=new Array()
item[0]="<a href='media.htm'>Sylvia in NSIDE Magazine</a>"
item[1]="<a href='media.htm'>Police Chief Magazine</a>"
item[2]="<a href='media.htm'>Sylvia in WomenMarketing.com</a>"
item[3]="<a href='media.htm'>Sylvia in Austin Woman article</a>"
item[4]="<a href='media.htm'>Sylvia in The National GEM Consortium article</a> "
item[5]="<a href='media.htm'>Construction Executive</a>"
var current=0

var ns6=document.getElementById&&!document.all
function changeItem(){
if(document.layers){
document.layer1.document.write(item[current])
document.layer1.document.close()
}
if(ns6)document.getElementById("div1").innerHTML=item[current]
{
if(document.all){
div1.innerHTML=item[current]
}
}
if (current==5) current=0
else current++
setTimeout("changeItem()",5000)
}
//window.onload=changeItem
//-->


<!-- Original:  Robert Bui (astrogate@hotmail.com) -->
<!-- Web Site:  http://astrogate.virtualave.net -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin function for Consumer Products
/*var interval = 2.5; // delay between rotating images (in seconds)
var random_display = 1; // 0 = no, 1 = yes
interval *= 2000;

var image_index = 0;
image_list = new Array();
image_list[image_index++] = new imageItem("images/maid.jpg");
image_list[image_index++] = new imageItem("images/lawncare.jpg");
image_list[image_index++] = new imageItem("images/painting.jpg");
var number_of_image = image_list.length;
function imageItem(image_location) {
this.image_item = new Image();
this.image_item.src = image_location;
}
function get_ImageItemLocation(imageObj) {
return(imageObj.image_item.src)
}
function generate(x, y) {
var range = y - x + 1;
return Math.floor(Math.random() * range) + x;
}
function getNextImage() {
if (random_display) {
image_index = generate(0, number_of_image-1);
}
else {
image_index = (image_index+1) % number_of_image;
}
var new_image = get_ImageItemLocation(image_list[image_index]);
return(new_image);
}
function rotateImage(place) {
var new_image = getNextImage();
document[place].src = new_image;
var recur_call = "rotateImage('"+place+"')";
setTimeout(recur_call, interval);
}*/
//  End function for Consumer Products -->


<!-- Begin function for Consumer Products
adImages3=new Array("images/maid.jpg", "images/lawncare.jpg", "images/painting.jpg");
adURLs3=new Array("www.thecommunicard.com/Merchant2/merchant.mvc?Screen=PROD&Product_Code=010&Category_Code=", "www.thecommunicard.com/Merchant2/merchant.mvc?Screen=PROD&Product_Code=006&Category_Code=", "www.thecommunicard.com/Merchant2/merchant.mvc?Screen=PROD&Product_Code=008&Category_Code=");
thisAd3=0;
function gotoAd3() {document.location.href="http://" + adURLs3[thisAd3];}
function cycleAds3() {
  if (++thisAd3==adImages3.length) {thisAd3=0;} //move to next ad
 document.images.adBanner3.src=adImages3[thisAd3]; //display current ad
  setTimeout("cycleAds3()", 2*4000);  //change ad every 3 seconds
}
//  End function for Consumer Products -->





<!--Begin function for Professional Products
adImages=new Array("images/badge-small2.jpg", "images/trenchingirrigation.jpg", "images/drywall.jpg", "images/cleanupdemolition.jpg");
adURLs=new Array("www.thecommunicard.com/Merchant2/merchant.mvc?Screen=PROD&Product_Code=013&Category_Code=", "www.thecommunicard.com/Merchant2/merchant.mvc?Screen=PROD&Product_Code=009&Category_Code=", "www.thecommunicard.com/Merchant2/merchant.mvc?Screen=PROD&Product_Code=001&Category_Code=","www.thecommunicard.com/Merchant2/merchant.mvc?Screen=PROD&Product_Code=004&Category_Code=");
thisAd=0;
function gotoAd() {document.location.href="http://" + adURLs[thisAd];}
function cycleAds() {
  if (++thisAd==adImages.length) {thisAd=0;} //move to next ad
  document.images.adBanner.src=adImages[thisAd]; //display current ad
  setTimeout("cycleAds()", 5000);  //change ad every 3 seconds
}
// End function for Professional Products -->


<!--Begin function for Testimonial Images
adImages2=new Array("images/policeOfficer.jpg", "images/builder.jpg", "images/man-painting.jpg", "images/landscape-flower.jpg", "images/cleaning.jpg");
adURLs2=new Array("www.thecommunicard.com/testimonials.htm", "www.thecommunicard.com/testimonials.htm", "www.thecommunicard.com/testimonials.htm","www.thecommunicard.com/testimonials.htm","www.thecommunicard.com/testimonials.htm");
thisAd2=0;
function gotoAd2() {document.location.href="http://" + adURLs2[thisAd2];}
function cycleAds2() {
  if (++thisAd2==adImages2.length) {thisAd2=0;} //move to next ad
 document.images.adBanner2.src=adImages2[thisAd2]; //display current ad
  setTimeout("cycleAds2()", 2*4000);  //change ad every 3 seconds
}
// End function for Testimonial Images -->


<!--Begin function for rotating text Testimonials
// loads global functions
 loadGlobalFunctions=function(){
	// rotates dynamic content every 2 seconds
	 rotateContent=function(){
		i++;
		if(i==hiddenDivs.length){i=0}
		container.innerHTML=hiddenDivs[i].innerHTML;
		setTimeout('rotateContent()', 2*4000);	
	}
	// gets all <div> elements
	divs=document.getElementsByTagName('div');
	hiddenDivs=[];
	// makes array of <div> elements with class name 'hidden'
	for(i=0;i<divs.length;i++) {
		if(/\bhidden\b/.test(divs[i].className)){
			hiddenDivs[hiddenDivs.length]=divs[i];
		}
	}
	var i=0;
	// puts dynamic content into cointaning <div> element
	var container=document.getElementById('container');
	// executes rotateContent function
	rotateContent();
}
// executes code once page is loaded
//window.onload=loadGlobalFunctions;
//End function of rotating text Testimonials -->

<!--Beginning of Services rotating text-->
//<![CDATA[
var quote=new Array();
  quote[0]='<a href="training-consulting.htm">Training</a>&nbsp;&nbsp;&nbsp;';    /* add as many quotes as you like!*/
  quote[1]='<a href="training-consulting.htm">Consulting</a>';


var speed=3000;    /*this is the time in milliseconds adjust to suit*/
var q=0;

function showQuote() {

     document.getElementById("quotes").innerHTML=quote[q];
     q++;
if(q==quote.length) {
     q=0;
  }
}
setInterval('showQuote()',speed);
   
 //]]>
<!--End of Services rotating text-->
