<script type="text/javascript" src='jscripts/ips_attach.js'></script>
	
<!-- ATTACH -->
 <div id='ips-attach-div-parent' class='attach-parentdiv' style='display:none;clear:both'>
 	<table cellpadding="0" cellspacing="0" border="0" style='padding:0px'>
	 <tr>
	  <td width='1%' style='padding:0px' nowrap='nowrap'><img class="ipd" src="{$this->ipsclass->vars['img_url']}/folder_attach_images/attach_logo.png"  border="0" alt="" /> <strong>{$this->ipsclass->lang['attach_header']}</strong></td>
	  <td width='99%' style='padding:0px' align='right'>
		<div class='attach-menubutton' id='ips-attach-menu' style='margin-right:2px;width:293px;'>
			<table cellpadding="0" cellspacing="0" border="0" style='padding:0px'>
			<tr>
				<td style='padding:0px'><div style='width:265px;text-align:left;font-size:10px;'>{$this->ipsclass->lang['attach_manage_current']} <span id='ips-attach-menu-text'>(0)</span></div></td>
				<td style='padding:0px' align='right'><img class="ipd" src="{$this->ipsclass->vars['img_url']}/folder_editor_images/icon_open.gif"  border="0" alt="" /></td>
			</tr>
			</table>
		</div>
	  </td>
	 </tr>
	 </table>
 	 <div id='ips-attach-div-iframe' style='height:67px;width:100%;text-align:center'></div>
	 <div id='ips-attach-div-status' style='height:20px;width:100%;text-align:left;font-weight:bold'></div>
 </div>
 <!-- ATTACH -->
 <!-- Status DIV -->
 <div id="ips-attach-message" style='display:none;z-index:999;' class='attach-messagediv'>
	<br />
	<br />
	<img class="ipd" src="{$this->ipsclass->vars['img_url']}/folder_attach_images/attach_wait.gif"  border="0" alt="" />
	<br />
	<br />
	<span class='attach-msg-span' id='ips-attach-message-span'>&nbsp;</span><br clear='all' /><br />
 </div>
	<script type="text/javascript">
	//<![CDATA[
	// INIT and such
	ipsattach.iframe_init_url    = "{$this->ipsclass->base_url}&act=attach&code=attach_upload_show&attach_rel_module={$type}&attach_rel_id={$id}&attach_post_key={$post_key}&--ff--forum_id=$forum_id";
	ipsattach.iframe_remove_url  = "{$this->ipsclass->base_url}&act=attach&code=attach_upload_remove&attach_rel_module={$type}&attach_rel_id={$id}&attach_post_key={$post_key}&--ff--forum_id=$forum_id";
	ipsattach.iframe_classname   = 'attach-iframe';
	ipsattach.images_url         = ipb_skin_url;
	ipsattach.lang =
	{
		'no_items'            : '{$this->ipsclass->lang['attach_js__no_items']}',
		'uploading_file'      : '{$this->ipsclass->lang['attach_js__uploading']}',
		'init_progress'       : '{$this->ipsclass->lang['attach_js__init']}',
		'upload_ok'           : "{$this->ipsclass->lang['attach_js__upload_success']}",
		'upload_failed'       : "{$this->ipsclass->lang['attach_js__upload_fail']}",
		'upload_too_big'      : "{$this->ipsclass->lang['attach_js__upload_fail1']}",
		'invalid_mime_type'   : "{$this->ipsclass->lang['attach_js__upload_fail2']}",
		'no_upload_dir'       : "{$this->ipsclass->lang['attach_js__upload_fail3']}",
		'no_upload_dir_perms' : "{$this->ipsclass->lang['attach_js__upload_fail4']}",
		'upload_no_file' 	  : "{$this->ipsclass->lang['attach_js__upload_fail5']}",
		'ready'               : "{$this->ipsclass->lang['attach_js__ready']}",
		'attach_remove'       : "{$this->ipsclass->lang['attach_js__delete']}",
		'attach_insert'       : "{$this->ipsclass->lang['attach_js__insert']}",
		'remove_warn'	 	  : "{$this->ipsclass->lang['attach_js__confirm']}",
		'attach_removed'      : "{$this->ipsclass->lang['attach_js__isremoved']}",
		'attach_removal'      : "{$this->ipsclass->lang['attach_js__removing']}"
	};
	ipsattach.init();
	ipsattach.show_attach_box();
	//]]>
	</script>