<!--
var imageAction = new Array('img/a.gif', 'img/aa.gif', 'img/aaa.gif', 'img/b.gif', 'img/bb.gif', 'img/bbb.gif', 'img/c.gif', 'img/cc.gif', 'img/ccc.gif', 'img/d.gif', 'img/dd.gif', 'img/ddd.gif');
var i;				
var count;
var id;
var galleryId = "";


function showContent(display)
{
	var x = document.getElementById("boyledcontent");

	switch(display)
	{
		case 0:
			document.getElementById("boyledcontent").style.display = "none";
			document.getElementById("galleryIndex").style.display = "none";
		break;
		
		case 1:
			document.getElementById("boyledcontent").style.top = "53px";
			document.getElementById("boyledcontent").style.display = "block";
			document.getElementById("galleryIndex").style.display = "none";
//************************************** Place conent for the Profile Here ******************************************//
			x.innerHTML = "<p id=\"boyledprofile\">Ronan Boyle was born in Derry, Ireland and then moved to Canada as a child in 1974. Growing up in West Vancouver, Boyle spent much of his youth surrounded by the serene, forbidding beauty of the Northwest Coast.</p><p id=\"boyledprofile\">Although Boyle is primarily a self-taught artist, he has extensive training in the rare finishing techniques of European decorative art. The influence of this highly technical approach to surface and materials can be seen in much of Boyle's abstract work, in which he builds a kind of topography into the texture of each painting.</p><p id=\"boyledprofile\">The abstract paintings are often described as being tranquil and meditative. Boyle's compositions are so calmly balanced that the viewer is centered at the horizon of an abstract landscape. Or perhaps they are seascapes, as there is a coastal feeling to many of his paintings. And yet, with their dark voids and expanses of drifting emptiness, Boyle's paintings always contain a counterpart of desolation. Ultimately these works express the beauty and loneliness of the human spirit.</p><p id=\"boyledprofile\">Boyle currently lives and paints in Vancouver.</p><p id=\"boyledprofile\">Sean Starke, 2008.</p>";
//************************************** Place conent for the Profile Here ******************************************//
		break;
		
		case 2:
			document.getElementById("boyledcontent").style.display = "block";
			document.getElementById("galleryIndex").style.display = "block";
			document.getElementById("boyledcontent").style.top = "107px";
			x.innerHTML = " ";
		break;
		
		case 3:
			document.getElementById("boyledcontent").style.top = "53px";
			document.getElementById("boyledcontent").style.display = "block";
			document.getElementById("galleryIndex").style.display = "none";
			x.innerHTML = "<p id=\"boyledprofile\">+1 604 600 6466 <br><a href=\"mailto:ronan.runtboy@gmail.com\">email</a></p>";
		break;
	}
}


function fwd(count, id)
{
	while(count < 11)
	{
		count = count + 3;
		document.getElementById(id).setAttribute('src', imageAction[count]);
		id++;	
	}
}


function bkwd(count, id)
{
	while(count >= 1)
	{
		count = count - 3;
		document.getElementById(id).setAttribute('src', imageAction[count]);
		id--;
	}
}


function switchImage(newImage)
{

	switch(newImage)
	{
		case 0:
			document.getElementById(0).setAttribute('src', imageAction[2]);
			count = 1;
			id = 1;
			fwd(count, id);
		break;
			
		case 1:
			document.getElementById(1).setAttribute('src', imageAction[5]);
			document.getElementById(0).setAttribute('src', imageAction[1]);
			count = 4;
			id = 2;
			fwd(count, id);
		break;
		
		case 2:
			document.getElementById(2).setAttribute('src', imageAction[8]);
			document.getElementById(3).setAttribute('src', imageAction[10]);
			count = 7;
			id =1;
			bkwd(count, id);
		break;
		
		case 3:
			document.getElementById(3).setAttribute('src', imageAction[11]);
			count = 10;
			id = 2;
			bkwd(count, id);
		break;
	}
}
	
	
function catchMouse(newImage, event, bool)
{
	
	//alert(newImage + " " + tempFirst + " " + bool);
	var tempFirst = event.type;	
	var image = "";
	
	
	//if ((!(bool)) && (image != newImage))
	if (!(bool))
	{
		if (tempFirst == "mouseover")
		{
			document.body.style.backgroundImage = "url(img/line_off.gif)";
			switchImage(newImage);
		}
	
	
		if (tempFirst == "mouseout")
		{
		
			for (i = 0; i < 4; i++)
			{
				document.getElementById(i).setAttribute('src', imageAction[i*3]);
			}
		
			document.body.style.backgroundImage = "url(img/line.gif)";
		}
	}
	else
	{
		if (tempFirst == "click")
		{
			document.getElementById(3).setAttribute('src', imageAction[11]);
			showContent(newImage);
			switchImage(newImage);
		}
	}
}


function seeHR(id)
{
	
	/* Cal Size and Location Of Parent Window
	var myWidth = 0;
	var myHeight = 0;
  
  	if(typeof(window.innerWidth) == 'number') 
	{
    // NON Microsoft
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  	}
	else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight )) 
  	{
    // Internet Explorer
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  	} 
  
  //window.alert (left = window.screen.left);
  //window.alert( 'Width = ' + window.screen.width );
  //window.alert( 'Height = ' + window.screen.height );
  
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
*/

	var mw = window.open ("b.html?id=" + id, "rb","width=300,height=300,scrollbars=1,resizable=1,directories=0,location=0,menubar=0,status=0,toolbar=0");
	//var mw = window.open ("img/gallery/" + id + ".RonanBoyleHR.jpg", "sb","width=300,height=300,directories=0,location=0,menubar=0,status=0,toolbar=0,scrollbars=1,resizable=0");
	mw.moveTo(400,400);
}


function getGalleryId (a, action)
{
	if (action == 1)
	{
		switch(a)
		{
			case 'one': return 1; break; case 'two': return 2; break; case 'three': return 3; break; case 'four': return 4; break; case 'five': return 5; break; case 'six': return 6; break; case 'seven': return 7; break; case 'eight': return 8; break; case 'nine': return 9; break; case 'ten': return 10; break; case 'eleven': return 11; break; case 'twelve': return 12; break; case 'thirteen': return 13; break; case 'fourteen': return 14; break;
		}
	}
	
	else
	{
		switch(a)
		{
			case 'one': return "90 x 66"; break; case 'two': return "48 x 96"; break; case 'three': return "36 x 80"; break; case 'four': return "90 x 66"; break; case 'five': return "80 x 36"; break; case 'six': return "90 x 30"; break; case 'seven': return "48 x 80"; break; case 'eight': return "36 x 48"; break; case 'nine': return "19 x 41"; break; case 'ten': return "__x__"; break; case 'eleven': return "__x__"; break; case 'twelve': return "__x__"; break; case 'thirteen': return "__x__"; break; case 'fourteen': return "__x__"; break;
		}
	}

}


function galleryEvent(newImage, event, bool)
{
	var y = document.getElementById("boyledcontent");
	
	//alert(newImage + " " + tempFirst + " " + bool);
	var tempFirst = event.type;	
	
	
	if ((!(bool)) && ((galleryId != newImage) || (galleryId == "")))
	{
		if (tempFirst == "mouseover")
		{
			document.getElementById(newImage).setAttribute('src', 'img/' + getGalleryId(newImage, 1) + 'on.gif');
		}
	
	
		if (tempFirst == "mouseout")
		{
			document.getElementById(newImage).setAttribute('src', 'img/' + getGalleryId(newImage, 1) + '.gif');
		}
	}
	else
	{
		if (tempFirst == "click")
		{
			if (galleryId == "")
			{
				document.getElementById(newImage).setAttribute('src', 'img/' + getGalleryId(newImage, 1) + 'on.gif');
				y.innerHTML = "<a href=\"javascript:seeHR(" + getGalleryId(newImage, 1) + ");\" ><img src=\"img/gallery/" + getGalleryId(newImage, 1) + ".RonanBoyle.jpg\" alt=\"" + getGalleryId(newImage, 1) + "\" align=\"top\" border=\"0\" onClick=\"seeHR(" + getGalleryId(newImage, 1) + ");\" /></a><br /><br /> <span id=\"desc\">" + getGalleryId(newImage, 0) + "</span>";
			}
			else
			{
				document.getElementById(galleryId).setAttribute('src', 'img/' + getGalleryId(galleryId, 1) + '.gif');
				y.innerHTML = " ";
				document.getElementById(newImage).setAttribute('src', 'img/' + getGalleryId(newImage, 1) + 'on.gif');
				y.innerHTML = "<a href=\"javascript:seeHR(" + getGalleryId(newImage, 1) + ");\" ><img src=\"img/gallery/" + getGalleryId(newImage, 1) + ".RonanBoyle.jpg\" alt=\"" + getGalleryId(newImage, 1) + "\" align=\"top\" border=\"0\" onClick=\"seeHR(" + getGalleryId(newImage, 1) + ");\" /></a><br /><br /> <span id=\"desc\">" + getGalleryId(newImage, 0) + "</span>";
			}

			galleryId = newImage;
		}
	}


}



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 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];}
}
//-->
