function qtyCartAction(item,action){
	dml=document.forms['product_addtocart_form'];

   	// get the number of elements from the document

 	len = dml.elements.length;

	for( i=0 ; i<len ; i++){
		if ( dml.elements[i].name == item){
			if(action == 'inc'){
				dml.elements[i].value = parseInt(dml.elements[i].value) + 1;
			}
			
			if(action == 'dec'){
				if( parseInt(dml.elements[i].value) >0)
					dml.elements[i].value = parseInt(dml.elements[i].value) - 1;
			}
			
			if(action == 'submit'){
				if(parseInt(dml.elements[i].value) <=0){
					//alert(dml.elements[i].name)
					dml.elements[i].value = 1;
				}
				
			}
		}		
	}
	if(action == 'submit'){
		document.product_addtocart_form.submit();
	}
}

function showHideBlock(idBlock, obj){    
      
	 current = document.getElementById(idBlock).style.display;
	 
	 if( current == "block" ){
		 document.getElementById(idBlock).style.display = "none";
		 obj.className = "headLink";
	 }
	 if( current == "none" ){
		 document.getElementById(idBlock).style.display = "block";
		 obj.className = "headLinkOpen";
	 }
}

function attribFun(divId, obJ){
	var ids = new Array("beta","alpha","theta", "delta", "gamma");
	len = ids.length;
	
	current = document.getElementById(divId).style.display;
	
	for( i=0 ; i<len ; i++){
		if(document.getElementById(ids[i])){
		 
		
		document.getElementById(ids[i]).style.display = "none";
		
		if(ids[i] == divId){			
			 if( current == "none" ){
				document.getElementById(divId).style.display = "block";
				obJ.className = "panelattrOpen";
			 }
			 
			 if( current == "block" ){
				document.getElementById(divId).style.display = "none";
				obJ.className = "panelattr";
			 }
		}	}	
	}
	
	 if( current == "block" ){
		document.getElementById(divId).style.display = "none";
		obJ.className = "panelattr";
	 }
	
		
}