// contact page highlight
function highlight(objId) {
	var hObj = document.getElementById(objId);
	hObj.className = "HL_infoBox";
}
function clearHL(obj) {
	var hObjC = document.getElementById(obj);
	hObjC.className = "infoBox";
}

// tooltips
function addLoadEvent(func) {
			  var oldonload = window.onload;
			  if (typeof window.onload != 'function') {
			    window.onload = func;
			  } else {
			    window.onload = function() {
			      oldonload();
			      func();
			    }
			  }
			}
			
			function prepareInputsForHints() {
				var inputs = document.getElementsByTagName("input");
				for (var i=0; i<inputs.length; i++){
					// test to see if the hint span exists first
					if (inputs[i].parentNode.getElementsByTagName("span")[0]) {
						// the span exists!  on focus, show the hint
						inputs[i].onfocus = function () {
							this.parentNode.getElementsByTagName("span")[0].style.display = "block";
							this.parentNode.getElementsByTagName("input")[0].className = "inputTextFocus";
						}
						// when the cursor moves away from the field, hide the hint
						inputs[i].onblur = function () {
							this.parentNode.getElementsByTagName("span")[0].style.display = "none";
							this.parentNode.getElementsByTagName("input")[0].className = "inputText";
						}
					}
				}
				// repeat the same tests as above for selects
				var selects = document.getElementsByTagName("select");
				for (var k=0; k<selects.length; k++){
					if (selects[k].parentNode.getElementsByTagName("span")[0]) {
						selects[k].onfocus = function () {
							this.parentNode.getElementsByTagName("span")[0].style.display = "block";
						}
						selects[k].onblur = function () {
							this.parentNode.getElementsByTagName("span")[0].style.display = "none";
						}
					}
				}
			}
addLoadEvent(prepareInputsForHints);
//
function hideErr(obj) {
	var el = document.getElementById("errMsg");
	el.style.display = "none";
}

//
function hideErr(obj) {
	var el = document.getElementById("errMsg");
	el.style.display = "none";
}

//
function summaryToggle(objId) {
	var e = document.getElementById(objId);
	var e1 = document.getElementById('summaryToggleLink');
       if(e.style.display == 'block'){
          e.style.display = 'none';
          e1.innerHTML = 'ascunde/arata detalii oferta';

		  }
       else {
          e.style.display = 'block';
          e1.innerHTML = 'ascunde/arata detalii oferta';
          }
}
			
// toggler CASCO

function dotariToggle(objId) {
	var e = document.getElementById(objId);
       if(e.style.display == 'block'){
          e.style.display = 'none';

		  }
       else {
          e.style.display = 'block';
          }
}
