/* name of file is bivins.js */

/* FUNCTION FOR TOP LOGO */
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

/* Functions that swaps down images. */
function MM_nbGroup(event, grpName) { //v3.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    if ((nbArr = document[grpName]) != null)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = args[i+1];
      nbArr[nbArr.length] = img;
  } }
}

/* End JavaScript code for top graphic and links */



/*Code for WriteWords Logo mouseover */

  	if (document.images) {

	  	redLogo=new Image();
	  	redLogo.src="images/ww2.png";

	  	blackLogo=new Image();
	  	blackLogo.src="images/ww.png";
	  	}

	  else  {
	  	redLogo=""
	  	blackLogo=""
	  	document.logo=""
  	}



/* SCRIPT FOR SOUND WHEN CLICKING LINKS */



function playHomeSound()
{document.all.homesound.src = "audio/click.wav"}
document.write('<bgsound id="homesound">')
function openHomePage() {location.href = "index.html"}

function playTrophySound()
{document.all.trophysound.src = "audio/click.wav"}
document.write('<bgsound id="trophysound">')
function openTrophyPage() {location.href = "trophies.html"}

function playPlaqueSound()
{document.all.plaquesound.src = "audio/click.wav"}
document.write('<bgsound id="plaquesound">')
function openPlaquePage() {location.href = "plaques.html"}

function playEngravingSound()
{document.all.engravingsound.src = "audio/click.wav"}
document.write('<bgsound id="engravingsound">')
function openEngravingPage() {location.href = "engraving.html"}

function playInquirySound()
{document.all.inquirysound.src = "audio/click.wav"}
document.write('<bgsound id="inquirysound">')
function openInquiryPage() {location.href = "inquiries.html"}

function playCatalogSound()
{document.all.catalogsound.src = "audio/click.wav"}
document.write('<bgsound id="catalogsound">')
function openCatalogPage() {location.href = "catalog.html"}

/* FUNCTION FOR CLOCK IN STATUS BAR */
function runClock() {
	theTime = window.setTimeout("runClock()", 1000);
	var today = new Date();
	var display= today.toLocaleString();
	status=display;
}

runClock();

/* END FUNCTION FOR CLOCK IN STATUS BAR */




/* CODE FOR JDS HOVER BUTTON */

  if (document.images) {

  	jds1=new Image();
  	jds1.src="images/hoverjds1.gif";

  	jds2= new Image();
  	jds2.src="images/hoverjds2.gif";
  	}

  else  {
  	jds2=""
  	jds1=""
  	document.jds=""
  	}

/* END CODE FOR JDS HOVER BUTTON */

/* CODE FOR AIRFLYTE HOVER BUTTON */

  if (document.images) {

  	airflyte1=new Image();
  	airflyte1.src="images/hoverairflyte1.gif";

  	airflyte2= new Image();
  	airflyte2.src="images/hoverairflyte2.gif";
  	}

  else  {
  	airflyte2=""
  	airflyte1=""
  	document.airflyte=""
  	}

/* END CODE FOR AIRFLYTE HOVER BUTTON */



/* CODE FOR CREATIVE CONCEPTS HOVER BUTTON */

  if (document.images) {

  	crecon1=new Image();
  	crecon1.src="images/hovercrecon1.gif";

  	crecon2= new Image();
  	crecon2.src="images/hovercrecon2.gif";
  	}

  else  {
  	crecon2=""
  	crecon1=""
  	document.crecon=""
  	}

/* END CODE FOR CREATIVE CONCEPTS HOVER BUTTON */





/* OPEN NEW WINDOW FOR SUPPLIER CATALOGS ON CATALOG PAGE */

function blueWindow() {
jdsWindow = window.open('http://www.jdsindustries.com','jdsWindow','width=600,height=600,resizable=yes,scrollbars=yes,toolbar=yes,left=0,screenX=0,top=100,screenY=100');
}

function redWindow(){
airFlyteWindow = window.open('http://www.airflyte.com','airFlyteWindow','width=600,height=600,resizable=yes,scrollbars=yes,toolbar=yes,left=0,screenX=0,top=100,screenY=100');
}
function multiWindow() {
creconWindow = window.open('http://www.companycasuals.com/creativeconceptsplus','creconWindow','width=600,height=600,resizable=yes,scrollbars=yes,toolbar=yes,left=0,screenX=0,top=100,screenY=100');
}

/* END OPEN NEW WINDOW FOR SUPPLIER CATALOGS ON CATALOG PAGE */


/* END ALL BIVINS SCRIPTS */