<?php
	/*
	osCommerce, Open Source E-Commerce Solutions 
	http://www.oscommerce.com 
	
	Copyright (c) 2003 osCommerce 
	
	osCommRes, Services Oline 
	http://www.oscommres.com 
	Copyright (c) 2005 osCommRes 
	
	Freeway eCommerce
	http://www.zac-ware.com/freeway
	Copyright (c) 2007 ZacWare
	
	Released under the GNU General Public License
	*/
	// Set flag that this is a parent file
	define( '_FEXEC', 1 );
	require('includes/application_top.php');
	tep_get_last_access_file();
	require('includes/functions/newsdesk_general.php');
	$table_product_categories=TABLE_NEWSDESK_CATEGORIES;
	$table_product_categories_description=TABLE_NEWSDESK_CATEGORIES_DESCRIPTION;
	$table_product=TABLE_NEWSDESK;
	$table_product_description=TABLE_NEWSDESK_DESCRIPTION;
	$table_product_to_categories=TABLE_NEWSDESK_TO_CATEGORIES;
	$product_name_str='newsdesk_article_name'; 
	$product_description_str='newsdesk_article_description';
	$product_shorttext_str='newsdesk_article_shorttext';
	$product_url_str='newsdesk_article_url';
	$product_viewed_str='newsdesk_article_viewed';
	$product_image_text_str='newsdesk_image_text';
	$product_image_text_two_str='newsdesk_image_text_two';
	$product_image_text_three_str='newsdesk_image_text_three';
	$product_image_str='newsdesk_image';
	$product_image_two_str='newsdesk_image_two';
	$product_image_three_str='newsdesk_image_three';
	$product_date_added_str='newsdesk_date_added';
	$product_last_modified_str='newsdesk_last_modified';
	$product_date_available_str='newsdesk_date_available';
	$product_status_str='newsdesk_status'; 
	$product_sticky_str='newsdesk_sticky';
	$product_id_str='newsdesk_id';
	$product_filename=FILENAME_NEWSDESK; 
	require('includes/functions/cms_news_faq.php'); 
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
		<title><?php echo TITLE; ?></title>
		<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
		<script language="JavaScript" src="includes/modules/newsdesk/html_editor/jsfunc.js" type="text/javascript"></script> 
		<!--<script type="text/javascript" src="htmlarea/htmlarea.js"></script>
		<script type="text/javascript" src="htmlarea/editor.js"></script>-->
		<?php require('includes/cms_news.js.php'); ?>
	</head>
	<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onLoad="SetFocus();">
		<div id="spiffycalendar" class="text"></div>
		<!-- header //-->
		<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
		<!-- header_eof //-->
		<!-- body //-->
		<table border="0" width="100%" cellspacing="2" cellpadding="2">
			<tr> 
				<!-- body_text //-->
				<td width="100%" valign="top">
					<table border="0" width="100%" cellspacing="0" cellpadding="2">
						<tr>
							<td>
								<table border="0" width="100%" cellspacing="0" cellpadding="2">
									<tr class="dataTableHeadingRow" style="height:27">
										<td class="main" width="3%" align="left" valign="bottom"><?php echo '<a style="cursor:hand;cursor:pointer;" onMouseOver="javascript:change_class(this,2);" onMouseOut="javascript:change_class(this,3);" id="img_new" href="javascript:expand_category(0,2);"  alt="Newsdesk" title="Newsdesk">'.tep_image('images/template/img_new.gif').'</a>'; ?></td>
										<td class="smallText" align="right" valign="bottom" width="15%"><?php	echo 'Search ' . ' ' . tep_draw_input_field('search', tep_db_prepare_input($HTTP_POST_VARS['search']),' onkeyup="javascript:go_search(event);"'); ?></td>
										<td valign="bottom" align="left" width="2%"><?php echo tep_image('images/template/img_search.gif','Search','','',' style="cursor:hand;cursor:pointer;" onclick="javascript:go_search(event);" valign="bottom" border="0" width="20" height="20"');?></td>
										<td align="right" width="2%"><?php echo TEXT_JUMP_TO . '&nbsp;' . tep_draw_pull_down_menu("cbo_jumpto",newsdesk_get_category_tree(),'','onChange="javascript:do_jump_list(this.value)"'); ?></td>
									</tr>
									<tr>
										<td colspan="4" class="dataTableHeadingContent"><?php echo HEADING_TITLE; ?></td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td valign="top">
								<table border="0" width="100%" cellspacing="0" cellpadding="2">
									<tr>
										<td class="dataTableHeadingContent" colspan="2" id="res_display" style="display:none"></td>
									</tr>
									<tr>
										<td colspan="2">
										   <?php echo tep_draw_form('new_product', FILENAME_NEWSDESK, 'command=file_upload', 'post', ' onSubmit="javascript:return AIM.submit(document.new_product, {\'onStart\' : startCallback_cms, \'onComplete\' : completeCallback_cms});" enctype="multipart/form-data"');?>
										   <input type='hidden' name='product_id' id='product_id'>						
											<input type="hidden" name="sort_order" id="sort_order">											
											<input type='hidden' name='action_type' id='action_type'>
											<input type='hidden' name='image_type' id='image_type'>
											<div id="search_details"><?php output_sub_result(0,1,'A',0,'',1); ?></div>
											<div id="new_category"></div>
											</form>
										</td>
									</tr>	
								</table>
							</td>
						</tr>
						<div id="ajax_load_img" style="display:none">
							<?php echo tep_image(DIR_WS_IMAGES . '24-1.gif');?>
						</div>
					</table>
				</td>
			</tr>	 
		</table>
		<!-- body_eof //-->
		<!-- footer //-->
		<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
		<!-- footer_eof //-->
	</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
	<script language="javascript">
		function do_hover_change(element,mode){
			if (element.mode && mode==element.mode) return;
			if (mode==2)
				element.firstChild.src=element.firstChild.src.replace(".gif","_hover.gif");
			else
				element.firstChild.src=element.firstChild.src.replace("_hover.gif",".gif");
			element.mode=mode;
		}
</script>
