	
	/* Rol Visibility */
	function showRow(RowId) {
	
		if (document.getElementById(RowId) != null) {
		
			 document.getElementById(RowId).style.display = 'table-row';
		
		}
	
	}
	
	function hideRow(RowId) {
	
		if (document.getElementById(RowId) != null) {
		
			 document.getElementById(RowId).style.display = 'none';
		
		}
	
	}
	
	
	/* Mail Show Hide Function */
	function mailQuestion() {
		
		if(document.getElementById("check_public").checked == 1) {
		
			showRow("mail_row");
		
		} else {
		
			document.getElementById("check_mail").checked = 0;
			hideRow("mail_row");
		
		}
		
		
	}
	
	
	/* Ajax */
	function xajax(xResponse, xAction) {
	  var xmlHttp;
	  try
		{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
		}
	  catch (e)
		{
		// Internet Explorer
		try
		  {
		  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		  }
		catch (e)
		  {
		  try
			{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
		  catch (e)
			{
			alert("Your browser does not support AJAX!");
			return false;
			}
		  }
		}
		xmlHttp.onreadystatechange=function()
		  {
		  if(xmlHttp.readyState==4)
			{
			document.getElementById(xResponse).innerHTML=xmlHttp.responseText;
			document.getElementById('loader').innerHTML="";
			}
      }
	  
	 
	document.getElementById('loader').innerHTML="<img src='../../include/overfx/ajax/ajax-loader.gif' />"; 
    xmlHttp.open("GET", xAction,true);
    xmlHttp.send(null);
  }  
  
  
  /* Ajax mail confirm */
  function confirmImage() {
	  
		xajax("confirm_image", "confirm_image.php");
		
  }

  function confirmInput() {
  
  		var Input = document.getElementById("confirm_text").value;
		var cId = document.getElementById("c_id").value;
		var Command = "confirm_input.php?input=" + Input + "&c_id=" + cId;
		
  		xajax("confirm_result", Command);
  
  }
