<div id="content">
	<div id="bread"><a href="/"><?=$this->translate->_('home')?></a> &gt; <a href="/helpcenter/"><?=$this->translate->_('help center')?></a> &gt; <a href="/helpcenter/helprequests"><?=$this->translate->_('help requests')?></a> &gt; <?=$this->case_number?></div>
	<h1><?=$this->translate->_('Help Center')?></h1>
	<div class="helpCenterTop">
		<a href="/helpcenter/videos" class="smallroundedbtn"><?=$this->translate->_('Video Tutorials')?></a><a class="smallroundedbtnOn" href="/helpcenter/helprequests"><?=$this->translate->_('Help Requests')?></a><a class="smallroundedbtn" href="/helpcenter/"><?=$this->translate->_("FAQ's")?></a>
	</div>
	<h3 class="clear"><?=$this->translate->_('Help Requests')?></h3>
	<!-- Start Request Detail-->
	<div class="requestStatusWrap"><?=$this->translate->_('Status')?>: <span class="requestStatus <?=$this->status_classes[$this->status]?>"><?=$this->status?></span></div>
	<div class="helpRequestDetail">
		<h3><?=$this->translate->_('Re')?>: <span class="subtextlink"><?=$this->category?></span></h3>
		<ul>
			<li><span class="subtextlink2"><?=$this->translate->_('Case Number')?>: </span><?=$this->case_number?></li>
			<li><span class="subtextlink2"><?=$this->translate->_('Created On')?>: </span><?=$this->date_created?></li>
			<!--<li><span class="subtextlink2"><?//=$this->translate->_('Topic')?>: </span><?//=$this->category?></li>-->
			<?	if ($this->upcs) { ?>
			<li><span class="subtextlink2"><?=$this->translate->_('Release')?>: </span>
				<table cellpadding="1" cellspacing="0">
				<tr><td>
			<?		foreach ($this->upcs as $display_upc => $release_name) {
						echo $release_name.' ('.$display_upc.')<br />';
					}?>
					</td>
				</tr>
				</table>
			</li>
			<?	} ?>
			<li><span class="subtextlink2"><?=$this->translate->_('Description')?>: </span><?=$this->description?></li>
		</ul>
	</div>
<?	if ($this->resolution) {?>
	<div class="resolutionWrap clear">
		<h3>Resolution:</h3>
		<p><?=$this->resolution?></p>
	</div>
	<div class="clear"><br /></div>
<?	}
	if (count($this->notes)) {
		foreach ($this->notes as $note_id => $note_detail) { ?>
	<div class="clearborder"></div>
	<div class="helpRequestNote">
		<p class="subtextlink2"><span class="subtextlink"><?=$note_detail['created_by']?></span> <?=$this->translate->_('responded on')?> <?=$note_detail['date_modified']?></p>
		<p><?=$note_detail['note_detail']?></p>
	</div>
<?		}
	}?>
	<div class="clear"></div>
	<div class="comment">
		<label><?=$this->translate->_(($this->status == 'resolved'?'Not resolved? Re-open this request by adding a comment below':'Add a note to this request'))?>:</label>
		<form>
			<textarea name="description" cols="40" rows="4" id="description"></textarea><br />
			<span class="missing" style="display:none" id="description_missing"><?=$this->translate->_('description required')?></span>
		</form>
		<p><a class="smallrounded" id="submit_button" href="javascript:submitNote();"><?=$this->translate->_(($this->status == 'resolved'?'Re-open This Help Request':'Add Note'))?></a></p>
	</div>
	<!-- End Request Detail-->
</div>
<script>
	function getMyObj() {
		var myObj = new Object();

		myObj['case_id'] = '<?=$this->case_id?>';
		myObj['description'] = $('#description').val();

		return myObj;
	}

	function submitNote(){
		var no_post = false;

		if ($('#description').val() == '') {
			$('#description_missing').show();
			no_post = true;
		}

		if (!no_post) {
			myObj = getMyObj();
			$('#submit_button').html('<?=$this->translate->_('Submitting')?>...');
			$.post('/helpcenter/addnote', myObj, function(data) {
				if(data.success == 1){
					location.reload();
				}
			},'json');
		}
	}
</script>