// JavaScript Document
// Contains: PreLoad, Switch Image, Detail ToolTip, emailTo,
// Menu Template VERTICAL, Menu Template HORIZONTAL, Menu Items, Menu.js


// Preload
// page's body tag to have -> onload="Preload( 'IMG URL1', 'IMG URL2' )" - Two Shown, Can Be More
function Preload()
{ 
  var args = Preload.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}


// Switch Image
var img_count=1  
function switchImage(object_name,img_group,img_type,num_images) 
{ 
  if (document.images)
  {
    if (img_count<num_images) 
      {	    
	  img_count++
	  source_name= img_group+img_count+"."+img_type
	  document.images[object_name].src = source_name;
	  return
	  }
	  
	  {
      img_count=1
	  source_name= img_group+img_count+"."+img_type
	  document.images[object_name].src = source_name;
	  return
	  }	
	  
	}
  }

// Email To
function email(where)
{
if (where=="office") office()
if (where=="cs") officeCareandShare()
if (where=="pr") officePrayerRequest()
if (where=="manager") manager()
if (where=="ppsubscribe") ppsubscribe()
if (where=="pastor") pastor()
if (where=="beacon") beacon()
}
function office()
{             
self.location="mailto:office.dundeeumc@frontier.com"
}
function officeCareandShare()
{
self.location="mailto:office.dundeeumc@frontier.com?subject=Caring and Sharing"
}
function officePrayerRequest()
{
self.location="mailto:office.dundeeumc@frontier.com?subject=Prayer Request"
}
function manager()
{
self.location="mailto:Site Manager <webmaster.dundeeumc@frontier.com>?Subject=Dundee UMC Web Site"
}
function ppsubscribe()
{
alert ('The Email address used will be the one shown in the FROM field of this request. If you want a different address used, please type it in the body of the message')	
self.location="mailto:pastorpage.dundeeumc@frontier.com?subject=Pastor's Page Subscription Request&body=Please add me to the Pastor's Page Email Subscribers list."
}
function pastor()
{             
self.location="mailto:Rev. Doug <revolsen.dundeeumc@frontier.com>"
}
function beacon()
{             
self.location="mailto:Mary Sandefur <beacon.dundeeumc@frontier.com>"
}





