var handleSuccess = function(o){
	if(o.responseText !== undefined && o.responseText!=''){
		var dowhat=o.argument.dowhat;
		var id=o.argument.el_id;
		var text=o.responseText;
		if (dowhat=='pic_comments'){
			document.getElementById('pic_comms_'+id).style.visibility='visible';
			document.getElementById('text_'+id).innerHTML=text;
		}else if (dowhat=='panel_comments'){
			document.getElementById(id).innerHTML=text;
		}else if (dowhat=='appcam'){
			document.getElementById(id).style.backgroundColor='#ffffff';
			document.getElementById(id).style.display='none';
    }
	}
}

var handleFailure = function(o){
	if(o.responseText !== undefined){
		alert("Status code message: " + o.statusText);
	}
}

var callback =
{
	success:handleSuccess,
	failure:handleFailure,
	argument: ["text","panel_id"]
};

function makeRequest(sUrl){
	var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
}
