﻿// JScript File

function rollover(imagename){
	newsrc = eval(imagename + 'Over.src');
	document.images[imagename].src=newsrc;
}

function rollout(imagename){
	newsrc = eval(imagename + '.src');
	document.images[imagename].src=newsrc;
}

function mouseover(imagename, imagesrc){
	document.images[imagename].src=imagesrc;
}

function mouseout(imagename, imagesrc){
	document.images[imagename].src=imagesrc;
}

function changeClass(imagename, classname)
{
	document.images[imagename].className=classname;
}

function changeImage(section, range)
{
    switch(section)
    {
        case "wedding":
            document.images["weddings4"].src="images/wedding/display" + range + ".jpg";
            document.images["weddings7"].src="images/common/common_07_trans.gif";
            document.images["weddings30"].src="images/common/common_30_trans.gif";
            break;
        case "funeral":
            document.images["funeral4"].src="images/funeral/display" + range + ".jpg";
            document.images["funeral7"].src="images/common/common_07_trans.gif";
            break;
        case "events":
            document.images["events4"].src="images/events/display" + range + ".jpg";
            document.images["events7"].src="images/common/common_07_trans.gif";
            break;
        case "gifts":
            document.images["gifts4"].src="images/gifts/display" + range + ".jpg";
            document.images["gifts7"].src="images/common/common_07_trans.gif";
            break;
        case "workshops":
            break;
        case "wine":
            break;
        case "beauty":
            document.images["beauty4"].src="images/beauty/display" + range + ".jpg";
            document.images["beauty7"].src="images/common/common_07_trans.gif";
            break;
        default:
            break;
    }
}

//Highlight image script- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use

function makevisible(cur,which)
{
    strength=(which==0)? 1 : 0.5
    
    if (cur.style.MozOpacity)
        cur.style.MozOpacity=strength
    else if (cur.filters)
        cur.filters.alpha.opacity=strength*100
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function AddEmailLink(username, domain, href, classname, title)
{
	user = username;
	site = domain;

	if (classname == "")
	{
		document.write('<a href=\"' + href + '\" title=\"' + title + '\">');
	}
	else
	{
		document.write('<a href=\"' + href + '\" class=\"' + classname + '\" title=\"' + title + '\">');
	}
	document.write(user + '@' + site + '</a>');
}

imgHome = new Image(21, 49);
imgHome.src = "images/navigation/nav_07.gif";
imgHomeOver = new Image(21, 49);
imgHomeOver.src = "images/navigation/navover_07.gif";

imgWedding = new Image(21, 74);
imgWedding.src = "images/navigation/nav_08.gif";
imgWeddingOver = new Image(21, 74);
imgWeddingOver.src = "images/navigation/navover_08.gif";

imgFuneral = new Image(21, 53);
imgFuneral.src = "images/navigation/nav_09.gif";
imgFuneralOver = new Image(21, 53);
imgFuneralOver.src = "images/navigation/navover_09.gif";

imgEvents = new Image(21, 72);
imgEvents.src = "images/navigation/nav_10.gif";
imgEventsOver = new Image(21, 72);
imgEventsOver.src = "images/navigation/navover_10.gif";

imgGifts = new Image(21, 53);
imgGifts.src = "images/navigation/nav_11.gif";
imgGiftsOver = new Image(21, 53);
imgGiftsOver.src = "images/navigation/navover_11.gif";

imgWorkshops = new Image(21, 81);
imgWorkshops.src = "images/navigation/nav_12.gif";
imgWorkshopsOver = new Image(21, 81);
imgWorkshopsOver.src = "images/navigation/navover_12.gif";

imgWine = new Image(21, 124);
imgWine.src = "images/navigation/nav_13.gif";
imgWineOver = new Image(21, 124);
imgWineOver.src = "images/navigation/navover_13.gif";

imgBeauty = new Image(21, 62);
imgBeauty.src = "images/navigation/nav_14.gif";
imgBeautyOver = new Image(21, 62);
imgBeautyOver.src = "images/navigation/navover_14.gif";

imgContact = new Image(21, 91);
imgContact.src = "images/navigation/nav_15.gif";
imgContactOver = new Image(21, 91);
imgContactOver.src = "images/navigation/navover_15.gif";

imgWeddingSection = new Image(82, 80);
imgWeddingSection.src = "images/home/sections_21.jpg";
imgWeddingSectionOver = new Image(82, 80);
imgWeddingSectionOver.src = "images/home/sectionsover_21.jpg";

imgFuneralSection = new Image(82, 89);
imgFuneralSection.src = "images/home/sections_22.jpg";
imgFuneralSectionOver = new Image(82, 89);
imgFuneralSectionOver.src = "images/home/sectionsover_22.jpg";

imgEventsSection = new Image(82, 89);
imgEventsSection.src = "images/home/sections_23.jpg";
imgEventsSectionOver = new Image(82, 89);
imgEventsSectionOver.src = "images/home/sectionsover_23.jpg";

imgGiftsSection = new Image(82, 89);
imgGiftsSection.src = "images/home/sections_24.jpg";
imgGiftsSectionOver = new Image(82, 89);
imgGiftsSectionOver.src = "images/home/sectionsover_24.jpg";

imgWorkshopsSection = new Image(82, 89);
imgWorkshopsSection.src = "images/home/sections_25.jpg";
imgWorkshopsSectionOver = new Image(82, 89);
imgWorkshopsSectionOver.src = "images/home/sectionsover_25.jpg";

btnSend = new Image(34, 67);
btnSend.src = "images/common/send.jpg";
btnSendOver = new Image(34, 67);
btnSendOver.src = "images/common/send_over.jpg";
