﻿
/* slideshow */
function start_slideshow(show_name, start_frame, end_frame, delay)
	{
		setTimeout(switch_slides(show_name, start_frame,start_frame,end_frame, delay), delay);
	}
                                                
function switch_slides(show_name, frame, start_frame, end_frame, delay)
	{
		return (function()
			{
				Effect.Fade(show_name + '_' + frame);
				if (frame == end_frame) { frame = start_frame; } else { frame = frame + 1; }
				setTimeout("Effect.Appear('" + show_name + "_" + frame + "');", 850);
				setTimeout(switch_slides(show_name, frame, start_frame, end_frame, delay), delay + 850);
			})
	}

/* topic */
function SwitchTopic(id)
	{
        if(document.getElementById)
			{
				obj = document.getElementById(id);
				arw = document.getElementById(id + '-arrow');

				if(obj.style.display == 'none')
					{
						obj.style.display = "";
						arw.style.backgroundImage = "url('images/icon_arrowdown.png')";
					}
				else
					{
						obj.style.display = "none";
						arw.style.backgroundImage = "url('images/icon_arrowright.png')";
					}
			}
	}

/* contact */
function ToggleWhen(disable)
	{
		document.getElementsByName('contact-when')[0].disabled = disable;
		document.getElementsByName('contact-when')[1].disabled = disable;
		document.getElementsByName('contact-when')[2].disabled = disable;
	}

/* common functions */
function ShowHide(id)
    {
        if(document.getElementById)
            {
                obj = document.getElementById(id);

                if(obj.style.display == 'none')
                    obj.style.display = "";
                else
                    obj.style.display = "none";
            }
    }

function Pointer(id)
	{
		id.style.cursor = 'Pointer';
	}
	
function MouseOver(id, colour)
	{
		id.style.cursor = 'Pointer';
		id.style.color = colour;
	}
	
function MouseOut(id, colour)
	{
		id.style.color = colour;
	}

