/**
 * @author kelly
 */

 
 function send_comment() {
 	var url = '/_inc/function/call.php';
	
	var pars = 'action=add_comment'+'&node=' + $('node').value+'&user_code=' + encodeURIComponent($('user_code').value) +'&name=' + encodeURIComponent($('comment_name').value) +'&comment_text=' + encodeURIComponent($('comment_text').value)  ;
	
	var myAjax = new Ajax.Request( 
			url, 
			{ 
					method: 'get', 
					parameters: pars, 
					onSuccess: function(transport, json){
				      var response = transport.responseText || "";
					  //alert("Success! \n\n" + response);
			  	 	  $('comments').innerHTML = response;
				    },
    				onFailure: function(){ alert('Unable to remove content. Please try again later.') } 
			}
	);	
	
 }
 
 
function bookmark(url,title){
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}