function change (type,img, h, pCode, edition, size, medium, price,framedprice,unmountedprice, avil, framed, buttAct, buttClick, buttTxt,artist,artistID) {
	document.getElementById('img').innerHTML = '<a href="/artists/'+escape(artist)+'/id/'+artistID+'/artists.asp"><img src="http://www.demontfortfineart.co.uk/images/collections/'+img+'" alt="'+h+'" /></a>';
	//alert('<img src="http://www.demontfortfineart.co.uk/images/products/'+img+'" alt="'+h+'" width="300" />');
	//
	if(avil == "In Stock" || avil == "Limited Availibility"){
		button = '<div class="arrow fR"><a href="'+buttAct+'" onclick="'+buttClick+'"><span>'+buttTxt+'</span></a></div>';
	}else{
		button = '<div class="arrow fR"><a href="javascript:;" onclick="fnHowToBuy(\'/artists/how-to-buy.asp\')"><span>How to Buy</span></a></div>';
	}
	
	//
	document.getElementById('colTitle').innerHTML = h;
	document.getElementById('colArtist').innerHTML = artist;
	document.getElementById('pCode').innerHTML = pCode;
	document.getElementById('edition').innerHTML = edition;
	document.getElementById('size').innerHTML = size;
	document.getElementById('medium').innerHTML = medium;
	//put changed content into table of it's own, as IE doesn't work with ID'ing TR's
	if(document.getElementById('priceholder')){
		if(type == "retail"){
			document.getElementById('priceholder').innerHTML = "<table><tr><td><span>Price</span></td><td>&pound;"+price+"</td></tr></table>";
		}else if (type == "select"){
			document.getElementById('priceholder').innerHTML = "<table><tr><td colspan=\"2\"><select id=\"price\" name=\"price\"><option value=\"ajaxBuyUnClik\">Unmounted - &pound;"+unmountedprice+"</option><option value=\"ajaxBuyFrClik\">Framed - &pound;"+framedprice+"</option></select></td></tr></table>"
		}else if(type == "framed"){
			document.getElementById('priceholder').innerHTML = "<table><tr><td><span>Framed Price</span></td><td>&pound;"+framedprice+"<input type=\"hidden\" id=\"price\" name=\"price\" value=\"ajaxBuyFrClik\"></td></tr></table>";
		}else if(type == "unmounted"){
			document.getElementById('priceholder').innerHTML = "<table><tr><td><span>Unmounted Price</span></td><td>&pound;"+unmountedprice+"<input type=\"hidden\" id=\"price\" name=\"price\" value=\"ajaxBySclClik\"></td></tr></table>";
		}
	}else{
			document.getElementById('price').innerHTML = "&pound;"+price;	
		}
	document.getElementById('avil').innerHTML = avil;	
	document.getElementById('buybutt').innerHTML = button;
	//
	return false;
}

//
var clipTop = 0;
var clipLeft = 0;
if (!clipRight) {
	var clipRight = 500;
}
var clipBottom = 170;
var leftPos = 0;
var lyrwidth = 0;
var time,amount,theTime,theHeight,DHTML;

function init()
{
	DHTML = (document.getElementById || document.all || document.layers)
	if (!DHTML) return;
	var y = new getObj('photos');
	if (document.layers)
	{
		lyrwidth = y.style.clip.width;
		//lyrwidth += 20;
		y.style.clip.top = clipTop;
		y.style.clip.left = clipLeft;
		y.style.clip.right = clipRight;
		y.style.clip.bottom = clipBottom;
	}
	else if (document.getElementById || document.all)
	{
		lyrwidth = y.obj.offsetWidth;
		y.style.clip = 'rect('+clipTop+'px,'+clipRight+'px,'+clipBottom+'px,'+clipLeft+'px)';
	}
}

function scrollayer(layername,amt,tim)
{
	if (!DHTML) return;
	thelayer = new getObj(layername);
	if (!thelayer) return;
	amount = amt;
	theTime = tim;
	realscroll();
}

function realscroll()
{
	if (!DHTML) return;
	clipLeft += amount;
	clipRight += amount;
	leftPos -= amount;
	if (clipLeft < 0 || clipRight > lyrwidth)
	{
		clipLeft -= amount;
		clipRight -= amount;
		leftPos += amount;
		return;
	}
	if (document.getElementById || document.all)
	{
		clipstring = 'rect('+clipTop+'px,'+clipRight+'px,'+clipBottom+'px,'+clipLeft+'px)';
		thelayer.style.clip = clipstring;
		thelayer.style.left = leftPos + 'px';
	}
	else if (document.layers)
	{
		thelayer.style.clip.left = clipLeft;
		thelayer.style.clip.right = clipRight;
		thelayer.style.left = leftPos;
	}
	time = setTimeout('realscroll()',theTime);
}

function stopscroll()
{
	if (time) clearTimeout(time);
}

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

window.onload = init;