// Common javascript functions and data for WOWIS!!! web site
//
// By:   Porcelain Dent Software Company for WOW!!! Internet Solutions
// Date: May 21, 1998

var number_of_images = 4;	// The number of images in the main menu.
var image_offset = 1;		// The number of images preceeding the main menu images.

normalImage = new Array(number_of_images);
litImage = new Array(number_of_images);
caption = new Array(number_of_images);

normalImage[0] = "na_g.gif";
litImage[0] = "na.gif";
caption[0] = "Access plans starting at $15 per month!";

normalImage[1] = "host_g.gif";
litImage[1] = "host.gif";
caption[1] = "Web development and hosting by the pros!";

normalImage[2] = "cons_g.gif";
litImage[2] = "cons.gif";
caption[2] = "Our experienced consultants can show you how!";

normalImage[3] = "sol_g.gif";
litImage[3] = "sol.gif";
caption[3] = "Need custom solutions? We can help.";

function resetSubmenu()
// This function resets the main submenu so that all graphics are
// restored to mormal.
{
	var i;
	for (i = 0; i < number_of_images; i++)
	{
		document.images[image_offset + i].src = normalImage[i];
	}
	return true;
}

function setSubmenu(element)
// This function causes the preselected submenu image to be replaced by the
// lit submenu image.
{
	resetSubmenu();

	document.images[image_offset + element].src = litImage[element];
	window.status = caption[element];
	return true;
}

function jump2page ()
// This funtion causes the "dir" pulldown menu's index to
// be used as an index to a url list. The browser's current
// location is then changed to the indexed location.
{
	var index = document.dirform.directory.selectedIndex ;
	pages = new Array (7) ;

	pages[0] = "index.htm" ;
	pages[1] = "na.htm" ;
	pages[2] = "wh.htm" ;
	pages[3] = "cons.htm" ;
	pages[4] = "sol.htm" ;
	pages[5] = "contact.htm" ;
	pages[6] = "access_js.htm" ;

	window.location = pages [index] ;
}

///////////////////////////////////////
// Functions for the consulting page
// ticker tape buzword display.

var id,pause=0,position=0,revol=9;

function banner() 
{
  var i,k;
  var msg="              Object Oriented Design/Programming     Client/Server Implementation     Multithreaded Programming    Structured Analysis    C/C++   HTML   SGML   JAVASCRIPT    JAVA    ADA    Unix    Linux   Windows   Windows N/T   Distributed Database Solutions                    ";
  var speed=10;
  document.bannerform.banner.value=msg.substring(position,position+50);

  if(position++==msg.length) 
  {
      if (revol-- < 2) return;
      position=0;
  }

  id=setTimeout("banner()",1000/speed);
}

////////////////////
// Access Numbers

function getAccessNumber ()
{
	var index ;
	var accessNumber ;

	index = document.AccessNumberLookup.Location.selectedIndex ;
	accessNumber = document.AccessNumberLookup.Location.options[index].value ;
	document.AccessNumberLookup.AccessNumber.value = accessNumber ;

	return true ;
}

