
	//FULL - DETAIL VIEW
var ie=document.all
var ns6=document.getElementById && !document.all

var btnf = ie ? document.all.btnf : document.getElementById('btnf')
var btnd = ie ? document.all.btnd : document.getElementById('btnd')
var btnd2= ie ? document.all.btnd2: document.getElementById('btnd2')
var btnd3= ie ? document.all.btnd3: document.getElementById('btnd3')
var btni = ie ? document.all.btni : document.getElementById('btni')
var info = ie ? document.all.info : document.getElementById('info')
var infotxt = ie ? document.all.infotxt : document.getElementById('infotxt')
var galpage = ie ? document.all.galpage : document.getElementById('galpage')

function imgArray(){
 info = ie ? document.all.info : document.getElementById('info')
         infx = info.innerHTML
         fImg = infx.substring(infx.indexOf('thumbs') +7)
         fImg = fImg.substring(0,fImg.indexOf('\"'))
//       fImg = infx.substring(infx.indexOf('src') +5)  //Use if Thumbs removed for Full
//       fImg = fImg.substring(0,fImg.indexOf('\"'))    //Use if Thumbs removed for Full
	//---- build detail filenames -------
       dImg = fImg.substring(0,fImg.indexOf('--'))+ 'd1' + fImg.substring(fImg.indexOf('--')) 
       dImg2= fImg.substring(0,fImg.indexOf('--'))+ 'd2' + fImg.substring(fImg.indexOf('--')) 
       dImg3= fImg.substring(0,fImg.indexOf('--'))+ 'd3' + fImg.substring(fImg.indexOf('--')) 
  swapImg('f')
}

var back = ''
var d2   = 0
var d3   = 0

//-- ---------------- LOAD INFO TEXT --------------------
function txtView(){
 infotxt = ie ? document.all.infotxt : document.getElementById('infotxt')
                 iTxt = infotxt.innerHTML
 infotxt.style.display = 'none'
}

var  btnf = ie ? document.all.btnf : document.getElementById('btnf')
var  btnd = ie ? document.all.btnd : document.getElementById('btnd')
var  btnd2= ie ? document.all.btnd2: document.getElementById('btnd2')
var  btnd3= ie ? document.all.btnd3: document.getElementById('btnd3')
var  btni = ie ? document.all.btni : document.getElementById('btni')
var zooms = ie ? document.all.zooms : document.getElementById('zooms')

//-- ---------------- LOAD ZOOM BUTTONS --------------------
function loadZoom(){
	 zooms.innerHTML = ''
 if (zoom > 0 || inf > 0)
	{zooms.innerHTML+= '<div id="btnf" class="view" onMouseOver="mOver(this)" onMouseOut="mOut(this)" onClick="swapImg(\'f\')"><span class="grey">full view</span></div>'}
 if (zoom >0)
	{zooms.innerHTML+= '<div id="btnd" class="view" onMouseOver="mOver(this)" onMouseOut="mOut(this)" onClick="swapImg(\'d\')">detail</div>'}
 if (zoom >1)
	{zooms.innerHTML+= '<div id="btnd2" class="view" onMouseOver="mOver(this)" onMouseOut="mOut(this)" onClick="swapImg(\'d2\')">detail</div>'}
 if (zoom >2)
	{zooms.innerHTML+= '<div id="btnd3" class="view" onMouseOver="mOver(this)" onMouseOut="mOut(this)" onClick="swapImg(\'d3\')">detail</div>'}
 if (inf ==1)
	{zooms.innerHTML+= '<div id="btni"  class="view" onMouseOver="mOver(this)" onMouseOut="mOut(this)" onClick="swapImg(\'i\')">info</div>'}
}

//-- ---------------- SWAP IMAGE --------------------
function swapImg(to){
var  btnf = ie ? document.all.btnf : document.getElementById('btnf')
var  btnd = ie ? document.all.btnd : document.getElementById('btnd')
var  btnd2= ie ? document.all.btnd2: document.getElementById('btnd2')
var  btnd3= ie ? document.all.btnd3: document.getElementById('btnd3')
var  btni = ie ? document.all.btni : document.getElementById('btni')
var  showtxt = ie ? document.all.showtxt : document.getElementById('showtxt')

	if(to !='i'){showtxt.innerHTML          = ''
		   showtxt.style.display      = 'none'
		   document.pic.style.display = ''}

	if (to == 'f'){
	document.pic.src = fImg
	btnf.innerHTML   = '<span class="grey">full view</span>'
	if(btnd){btnd.innerHTML  = 'detail'}
	if(btnd2){btnd2.innerHTML = 'detail'}
	if(btnd3){btnd3.innerHTML = 'detail'}
	if(inf ==1){btni.innerHTML  = 'info'}
}
	if (to == 'd'){
	document.pic.src = dImg;
	btnf.innerHTML   = 'full view'
	if(btnd){btnd.innerHTML  = '<span class="grey">detail</span>'}
	if(btnd2){btnd2.innerHTML = 'detail'}
	if(btnd3){btnd3.innerHTML = 'detail'}
	if(inf ==1){btni.innerHTML  = 'info'}
}
	if (to == 'd2'){
            document.pic.src = dImg2
	btnf.innerHTML  = 'full view'
	if(btnd){btnd.innerHTML  = 'detail'}
	if(btnd2){btnd2.innerHTML = '<span class="grey">detail</span>'}
	if(btnd3){btnd3.innerHTML = 'detail'}
	if(inf ==1){btni.innerHTML  = 'info'}
}
	if (to == 'd3'){
	document.pic.src = dImg3
	btnf.innerHTML   = 'full view'
	if(btnd){btnd.innerHTML  = 'detail'}
	if(btnd2){btnd2.innerHTML = 'detail'}
	if(btnd3){btnd3.innerHTML = '<span class="grey">detail</span>'}
	if(inf ==1){btni.innerHTML  = 'info'}
}
	if (to == 'i'){
	document.pic.style.display = 'none'
          showtxt.style.display      = ''
	btnf.innerHTML   = 'full view'
	if(btnd){btnd.innerHTML  = 'detail'}
	if(btnd2){btnd2.innerHTML = 'detail'}
	if(btnd3){btnd3.innerHTML = 'detail'}
	if(inf ==1){btni.innerHTML  = '<span class="grey">info</span>'}
	if(inf ==1){showtxt.innerHTML  = iTxt}
}
}

function mOver(btn){
 	btn.style.backgroundColor = '#ffffff'
	btn.style.cursor = 'pointer'
}
function mOut(btn2){
	btn2.style.backgroundColor = '#fcdbdb'
	btn2.style.cursor = 'pointer'
}

//-- ---------------- OPTIONS --------------------
function pickItem(item,amount,title,print){
 var price = ie ? document.all.price : document.getElementById('price');
 var cost  = ie ? document.all.cost  : document.getElementById('cost');
 var desc  = ie ? document.all.desc  : document.getElementById('desc');
 var descr = ie ? document.all.descr : document.getElementById('descr');
 var type = 'print';

  if (print    != null){type = print}

  if (item == 'p'){
	document.forms['paypal'].item_name.value  = title
	document.forms['paypal'].amount.value     = amount
	desc.innerHTML = type
}
  if (item == 'p2'){
	document.forms['paypal'].item_name.value  = title;
	document.forms['paypal'].amount.value     = amount;
	desc.innerHTML = type;
}
  if(item == "ap"||item == "vap"){
	document.forms['paypal'].item_name.value  = title
	document.forms['paypal'].amount.value     = amount
	desc.innerHTML = '<span class="red8">Artists Proof</span>'
  if(item == "vap"){desc.innerHTML = '<span class="red8">Proof</span>'}
}
  if(item == "mp"||item == "vmp"){
	document.forms['paypal'].item_name.value  = title;
	document.forms['paypal'].amount.value     = amount;
	desc.innerHTML = '<span class="red8">Matted Print</span>';
  if(item == "vmp"){desc.innerHTML = '<span class="red8">Matted</span>'}
}
  if(item == "o"){
	document.forms['paypal'].item_name.value  = title;
	document.forms['paypal'].amount.value     = amount;
	desc.innerHTML  = '<span class="red8ls">Original</span>';
}
	desc.style.backgroundColor  =  '#ffffff'
	desc.style.border           =  '1px solid #b00000'
	desc.style.borderRight      =  'none'
	cost.style.backgroundColor  =  '#ffffff'
	cost.style.border           =  '1px solid #b00000'
	cost.style.borderLeft       =  'none'
showDollar()
}


