	var outFormOptions = new Array();
	var outFormLabels = new Array();

    function verform(product, product_id){
    	var product_name = product;
    	var product_id = product_id;
    	var outdata = '';
    	var outdataHTML = '';
		var form = $('product_addtocart_form');
		var inputes = form.getElements();

			inputes.each(function(inpute){
				if(inpute.name != 'qty'){
					var type = inpute.type;
					if(type == 'text'){
						var value = inpute.value;
						if(value != ''){
							label = readLabelOption(inpute.id);
							opcion = inpute.value;
							setOut(label, opcion);
						}
					}

					if(type == 'checkbox' || type == 'radio'){
						if(inpute.checked == true){
							label = readLabelOption(inpute.id);
							var selector = '[for="' + inpute.id + '"]';
							opcion = $('product_addtocart_form').getElementsBySelector(selector)[0].innerHTML;
							setOut(label, opcion);
						}
					}

					if(type == 'select-one' || type == 'select-multiple'){
						$(inpute.id).childElements().each(function(o){
							if(o.selected){
								if(o.value != ''){
									label = readLabelOption(inpute.id);
									opcion = o.innerHTML.stripTags().unescapeHTML();
									setOut(label, opcion);
								}
							}

						});
					}

					if(type == 'textarea'){
						var value = $(inpute.id).value;
						if(value != ''){
							label = readLabelOption(inpute.id);
							opcion = value;
							setOut(label, opcion);
						}
					}
				}

			});


			if(outFormLabels.size() > 0){
				outdata+= "Product: " + product_name + "\n";
				outdataHTML+= '<h3 class="title">' + product_name + " (" + product_id + ")</h3><br/>";
				for (var i=0;i<outFormLabels.length;i++){
					outdata+= outFormLabels[i] + "\n";
					outdataHTML+= '<strong>' + outFormLabels[i] + '</strong><br/>';
					for (var j=0;j<outFormOptions[i].length;j++){
						outdata+= outFormOptions[i][j] + "\n";
						outdataHTML+= outFormOptions[i][j] + "<br/>";
					}
				}
				outdataHTML+= '<input type="hidden" name="productoptions" value="' + escape(outdata) + '"/>';
		    	outFormLabels.clear();
		    	outFormOptions.clear();
		    	$('product-quote').innerHTML = outdataHTML;
		    	$('from-quote').scrollTo();
		    	$('back-opacity').show();
		    	$('from-quote').show();

			}else{
				outdata+= "Product: " + product_name + "\n";
				outdataHTML+= '<h3 class="title">' + product_name + " (" + product_id + ")</h3><br/>";
				outdataHTML+= '<input type="hidden" name="productoptions" value="' + escape(outdata) + '"/>';
		    	outFormLabels.clear();
		    	outFormOptions.clear();
		    	$('product-quote').innerHTML = outdataHTML;
		    	$('from-quote').scrollTo();
		    	$('back-opacity').show();
		    	$('from-quote').show();
			}

    }

    function setOut(key, value){
    	position = outFormLabels.indexOf(key);
    	if(position != -1){
    		nextpos = outFormOptions[position].size();
    		outFormOptions[position][nextpos] = value;
    	}else{
    		if(outFormLabels.last() == undefined){
    			outFormLabels[0] = key;
    			outFormOptions[0] = new Array(value);
    		}else{
    			nextpos = outFormLabels.size();
    			outFormLabels[nextpos] = key;
    			outFormOptions[nextpos] = new Array(value);
    		}
    	}
    }

    function readLabelOption(element_id){
    	return $(element_id).up('dd').previousSiblings()[0].down(0).innerHTML.stripTags().unescapeHTML();
    }

    function getIdentifier(element_id){
    	return $(element_id).up('dd').identify();
    }

    function CloseFormQuote(){
    	$('back-opacity').hide();
    	$('from-quote').hide();
    }
