// JavaScript Document
ratstroke = function()
	{
    pos = this.src.lastIndexOf("/") + 1;
    
	//document.largeimage.src = this.src.substring(0, pos) + "lg_" + this.src.substring(pos + 3);
	
	thediv = document.getElementById("largeimage");
		
    if (thediv == null)
        {
        //alert("Couldn't find div");

        return;
        }
    
    thediv.style.backgroundImage = "url(\"" + this.src.substring(0, pos) + "lg_" + this.src.substring(pos + 3) + "\")";
    
    return true;
	}

setupImageNav = function()
	{
	navRoot = document.getElementById("smallimages");
		
	if (navRoot == null)
		return;
		
	thumbnails = navRoot.getElementsByTagName("IMG");

	for (x = 0; x < thumbnails.length; x++)
		{
		element = thumbnails[x];
		
		if (element.title == "Video clip - click thumbnail to view")
		  continue;
		
		element.onmouseover = ratstroke;
		}

	}

preloadAllImages = function()
	{
	navRoot = document.getElementById("smallimages");
		
	if (navRoot == null)
		return;
		
	thumbnails = navRoot.getElementsByTagName("IMG");

	for (x = 0; x < thumbnails.length; x++)
		{
		element = thumbnails[x];
		
		pos = element.src.lastIndexOf("/") + 1;
		
		(new Image).src = element.src.substring(0, pos) + "lg_" + element.src.substring(pos + 3);
		}

	}
	
showclip = function(name)
    {
    t = 0;
    l = 0;
    
    if (document.all) //IE
        {
        t = window.screenTop + 190;
        l = window.screenLeft + 110;
        }
    else
        {
        t = window.screenY + 190;
        l = window.screenX + 120;
        }
    
    openstr = "width=370, height=280, left=" + l + ", top=" + t + ", status=no, menubar=no, resizable=yes, toolbar=no";
    
    //alert(openstr);
    
    win = window.open(name, "clip", openstr , true);

    return true;
    }
    
changepic = function(im)
    {
    thediv = document.getElementById("backpic");
    
    if (thediv == null)
        {
        alert("Couldn't find div");

        return;
        }
    
    thediv.style.backgroundImage = "url(\"" + im + "\")";
    
    return true;
    }
    
showpic = function(a)
    {
    openstr = "width=810, height=640, left=100, top=100, status=no, menubar=no, resizable=yes, toolbar=no";
    
    win = window.open("", "viewimage", openstr, true);
    d = win.document;
    
    d.write("<img src=\"" + a.href + "\" />");
    }
