// Global JavaScripts
function displayOn( targetId ){
    if (document.getElementById){
  		target = document.getElementById( targetId );
		target.style.display = "";
  	}
}

function displayOff( targetId ){
    if (document.getElementById){
  		target = document.getElementById( targetId );
		target.style.display = "none";
  	}
}

function td( targetId ){
  if (document.getElementById){
 		target = document.getElementById( targetId );
	if (target.style.display == "none"){
		target.style.display = "block";
	} else {
		target.style.display = "none";
	}
	}
}



function LikeItMouseOut( targetId ){
    if (document.getElementById){
       // if (event.srcElement.id == "likeItBox"){
	        target = document.getElementById( targetId );
	        target.style.display = "none";
        //}
    } 
}

function textCounter( field, cntfield, maxlimit ) {
    dropdown = document.getElementById('ddlCategory');
    dropdown.disabled="disabled";
   
    if (field.value.length > maxlimit) { // if too long...trim it
        field.value = field.value.substring(0, maxlimit);
    } else { // otherwise, update 'characters left' counter
        cntfield.value = maxlimit - field.value.length;
    }
}

function warning() {
    alert("Thank you for visiting abovetheinfluence.com. You are now leaving the site. The Office of National Drug Control Policy is not responsible for the content or information gathering practices of other websites you are linking to.");
}

function isMouseLeaveOrEnter(e, handler) { if (e.type != 'mouseout' && e.type != 'mouseover') return false; var reltg = e.relatedTarget ? e.relatedTarget : e.type == 'mouseout' ? e.toElement : e.fromElement; while (reltg && reltg != handler) reltg = reltg.parentNode; return (reltg != handler); }