// Content-type: text/js
var upImages = new Array
var dnImages = new Array

function swapImage(buttonId, state)
{
        var button
        button = window.event.srcElement

        if (state==1)
        {
                button.src=upImages[buttonId]
        }
        else
        {
                button.src=dnImages[buttonId]
        }
}

function swapImage2(button, state)
{

        if (state==1)
        {
                button.src=upImages[button.name]
        }
        else
        {
                button.src=dnImages[button.name]
        }
}

function goHome()
{
        window.open("../index.html","_self");
}

function goNext( thisPage, numPages )
{
        var nextPage;
        var theNextPage;

        alert(thisPage);
        nextPage = thisPage + 1;
        if(nextPage > numPages)
        {
                nextPage = 1;
        }
        theNextPage = "NewsP" + nextPage + ".htm";
        alert(theNextPage);
        window.open( theNextPage , "_self");
}

function goIndex()
{
        window.open("NewsCalendarIndex.htm","_self");
}

function imageLink()
{
        window.cursor.style = "hand";
}


function bookmarkMe()
{
	window.external.AddFavorite(location.href, document.title);
}

function send(recipient)
{
	var ea = '';
	if(recipient == 1)
	{
		ea = 'workshops';
	}
	else if(recipient == 2)
	{
		ea = 'vfenquiries';
	}    
	else if(recipient == 3)
	{
		ea = 'gallery';
	}   
	else if(recipient == 4)
	{
		ea = 'trips';
	}   
	else if(recipient == 5)
	{
		ea = 'newsletter';
	}   
	else if(recipient == 6)
	{
		ea = 'site_admin';
	}   
	ea += '@';
	ea += 'viewfinders';
	ea += '.';
	ea += 'be';
	
	var emlocation = 'mailto';
	emlocation += ':';
	emlocation += ea;

	location.href = emlocation;
}
