	CreateXmlHttpObj( );
	var http = XmlHttpObj;  
	
	function show_commentForm(id){
		http.open( 'get', '../ajax/php_commentForm.php?id=' + encodeURIComponent( id ),true );
		
		http.onreadystatechange = handle_show_commentForm;
		http.send( null );
	} 

    function handle_show_commentForm(){
		
		if( http.readyState == 4 && http.status == 200 ){
		var response = http.responseText;
			if( response ){
				result = response.split('|');
				document.getElementById('commentForm').innerHTML = result[1];
			}
			showComments(result[0]);
		}
    }
	
	function checkForm(){
		//check if text field exists
		/*
		var found = 0;
		var inputs=document.getElementsByTagName("INPUT");
		for (var i=0; i<inputs.length; i++){
			if (inputs.item(i).type == "text"){
				var found = 1;
			}
		}
		
		if (found==1){
			alert('found');
		}
		else{
			alert('no text field found');
		}
		*/
		
		if (document.getElementById("code")=='undefined' || document.getElementById("code") == null){
			showCapcha();
		}
		else{
			show_commentProcess();
		}
		return;
	}