	var watches = [
	["Name 1", 1],
	["Name 2", 2],
	["Name 3", 3],
	["Name 4", 4],
	["Name 5", 5],
	["Name 6", 6]
	];
	
	 var wristlet = [
	["Large Homme", "#000000",1],
	["Croco Blanc", "#bbbbbb", 2],
	["Jean Clair", "#708192", 3],
	["Tresse Beige", "#938667", 4],
	["Vynil Blanc", "#e2dfdf", 5],
	["Cuir Argent", "#a6a9ba", 6],
	["Fluo Orange", "#e83304", 7],
	["Fluo Jaune", "#abce2a", 8],
	["Cuir Jaune", "#FBE31C", 9],
	];
	
	function render_watches()	{
	   for(i in watches)
	    {
	        document.write("<div><a href='javascript:show_pic(\"/i/watches/"+watches[i][1]+".jpg\",\"show1\",\"show2\")'><img src='/i/watches/"+watches[i][1]+".jpg'  alt='"+watches[i][0]+"'></a></div>");
	    }
	}
	
	function render_wristlet(){
	   for(i in wristlet)
	    {
	        document.write("<div style='background:"+wristlet[i][1]+"'><a href='javascript:wristlet_pic("+wristlet[i][2]+")' title='"+wristlet[i][0]+"'><!-- --></a></div>");
	    }
	}

	function change(photo){
		document.getElementById('bag_pic').src=photo;
	}
	
	function show_pic(pic,hidelem,showelem){
		document.getElementById('bag_pic').src=pic;
		document.getElementById(hidelem).style.display='none';
		document.getElementById(showelem).style.display='block';
	}
	
	function closecart(stat){
	if (stat == 'hide'){
		document.getElementById('sliding_cart').style.display='none';
		document.getElementById('a_view').style.display='block';
		}
	else if (stat == 'show'){
		document.getElementById('sliding_cart').style.display='block';
		document.getElementById('a_view').style.display='none';
		}
	}
	
	function closechangepassword(stat){
	
	if (stat == 'hide'){
		document.getElementById('al_changePassword').style.display='none';
		}
	else if (stat == 'show'){
		document.getElementById('al_changePassword').style.display='block';
		}
	}

	function closelogin(stat){
	
	if (stat == 'hide'){
		document.getElementById('al_login').style.display='none';
		document.getElementById('al_register').style.display='none';
		document.getElementById('al_lostPassword').style.display='none';
		document.getElementById('login_link').style.display='block';
		}
	else if (stat == 'show'){
		document.getElementById('al_login').style.display='block';
		document.getElementById('login_link').style.display='none';
		}
	}
	
	function showElem(id){
		document.getElementById(id).style.display='block';
	}
	
	function wristlet_pic(pic_id){
		document.getElementById('comb').style.background='url(/i/wristlets/'+pic_id+'.jpg)';
	}
	
	function wristlet_pic_cat(pic_id,prodname,prodprice,watches_price,id,nostock){
	
	if (pic_id==" "){
		//alert('пусто');
		document.getElementById('ext_product_id').value = "";
		document.getElementById('wrist_price').firstChild.nodeValue = " ";
		document.getElementById('wrist_name').firstChild.nodeValue = "не выбран.";
		document.getElementById('wrist_nostock').firstChild.nodeValue = "";
		document.getElementById('comb').style.background='url(/i/no_wrist.jpg)';
		document.getElementById('wrist_nostock').firstChild.nodeValue = " ";
	}
	else{
		document.getElementById('ext_product_id').value = id;
		document.getElementById('wrist_price').firstChild.nodeValue = prodprice+" руб.";
		document.getElementById('wrist_name').firstChild.nodeValue = prodname+',';
		document.getElementById('comb').style.background='url(/wp-content/uploads/wpsc/product_images/'+pic_id+')';
		if(nostock==1){ 
		document.getElementById('wrist_nostock').firstChild.nodeValue = " (нет на складе)"; 
		document.getElementById('noadd_to_cart').style.display='block';
		}
		else { document.getElementById('wrist_nostock').firstChild.nodeValue = " "; 
		document.getElementById('noadd_to_cart').style.display='none';}
	}
		
		//document.getElementById('wrist_name').firstChild.nodeValue = prodname+',';
		//document.getElementById('wrist_price').firstChild.nodeValue = prodprice+" руб.";
		document.getElementById('full_price').firstChild.nodeValue = parseFloat(watches_price)+parseFloat(prodprice)+" руб.";
		return true;
	}
	
	
