function processHref(href){
location.href = href;
return true;
}
function addPhoto(){
  photoFormContent = document.getElementById('addphoto').innerHTML;
  photoInputElement = '<label for="photo-miniature">Miniatura</label> <input id="photo-miniature" name="photo-miniature" size="4" type="file"/> <label for="photo-miniature">Fotografie</label> <input id="photo" name="photo" size="4" type="file"/><br/>';
  document.getElementById('addphoto').innerHTML = photoInputElement + photoFormContent;
  return 0;
}

function submitOrderForm(){
  document.getElementById('orderFormAction').innerHTML = '<input type="hidden" name="action" value="createPurchase"/>';
  document.forms['orderForm'].submit();
}

function enableExtendedSearch(){
document.getElementById('extendedSearch').innerHTML = document.getElementById('extendedSearchHidden').innerHTML;
document.getElementById('extendedSearchHidden').innerHTML = "";
}

function changeVisibility(blockId){
	var input = null;
	var attrValue = document.getElementById(blockId).getAttribute("style");//attributes.getNamedItem("style").nodeValue;
	attrValue = attrValue.toLocaleLowerCase();
	if(attrValue == "display: none;" || attrValue == "display: none"){
		document.getElementById(blockId).setAttribute("style","display: block;")//attributes.getNamedItem("style").nodeValue = "display: block;";
	}
	else if(attrValue == "display: block;" || attrValue == "display: block"){
		document.getElementById(blockId).setAttribute("style", "display: none;");//attributes.getNamedItem("style").nodeValue = "display: none;";
		/*document.getElementById(blockId).getElementsByTagName("input");
		for ( var int = 0; int < list.length; int++) {
			input = list.item(int);
			input.attributes.getNamedItem("value").nodeValue = null;
		}*/
	}
}

