// JavaScript Document
<!--


// Copyright 2001 by www.CodeBelly.com
// Please do *not* remove this notice.

var backImage = new Array(); // don't change this
backImage[0] = "images/interface/btnBG.png";
backImage[1] = "images/interface/btnBGActive.png";

function changeBGImage(whichImage, tdID){  
	var imageURL = "url(" + backImage[whichImage] + ")";
	if (document.body){
		document.getElementById(tdID).style.backgroundImage = imageURL;
	}
}


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];}}
}
MM_preloadImages("http://www.glyndavidson.co.uk/images/interface/3D X Btn Hover.png");
MM_preloadImages("http://www.glyndavidson.co.uk/images/interface/btnBGActive.png");

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function clicker(img, category, pageVars){
	var theBG=document.getElementById('displayboxBG');
	var theIMG=document.getElementById('displayboxIMG');

	if(theBG.style.display == "none"){
		theBG.style.display = "";
		theIMG.style.display = "";
		theBG.innerHTML = "<table width='100%' height='100%'><tr><td align='center' valign='top' width='100%' height='100%'>&nbsp;</td></tr></table>";
		theIMG.innerHTML = "<table width='100%'><tr><td align='right'><a href='#' onclick='return clicker();'><img src='http://www.glyndavidson.co.uk/images/interface/3D X Btn.png' border='0' id='btnX' onmouseover=\"MM_swapImage('btnX','','http://www.glyndavidson.co.uk/images/interface/3D X Btn Hover.png',1)\" onmouseout=\"MM_swapImgRestore()\"><br />"
		if (category == "3D / CGI"){
			theIMG.innerHTML += "<img src='http://www.glyndavidson.co.uk/images/fullSize/3D CGI Art/" + img + ".png' border='0' width='768' ></a>";
		}else if (category == "Animation"){
			theIMG.innerHTML += "<script language='javascript'>AC_FL_RunContent('codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0','width', '768','height', '469','src', 'images/motion-graphics/" + img + "','quality', 'high','pluginspage', 'http://www.macromedia.com/go/getflashplayer','align', 'middle','play', 'true','loop', 'true','scale', 'showall','wmode', 'window','devicefont', 'false','id', 'cloner','bgcolor', '#1B1B1B','name', '" + img + "','menu', 'true','allowFullScreen', 'true','allowScriptAccess','sameDomain','movie', 'imges/motion-graphics/" + img + "','salign', '');</script>"
            theIMG.innerHTML += "<noscript><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='768' height='469' id='" + img + "' align='middle'>"
            theIMG.innerHTML += "<param name='allowScriptAccess' value='sameDomain' /><param name='allowFullScreen' value='true' /><param name='movie' value='images/motion-graphics/" + img + ".swf'; /><param name='quality' value='high' />"
            theIMG.innerHTML += "<embed src='images/motion-graphics/" + img + ".swf' quality='high' width='768' height='469' name='" + img + "' align='middle' allowScriptAccess='sameDomain' allowFullScreen='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"
            theIMG.innerHTML += "</object></noscript>"
		}else if (category == "Illustration"){
			theIMG.innerHTML += "<img src='http://www.glyndavidson.co.uk/images/fullSize/3D CGI Art/" + img + ".png' border='0' width='768' ></a>";
		}else if (category == "2D"){
			theIMG.innerHTML += "<img src='http://www.glyndavidson.co.uk/images/fullSize/3D CGI Art/" + img + ".png' border='0' width='768' ></a>";
		}
				
		theIMG.innerHTML += "<br><iframe src='share.aspx" + pageVars + "' frameborder='0' border='0' align='right' width='180' height ='61' width scrolling = 'no' allowtransparency='true' style='margin:10px;' ></iframe>";
		theIMG.innerHTML += "</td></tr></table>";
	}else{
		theBG.style.display = "none";
		theIMG.style.display = "none";
		theBG.innerHTML = '';
		theIMG.innerHTML = '';
	}
	return false;
}


function show_element(which){	
	document.getElementById(which + 'on').style.display = "block";
	document.getElementById(which + 'off').style.display = "none";
}

function hide_element(which){
	document.getElementById(which + 'on').style.display = "none";
	document.getElementById(which + 'off').style.display = "block";
}

function set_display(){			
	var el = "options"; 
	if (document.getElementById(el + 'on').style.display == "block"){
		show_element(el);
	}
	else{
		hide_element(el);
	}
}
-->




