
var img_dir='/~ybskin/images/';

var img_sources=new Array(
/* 
"yb_highlight.gif",
"products_highlight.gif",
"pro_highlight.gif",
"media_highlight.gif",
"where_buy_highlight.gif",
"pro_nav_tools_highlight.gif", // pro tools
"pro_nav_special_events_highlight.gif", // special pro events
"pro_nav_artist_highlight.gif", // artists programs & discounts

"yb.gif",
"products.gif",
"pro.gif",
"media.gif",
"where_buy.gif",
"pro_nav_tools.gif", // pro tools
"pro_nav_special_events.gif", // special pro events
"pro_nav_artist.gif", // artists programs & discounts
*/

"nav_products_hightlight.gif",
"nav_events_hightlight.gif",
"nav_tools_hightlight.gif",
"nav_programs_hightlight.gif",

"nav_products.gif", 
"nav_events.gif", 
"nav_tools.gif", 
"nav_programs.gif", 


"face.gif",
"eyes.gif",
"lips.gif",
"tools.gif",

"face_highlight.gif",
"eyes_highlight.gif",
"lips_highlight.gif",
"tools_highlight.gif"
);

var images=new Array();
var img=0;
while(img_sources[img]){
images[img]=new Image(); images[img].src=img_dir+img_sources[img];
img++;
}

function setSwatch(thing,src){
document.getElementById("swatch_img").src=src;
thing.style.backgroundColor="#303032";
if(thing.childNodes[0]){
  thing.childNodes[0].style.textDecoration='underline';
  }
if(thing.childNodes[1]){
  thing.childNodes[1].style.borderStyle="solid";
  thing.childNodes[1].style.borderColor="white";
  thing.childNodes[1].style.borderWidth="1px";
  }  
}

function clearSwatch(thing,element_type){
document.getElementById("swatch_img").style.backgroundColor='#010202';
thing.style.backgroundColor="transparent";
if(element_type!='heading'){
thing.childNodes[1].style.border='none';
thing.childNodes[0].style.textDecoration='none';
}
}

function show(id){
document.getElementById(id).style.display='block';
}

function displayBuyWindow(swatch_id){
document.getElementById(swatch_id).style.display='block';
}

function show_shopping_controls(swatch_id){
document.getElementById('shopping_controls_'+swatch_id).style.display='block';
document.getElementById('choose_dealer_or_direct_'+swatch_id).style.display='none';
}

function hide(id){
document.getElementById(id).style.display='none';
}

function highlight(node){
var id=node.parentNode.parentNode.id;
node.style.backgroundImage='url('+img_dir+id+'_highlight.gif)';
}

function reset(node){
var id=node.parentNode.parentNode.id;
node.style.backgroundImage='url('+img_dir+id+'.gif)';
}

