
	//FULL - DETAIL VIEW
var ie=document.all
var ns6=document.getElementById && !document.all

var btnf = document.getElementById('btnf')
var btnd = document.getElementById('btnd')
var btnd2= document.getElementById('btnd2')
var btnd3= document.getElementById('btnd3')
var btni = document.getElementById('btni')
var info = document.getElementById('info')
var infotxt = document.getElementById('infotxt')
var galpage = document.getElementById('galpage')

function imgArray(){
 info = document.getElementById('info')
         infx = info.innerHTML
//         fImg = infx.substring(infx.indexOf('thumbs') +7) //Use if Thumbs replaced for Full image in source file
//         fImg = fImg.substring(0,fImg.indexOf('\"'))      //Use if Thumbs replaced for Full image in source file
//       fImg = infx.substring(infx.indexOf('src') +5)  //Use if Full image loads from source file
//       fImg = fImg.substring(0,fImg.indexOf('\"'))    //Use if Full image loads from source file
       fImg = document.getElementById('pic').src    //Use if Full image loads from source file
	//---- 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 = document.getElementById('infotxt')
    iTxt = infotxt.innerHTML
 infotxt.style.display = 'none'
}

var  btnf = document.getElementById('btnf')
var  btnd = document.getElementById('btnd')
var  btnd2= document.getElementById('btnd2')
var  btnd3= document.getElementById('btnd3')
var  btni = document.getElementById('btni')
var 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 = document.getElementById('btnf')
var  btnd = document.getElementById('btnd')
var  btnd2= document.getElementById('btnd2')
var  btnd3= document.getElementById('btnd3')
var  btni = document.getElementById('btni')
var  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 = document.getElementById('price');
 var cost  = document.getElementById('cost');
 var desc  = document.getElementById('desc');
 var selected = document.getElementById('selected');
 var 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
	descr.innerHTML = type
}
  if (item == 'p2'){
	document.forms['paypal'].item_name.value  = title;
	document.forms['paypal'].amount.value     = amount;
	descr.innerHTML = type;
}
  if(item == "ap"||item == "vap"){
	document.forms['paypal'].item_name.value  = title
	document.forms['paypal'].amount.value     = amount
	descr.innerHTML = '<span class="red8ls">Artists Proof</span>'
  if(item == "vap"){descr.innerHTML = '<span class="red8">Proof</span>'}
}
  if(item == "mp"||item == "vmp"){
	document.forms['paypal'].item_name.value  = title;
	document.forms['paypal'].amount.value     = amount;
	descr.innerHTML = '<span class="red8">Matted Print</span>';
  if(item == "vmp"){descr.innerHTML = '<span class="red8">Matted</span>'}
}
  if(item == "o"){
	document.forms['paypal'].item_name.value  = title;
	document.forms['paypal'].amount.value     = amount;
	descr.innerHTML  = '<span class="red8">Original</span>';
}
	selected.style.backgroundColor  =  '#ffffff'
	selected.style.border           =  '1px solid #b00000'
showDollar()
}



