//confirm anysubmit 
function confirmSubmit(strAsk) {
	return (confirm(strAsk))
}
//hide form clienti
function togglePurDec(evt) {
    evt = (evt) ? evt : event;
    var target = (evt.target) ? evt.target : evt.srcElement;
    var block = document.getElementById("HideForm");
    var block2 = document.getElementById("ShowForm");
        
    if (target.id == "minor") {
        block.style.display = "block";
        block2.style.display = "none";
    } else {
        block.style.display = "block";
		block2.style.display = "none";  
    }
}
//maxlength
function ismaxlength(obj)
{
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}

//highlight row if is checked
function highlightRow(InputNode) {
    var el = InputNode;
    while (el.nodeType != 1 || el.nodeName.toLowerCase() != 'tr')
           el = el.parentNode;
    el.style.backgroundColor = (InputNode.checked) ? '#D8C5D8' : '';
}

function blinklink() {
if (!document.getElementById('blink').style.color)
	{
	document.getElementById('blink').style.color="#FFFFFF";
	}
if (document.getElementById('blink').style.color=="#FFFFFF")
	{
	document.getElementById('blink').style.color="#000000";
	}
else
	{
	document.getElementById('blink').style.color="#FFFFFF";
	}
timer=setTimeout("blinklink()",800);
}

function stoptimer() {
	clearTimeout(timer);
}

function changeColor(color)
{
document.getElementById('x').style.background='#000000';
}

function makeCheck(thisForm)
{
for (i = 0; i < thisForm.option.length; i++)
	{
	thisForm.option[i].checked=true;
	}
}

function makeUncheck(thisForm)
{
for (i = 0; i < thisForm.option.length; i++)
	{
	thisForm.option[i].checked=false;
	}
}
