function getDisplayForObj(tag) {
	if (document.all) {
		disp = "";
	} else {
		switch (tag) {
		case "TABLE" :
			var disp = "table";
			break;
		case "TR" :
			var disp = "table-row";
			break;
		case "A" :
			var disp = "inline";
			break;
		default :
			var disp = "block";
			break;
		}
	}
	return disp;
}
function showCat(i,obj) {
	document.getElementById("categoria").innerHTML = obj.innerHTML
	var allDIV = document.getElementsByTagName("DIV")
	var cat = ""
	for (x = 0; x < allDIV.length ; x++){
	   	cat = allDIV[x].getAttribute("cat")
		if (cat) {
			if (cat == i){
		  	allDIV[x].style.display = getDisplayForObj("DIV") 
		}
		else {
			allDIV[x].style.display = "none"
	
		}
		}
	}
	
}
function init(i) {
	/*var input = document.getElementsByTagName("INPUT")
	var quantiI = input.length
	var x = 0;
	do {
	
	if (input[x].getAttribute("placeholder") != ""){
	input[x].value = input[x].getAttribute("placeholder")
	input[x].style.color = "#999"
	
	}
	
	x++;
	}
	
	while(x < quantiI)*/
	var baseClass = document.getElementById("menu"+i).getAttribute("sezione");
	document.getElementById("menu"+i).className = baseClass;
	
	if (screen.width>=1200) {
 document.getElementsByTagName("TABLE")[0].style.width ="1200px"
}

//-->


}
function placeHolder(obj, stato) {
	var placeH = obj.getAttribute("placeholder");
	var myValue = obj.value;
	if (stato == 1) {
		if (myValue == placeH) {
			obj.value = "";
		}
		obj.style.color = "#000";
		obj.style.borderColor = "#00BFFF";
	} else {
		if (myValue == "") {
			obj.value = placeH;
			obj.style.color = "#999";
		}
		var coloreBordo = obj.getAttribute("colorebordo");
		obj.style.borderColor = coloreBordo;
	}
}
function getStyle(el, styleProp) {
	var x = document.getElementById(el);
	if (x.currentStyle) {
		var y = x.currentStyle[styleProp];
	} else if (window.getComputedStyle) {
		var y = document.defaultView.getComputedStyle(x, null).getPropertyValue(styleProp);
	}
	return y;
}
