var http = getHTTPObject();

//-------------------------------------------------------------------------------------
  function getHTTPObject()
  {
    var xmlhttp;
    try{xmlhttp = new XMLHttpRequest(); /* e.g. Firefox */}
    catch(e)
    {
      try{xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");  /* some versions IE */}
      catch (e)
      {
        try{xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");  /* some versions IE */}
        catch (e)
        {
          xmlhttp = false;
        }
      }
    }
    return xmlhttp;
  }


/*
function getDuration(f,cli){
	var theDur = f.programmeSource.value;
	var myRandom=parseInt(Math.random()*99999999);  // cache buster
	//alert("sending " + URLencode(theDur) + " " + cli);
	var url="/getDuration.php" + "?rand=" + myRandom + "&id=" + URLencode(theDur) + "&cid=" + cli;
	http.open("GET", url, true);
	http.onreadystatechange = setDurationsAlt;
	http.send(null);

  }
*/
function showHidePanel(elemId) {

	var browser = navigator.appName;

	if (browser=='Netscape')
		var displayType = 'table';
	else
		var displayType = 'block';

	var element = document.getElementById(elemId);

	if ((element.style.display==displayType) || (element.style.display==''))
		element.style.display='none';
	else {
		element.style.display=displayType;
	}

}

function showHideSubPanel(elemId) {
	var browser = navigator.appName;

	if (browser=='Netscape')
		var displayType = 'table-row';
	else
		var displayType = 'block';

	var element = document.getElementById(elemId);

	if ((element.style.display==displayType) || (element.style.display==''))
		element.style.display='none';
	else {
		element.style.display=displayType;
	}

}

/**
 *
 * @access public
 * @return void
 **/
function confirm_alert(){
	var answer = confirm("Are you sure for that action?")
	return answer;
}
