<?php echo $header; ?>

<div id="content">

  <div class="breadcrumb">

    <?php foreach ($breadcrumbs as $breadcrumb) { ?>

    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>

    <?php } ?>

  </div>

  <?php if ($error_warning) { ?>

  <div class="warning"><?php echo $error_warning; ?></div>

  <?php } ?>

  <div class="box">

    <div class="heading">

      <h1><img src="view/image/product.png" alt="" /> <?php echo $heading_auction_templates; ?></h1>

      <div class="buttons"><a onclick="$('#form').submit();" class="button"><span><?php echo $button_save; ?></span></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div>

    </div>

    <div class="content">
    <div id="tabs" class="htabs"><a href="#tab_general"><?php echo $tab_general; ?></a><a href="#tab_categories"><?php echo $tab_categories; ?></a><a href="#tab_features"><?php echo $tab_features; ?></a><a href="#tab_shipping"><?php echo $tab_shipping; ?></a><a href="#tab_condition"><?php echo $tab_condition; ?></a></div>
    <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
      <div id="tab_general">
        <div id="languages" class="htabs">
          <?php foreach ($languages as $language) { ?>
          <a tab="#language<?php echo $language['language_id']; ?>"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /> <?php echo $language['name']; ?></a>
		  <?php } ?>
        </div> 
        <?php foreach ($languages as $language) { ?>
        <div id="language<?php echo $language['language_id']; ?>">
          <table class="form">
            <tr>
              <td><span class="required">*</span> <?php echo $entry_auction_title; ?></td>
              <td><input type="text" name="auction_title" size="100" value="<?php echo isset($title) ? $title: ''; ?>" />
                <?php if (isset($error_name[$language['language_id']])) { ?>
                <span class="error"><?php echo $error_name[$language['language_id']]; ?></span>
                <?php } ?></td>
            </tr>            
			<tr>              
			<td><?php echo $entry_auction_subtitle; ?></td>              
			<td><input type="text" name="auction_subtitle" size="100" value="<?php echo isset($subtitle) ? $subtitle: ''; ?>" /></td>            
			</tr>
          <tr>
            <td><?php echo $entry_auction_image; ?></td>
            <td><input type="hidden" name="auction_image" value="<?php echo $image; ?>" id="image" />
              <img src="<?php echo $preview; ?>" alt="" id="preview" class="image" onclick="image_upload('image', 'preview');" /></td>
          </tr>
            <tr>
              <td><?php echo $entry_auction_describe; ?></td>
              <td><textarea name="auction_description" id="auction_description"><?php echo isset($description) ? $description : ''; ?></textarea></td>
            </tr>
			<tr>            
				<td><?php echo $entry_auction_quantity; ?></td>            
				<td><input type="text" name="auction_quantity" value="<?php echo $quantity; ?>" size="2" /></td>
			</tr>		  		  	
				<tr>            
				<td><?php echo $entry_auction_duration; ?></td>			
				<td><select name="auction_duration">				
				<option value="<?php echo $text_oneday; ?>" <?php if( $auction_duration == $text_oneday || $auction_duration  == '') { echo 'selected = "selected"'; }  ?>><?php echo $text_oneday; ?></option>				
				<option value="<?php echo $text_threedays; ?>" <?php if( $auction_duration == $text_threedays) { echo 'selected = "selected"'; } ?>><?php echo $text_threedays; ?></option>				
				<option value="<?php echo $text_fivedays; ?>" <?php if( $auction_duration == $text_fivedays) { echo 'selected = "selected"'; } ?>><?php echo $text_fivedays; ?></option>				
				<option value="<?php echo $text_sevendays; ?>" <?php if( $auction_duration == $text_sevendays) { echo 'selected = "selected"'; } ?>><?php echo $text_sevendays; ?></option>				
				<option value="<?php echo $text_tendays; ?>" <?php if( $auction_duration == $text_tendays) { echo 'selected = "selected"'; } ?>><?php echo $text_tendays; ?></option>				
				<option value="<?php echo $text_thirtydays; ?>" <?php if( $auction_duration == $text_thirtydays) { echo 'selected = "selected"'; } ?>><?php echo $text_thirtydays; ?></option>   
				<option value="<?php echo $text_gtc; ?>" <?php if( $auction_duration == $text_gtc) { echo 'selected = "selected"'; } ?>><?php echo $text_gtc; ?></option>   
				</select>
				</td>          
				</tr>		  		 
				<tr>           
				<td><?php echo $entry_auction_buyitnowprice; ?></td>            
				<td><input type="text" name="auction_buyitnowprice" value="<?php echo $price; ?>" /></td>          
				</tr>          
				<tr>            
				<td><?php echo $entry_auction_type; ?></td>			  
				<td> 
				<?php if ($auction_type == "Fixed Price" ) { ?>
					<input type="radio" name="auction_type" value="<?php echo $text_fixed; ?>" checked="checked" onClick="auction_startprice.disabled=true"/>
					<?php echo $text_fixed; ?>              
					<input type="radio" name="auction_type" value="<?php echo $text_online; ?>" onClick="auction_startprice.disabled=false"/>			   
					<?php echo $text_online; ?> 
				  <?php } ?>
				<?php if ($auction_type == "Online Auction" ) { ?>
					<input type="radio" name="auction_type" value="<?php echo $text_fixed; ?>" onClick="auction_startprice.disabled=true"/>
					<?php echo $text_fixed; ?>              
					<input type="radio" name="auction_type" value="<?php echo $text_online; ?>" checked="checked" onClick="auction_startprice.disabled=false"/>			   
					<?php echo $text_online; ?> 
				  <?php } ?>
				  </td>          
				</tr>
				<tr>
				<td><?php echo $entry_auction_startprice; ?></td>            
				<td>
				<?php if ($auction_type == "Fixed Price" ) { ?>
				<input type="text" name="auction_startprice" value=""  disabled="true"/>
				<?php } ?>	
				<?php if ($auction_type == "Online Auction" ) { ?>
				<input type="text" name="auction_startprice" value="<?php echo $auction_startprice; ?>"  />
				<?php } ?>	
				</td>          
				</tr> 
				<tr>
					<td><?php echo $entry_auction_immediatepayment; ?></td>            
					<td> 
					<?php if ($auction_immediatepayment == $text_yes ) { ?>
					<input type="radio" name="auction_immediatepayment" value="<?php echo $text_yes; ?>" checked="checked" />
					<?php echo $text_yes; ?>              
					<input type="radio" name="auction_immediatepayment" value="<?php echo $text_no; ?>"/>			   
					<?php echo $text_no; ?> 
					<?php } ?>
					<?php if ($auction_immediatepayment == $text_no ) { ?>
					<input type="radio" name="auction_immediatepayment" value="<?php echo $text_yes; ?>" />
					<?php echo $text_yes; ?>              
					<input type="radio" name="auction_immediatepayment" value="<?php echo $text_no; ?>" checked="checked" />			   
					<?php echo $text_no; ?> 
				  <?php } ?>
				  </td>          
				</tr> 

          </table>
        </div>
		<?php } ?>
      </div>
      <div id="tab_categories">
        <table class="form">
		<tr>           
				<td><?php echo $entry_auction_category; ?></td>            
				<td><input type="text" name="auction_category" id="auction_category" value="<?php echo $auction_category; ?>" READONLY="true"/></td>          
		</tr>  
			<tr>
				<td><?php echo $entry_auction_categorys; ?></td>
                <td style="padding: 0;" ><select size="10" multiple="multiple" id="category1" style="width: 350px;" onChange="ajaxGetCategories(1,'<?php echo $ebay_subcat_url; ?>');">
                      <?php foreach ($ebaycats as $category) { ?>
                      <option value="<?php echo $category['cat_id']; ?>"><?php echo $category['cat_name']; ?></option>
                      <?php } ?>
                    </select>
					<select size="10" multiple="multiple" id="category2" style="width: 350px;" onChange="ajaxGetCategories(2,'<?php echo $ebay_subcat_url; ?>');">
					</select>
					</td>
            </tr>
			<tr>
				<td><?php echo $entry_auction_categorys; ?></td>
					<td style="padding: 0;" ><select size="10" multiple="multiple" id="category3" style="width: 350px;" onChange="ajaxGetCategories(3,'<?php echo $ebay_subcat_url; ?>');">
					</select><select size="10" multiple="multiple" id="category4" style="width: 350px;" onChange="ajaxGetCategories(4,'<?php echo $ebay_subcat_url; ?>');">
					</select></td>
				</tr>
			<tr>
				<td><?php echo $entry_auction_categorys ?></td>
					<td style="padding: 0;" ><select size="10" multiple="multiple" id="category5" style="width: 350px;" onChange="ajaxGetCategories(5,'<?php echo $ebay_subcat_url; ?>');">
					</select><select size="10" multiple="multiple" id="category6" style="width: 350px;" onChange="ajaxGetCategories(6,'<?php echo $ebay_subcat_url; ?>');">
					</select></td>
			</tr>
        
        </table>
      </div>
       <div id="tab_features">
		<table class="form">
		<tr>
			<td><?php echo $entry_auction_galleryplus; ?></td>            
					<td> 
					<?php if ($auction_galleryplus == $text_yes ) { ?>
					<input type="radio" name="auction_galleryplus" value="<?php echo $text_yes; ?>" checked="checked" />
					<?php echo $text_yes; ?>              
					<input type="radio" name="auction_galleryplus" value="<?php echo $text_no; ?>"/>			   
					<?php echo $text_no; ?> 
					<?php } ?>
					<?php if ($auction_galleryplus == $text_no ) { ?>
					<input type="radio" name="auction_galleryplus" value="<?php echo $text_yes; ?>" />
					<?php echo $text_yes; ?>              
					<input type="radio" name="auction_galleryplus" value="<?php echo $text_no; ?>" checked="checked" />			   
					<?php echo $text_no; ?> 
				  <?php } ?>
				  </td>  			
		</tr> 
		<tr>
			<td><?php echo $entry_auction_bold; ?></td>            
					<td> 
					<?php if ($auction_boldtitle == $text_yes ) { ?>
					<input type="radio" name="auction_boldtitle" value="<?php echo $text_yes; ?>" checked="checked" />
					<?php echo $text_yes; ?>              
					<input type="radio" name="auction_boldtitle" value="<?php echo $text_no; ?>"/>			   
					<?php echo $text_no; ?> 
					<?php } ?>
					<?php if ($auction_boldtitle == $text_no ) { ?>
					<input type="radio" name="auction_boldtitle" value="<?php echo $text_yes; ?>" />
					<?php echo $text_yes; ?>              
					<input type="radio" name="auction_boldtitle" value="<?php echo $text_no; ?>" checked="checked" />			   
					<?php echo $text_no; ?> 
				  <?php } ?>
				  </td>  
		</tr> 
		<tr>
			<td><?php echo $entry_auction_includesubtitle; ?></td>             
					<td> 
					<?php if ($auction_includesubtitle == $text_yes ) { ?>
					<input type="radio" name="auction_includesubtitle" value="<?php echo $text_yes; ?>" checked="checked" />
					<?php echo $text_yes; ?>              
					<input type="radio" name="auction_includesubtitle" value="<?php echo $text_no; ?>"/>			   
					<?php echo $text_no; ?> 
					<?php } ?>
					<?php if ($auction_includesubtitle == $text_no ) { ?>
					<input type="radio" name="auction_includesubtitle" value="<?php echo $text_yes; ?>" />
					<?php echo $text_yes; ?>              
					<input type="radio" name="auction_includesubtitle" value="<?php echo $text_no; ?>" checked="checked" />			   
					<?php echo $text_no; ?> 
				  <?php } ?>
				  </td> 			
		</tr> 
		</table>
      </div>
	  <div id="tab_shipping">
        <table class="form">

          <tr>
            <td><?php echo $entry_auction_usshipping; ?></td>
			<td><select name="auction_shipping" id="shipping_type" onChange="setcalculated();">	
				<?php if ( $auction_shipping == $text_flat ) { ?>
				<option value="<?php echo $text_flat; ?>" selected="selected"><?php echo $text_flat; ?></option>				
				<option value="<?php echo $text_calculated; ?>"><?php echo $text_calculated; ?></option>				
				<option value="<?php echo $text_freight; ?>"><?php echo $text_freight; ?></option>				
				<option value="<?php echo $text_noshipping; ?>"><?php echo $text_noshipping; ?></option>
				<?php } elseif ( $auction_shipping == $text_calculated ) { ?>
				<option value="<?php echo $text_flat; ?>" ><?php echo $text_flat; ?></option>				
				<option value="<?php echo $text_calculated; ?>" selected="selected"><?php echo $text_calculated; ?></option>				
				<option value="<?php echo $text_freight; ?>"><?php echo $text_freight; ?></option>				
				<option value="<?php echo $text_noshipping; ?>"><?php echo $text_noshipping; ?></option>
				<?php } elseif ( $auction_shipping == $text_freight ) { ?>
				<option value="<?php echo $text_flat; ?>" ><?php echo $text_flat; ?></option>				
				<option value="<?php echo $text_calculated; ?>" ><?php echo $text_calculated; ?></option>				
				<option value="<?php echo $text_freight; ?>" selected="selected"><?php echo $text_freight; ?></option>				
				<option value="<?php echo $text_noshipping; ?>"><?php echo $text_noshipping; ?></option>
				<?php } else { ?>
				<option value="<?php echo $text_flat; ?>" ><?php echo $text_flat; ?></option>				
				<option value="<?php echo $text_calculated; ?>" ><?php echo $text_calculated; ?></option>				
				<option value="<?php echo $text_freight; ?>"><?php echo $text_freight; ?></option>				
				<option value="<?php echo $text_noshipping; ?>"  selected="selected"><?php echo $text_noshipping; ?></option>
				<?php } ?>
			</select>				
			</td>    
          </tr>
          <tr>
            <td><?php echo $entry_auction_service . ' #1'; ?></td>
			<td><select name="auction_service1">				
				<option value="<?php echo $text_shipping_method0; ?>" <?php if( $auction_service1 == $text_shipping_method0 || $auction_service1  == '') { echo 'selected = "selected"'; }  ?>><?php echo $text_shipping_method0; ?></option>				
				<option value="<?php echo $text_shipping_method1; ?>" <?php if( $auction_service1 == $text_shipping_method1) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method1; ?></option>
				<option value="<?php echo $text_shipping_method2; ?>" <?php if( $auction_service1 == $text_shipping_method2) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method2; ?></option>					
				<option value="<?php echo $text_shipping_method3; ?>" <?php if( $auction_service1 == $text_shipping_method3) { echo 'selected = "selected"' ;} ?>><?php echo $text_shipping_method3; ?></option>
				<option value="<?php echo $text_shipping_method4; ?>" <?php if( $auction_service1 == $text_shipping_method4) { echo 'selected = "selected"' ;} ?>><?php echo $text_shipping_method4; ?></option>
				<option value="<?php echo $text_shipping_method5; ?>" <?php if( $auction_service1 == $text_shipping_method5) { echo 'selected = "selected"' ;} ?>><?php echo $text_shipping_method5; ?></option>
				<option value="<?php echo $text_shipping_method6; ?>" <?php if( $auction_service1 == $text_shipping_method6) { echo 'selected = "selected"' ;} ?>><?php echo $text_shipping_method6; ?></option>
				<option value="<?php echo $text_shipping_method7; ?>" <?php if( $auction_service1 == $text_shipping_method7) { echo 'selected = "selected"' ;} ?>><?php echo $text_shipping_method7; ?></option>
				<option value="<?php echo $text_shipping_method8; ?>" <?php if( $auction_service1 == $text_shipping_method8) { echo 'selected = "selected"' ;} ?>><?php echo $text_shipping_method8; ?></option>
				<option value="<?php echo $text_shipping_method9; ?>" <?php if( $auction_service1 == $text_shipping_method9) { echo 'selected = "selected"' ;} ?>><?php echo $text_shipping_method9; ?></option>
				<option value="<?php echo $text_shipping_method10; ?>" <?php if( $auction_service1 == $text_shipping_method10) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method10; ?></option>
				<option value="<?php echo $text_shipping_method11; ?>" <?php if( $auction_service1 == $text_shipping_method11) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method11; ?></option>
				<option value="<?php echo $text_shipping_method12; ?>" <?php if( $auction_service1 == $text_shipping_method12) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method12; ?></option>
				<option value="<?php echo $text_shipping_method13; ?>" <?php if( $auction_service1 == $text_shipping_method13) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method13; ?></option>
				<option value="<?php echo $text_shipping_method14; ?>" <?php if( $auction_service1 == $text_shipping_method14) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method14; ?></option>
				<option value="<?php echo $text_shipping_method15; ?>" <?php if( $auction_service1 == $text_shipping_method15) { echo 'selected = "selected"' ;} ?>><?php echo $text_shipping_method15; ?></option>
				<option value="<?php echo $text_shipping_method16; ?>" <?php if( $auction_service1 == $text_shipping_method16) { echo 'selected = "selected"' ;} ?>><?php echo $text_shipping_method16; ?></option>
				<option value="<?php echo $text_shipping_method17; ?>" <?php if( $auction_service1 == $text_shipping_method17) { echo 'selected = "selected"' ;} ?>><?php echo $text_shipping_method17; ?></option>
				<option value="<?php echo $text_shipping_method18; ?>" <?php if( $auction_service1 == $text_shipping_method18) { echo 'selected = "selected"' ;} ?>><?php echo $text_shipping_method18; ?></option>
				<option value="<?php echo $text_shipping_method19; ?>" <?php if( $auction_service1 == $text_shipping_method19) { echo 'selected = "selected"' ;} ?>><?php echo $text_shipping_method19; ?></option>
				<option value="<?php echo $text_shipping_method20; ?>" <?php if( $auction_service1 == $text_shipping_method20) { echo 'selected = "selected"' ;} ?>><?php echo $text_shipping_method20; ?></option>
				<option value="<?php echo $text_shipping_method21; ?>" <?php if( $auction_service1 == $text_shipping_method21) { echo 'selected = "selected"' ;} ?>><?php echo $text_shipping_method21; ?></option>
				<option value="<?php echo $text_shipping_method22; ?>" <?php if( $auction_service1 == $text_shipping_method22) { echo 'selected = "selected"' ;} ?>><?php echo $text_shipping_method22; ?></option>
				</select><?php echo $entry_auction_shippingcost; ?>
				<input type="text" name="auction_service1cost" id="auction_service1_cost" value="<?php echo $auction_service1cost; ?>" size="7" />
				 <?php echo $entry_auction_eachadditional; ?>
				<input type="text" name="auction_service1addcost" id="auction_service1_addcost" value="<?php echo $auction_service1addcost; ?>" size="7"/>
				</td>    
         </tr>	
          <tr>
            <td><?php echo $entry_auction_service . ' #2'; ?></td>
			<td><select name="auction_service2">				
				<option value="<?php echo $text_shipping_method0; ?>" <?php if( $auction_service2 == $text_shipping_method0 || $auction_service2  == '') { echo 'selected = "selected"'; }  ?>><?php echo $text_shipping_method0; ?></option>				
				<option value="<?php echo $text_shipping_method1; ?>" <?php if( $auction_service2 == $text_shipping_method1) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method1; ?></option>
				<option value="<?php echo $text_shipping_method2; ?>" <?php if( $auction_service2 == $text_shipping_method2) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method2; ?></option>					
				<option value="<?php echo $text_shipping_method3; ?>" <?php if( $auction_service2 == $text_shipping_method3) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method3; ?></option>
				<option value="<?php echo $text_shipping_method4; ?>" <?php if( $auction_service2 == $text_shipping_method4) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method4; ?></option>
				<option value="<?php echo $text_shipping_method5; ?>" <?php if( $auction_service2 == $text_shipping_method5) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method5; ?></option>
				<option value="<?php echo $text_shipping_method6; ?>" <?php if( $auction_service2 == $text_shipping_method6) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method6; ?></option>
				<option value="<?php echo $text_shipping_method7; ?>" <?php if( $auction_service2 == $text_shipping_method7) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method7; ?></option>
				<option value="<?php echo $text_shipping_method8; ?>" <?php if( $auction_service2 == $text_shipping_method8) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method8; ?></option>
				<option value="<?php echo $text_shipping_method9; ?>" <?php if( $auction_service2 == $text_shipping_method9) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method9; ?></option>
				<option value="<?php echo $text_shipping_method10; ?>" <?php if( $auction_service2 == $text_shipping_method10) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method10; ?></option>
				<option value="<?php echo $text_shipping_method11; ?>" <?php if( $auction_service2 == $text_shipping_method11) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method11; ?></option>
				<option value="<?php echo $text_shipping_method12; ?>" <?php if( $auction_service2 == $text_shipping_method12) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method12; ?></option>
				<option value="<?php echo $text_shipping_method13; ?>" <?php if( $auction_service2 == $text_shipping_method13) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method13; ?></option>
				<option value="<?php echo $text_shipping_method14; ?>" <?php if( $auction_service2 == $text_shipping_method14) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method14; ?></option>
				<option value="<?php echo $text_shipping_method15; ?>" <?php if( $auction_service2 == $text_shipping_method15) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method15; ?></option>
				<option value="<?php echo $text_shipping_method16; ?>" <?php if( $auction_service2 == $text_shipping_method16) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method16; ?></option>
				<option value="<?php echo $text_shipping_method17; ?>" <?php if( $auction_service2 == $text_shipping_method17) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method17; ?></option>
				<option value="<?php echo $text_shipping_method18; ?>" <?php if( $auction_service2 == $text_shipping_method18) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method18; ?></option>
				<option value="<?php echo $text_shipping_method19; ?>" <?php if( $auction_service2 == $text_shipping_method19) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method19; ?></option>
				<option value="<?php echo $text_shipping_method20; ?>" <?php if( $auction_service2 == $text_shipping_method20) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method20; ?></option>
				<option value="<?php echo $text_shipping_method21; ?>" <?php if( $auction_service2 == $text_shipping_method21) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method21; ?></option>
				<option value="<?php echo $text_shipping_method22; ?>" <?php if( $auction_service2 == $text_shipping_method22) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method22; ?></option>
				</select> <?php echo $entry_auction_shippingcost; ?>
				<input type="text"  name="auction_service2cost" id="auction_service2_cost" value="<?php echo $auction_service2cost; ?>" size="7" />
				<?php echo $entry_auction_eachadditional; ?>
				<input type="text" name="auction_service2addcost" id="auction_service2_addcost" value="<?php echo $auction_service2addcost; ?>" size="7" />
			</td>    
         </tr>	
          <tr>
            <td><?php echo $entry_auction_service . ' #3'; ?></td>
			<td><select name="auction_service3">				
				<option value="<?php echo $text_shipping_method0; ?>" <?php if( $auction_service3 == $text_shipping_method0 || $auction_service3  == '') { echo 'selected = "selected"'; }  ?>><?php echo $text_shipping_method0; ?></option>				
				<option value="<?php echo $text_shipping_method1; ?>" <?php if( $auction_service3 == $text_shipping_method1) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method1; ?></option>
				<option value="<?php echo $text_shipping_method2; ?>" <?php if( $auction_service3 == $text_shipping_method2) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method2; ?></option>					
				<option value="<?php echo $text_shipping_method3; ?>" <?php if( $auction_service3 == $text_shipping_method3) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method3; ?></option>
				<option value="<?php echo $text_shipping_method4; ?>" <?php if( $auction_service3 == $text_shipping_method4) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method4; ?></option>
				<option value="<?php echo $text_shipping_method5; ?>" <?php if( $auction_service3 == $text_shipping_method5) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method5; ?></option>
				<option value="<?php echo $text_shipping_method6; ?>" <?php if( $auction_service3 == $text_shipping_method6) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method6; ?></option>
				<option value="<?php echo $text_shipping_method7; ?>" <?php if( $auction_service3 == $text_shipping_method7) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method7; ?></option>
				<option value="<?php echo $text_shipping_method8; ?>" <?php if( $auction_service3 == $text_shipping_method8) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method8; ?></option>
				<option value="<?php echo $text_shipping_method9; ?>" <?php if( $auction_service3 == $text_shipping_method9) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method9; ?></option>
				<option value="<?php echo $text_shipping_method10; ?>" <?php if( $auction_service3 == $text_shipping_method10) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method10; ?></option>
				<option value="<?php echo $text_shipping_method11; ?>" <?php if( $auction_service3 == $text_shipping_method11) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method11; ?></option>
				<option value="<?php echo $text_shipping_method12; ?>" <?php if( $auction_service3 == $text_shipping_method12) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method12; ?></option>
				<option value="<?php echo $text_shipping_method13; ?>" <?php if( $auction_service3 == $text_shipping_method13) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method13; ?></option>
				<option value="<?php echo $text_shipping_method14; ?>" <?php if( $auction_service3 == $text_shipping_method14) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method14; ?></option>
				<option value="<?php echo $text_shipping_method15; ?>" <?php if( $auction_service3 == $text_shipping_method15) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method15; ?></option>
				<option value="<?php echo $text_shipping_method16; ?>" <?php if( $auction_service3 == $text_shipping_method16) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method16; ?></option>
				<option value="<?php echo $text_shipping_method17; ?>" <?php if( $auction_service3 == $text_shipping_method17) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method17; ?></option>
				<option value="<?php echo $text_shipping_method18; ?>" <?php if( $auction_service3 == $text_shipping_method18) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method18; ?></option>
				<option value="<?php echo $text_shipping_method19; ?>" <?php if( $auction_service3 == $text_shipping_method19) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method19; ?></option>
				<option value="<?php echo $text_shipping_method20; ?>" <?php if( $auction_service3 == $text_shipping_method20) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method20; ?></option>
				<option value="<?php echo $text_shipping_method21; ?>" <?php if( $auction_service3 == $text_shipping_method21) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method21; ?></option>
				<option value="<?php echo $text_shipping_method22; ?>" <?php if( $auction_service3 == $text_shipping_method22) { echo 'selected = "selected"'; } ?>><?php echo $text_shipping_method22; ?></option>
				</select> <?php echo $entry_auction_shippingcost; ?>
				<input type="text" name="auction_service3cost" id="auction_service3_cost" value="<?php echo $auction_service3cost; ?>" size="7" />
				<?php echo $entry_auction_eachadditional; ?>
				<input type="text" name="auction_service3addcost" id="auction_service3_addcost" value="<?php echo $auction_service3addcost; ?>" size="7" />
				</td>    
         </tr>
		 <tr>
            <td><?php echo $entry_auction_packagetype; ?></td>
			<td><select name="auction_packagetype" id="packagetype" <?php if( $auction_shipping == $text_calculated ) { echo ' disbaled = "false"'; } else { echo ' disabled = "true"'; } ?>>				
				<option value="<?php echo $text_letter; ?>" <?php if( $auction_packagetype == $text_letter || $auction_packagetype  == '') { echo 'selected = "selected"'; }  ?>><?php echo $text_letter; ?></option>
				<option value="<?php echo $text_largeenvelope; ?>" <?php if( $auction_packagetype == $text_largeenvelope) { echo 'selected = "selected"'; } ?>><?php echo $text_largeenvelope; ?></option>					
				<option value="<?php echo $text_package; ?>" <?php if( $auction_packagetype == $text_package) { echo 'selected = "selected"'; } ?>><?php echo $text_package; ?></option>	
				<option value="<?php echo $text_largepackage; ?>" <?php if( $auction_packagetype == $text_largepackage) { echo 'selected = "selected"'; } ?>><?php echo $text_largepackage; ?></option>					
			</select>				
			</td>    
          </tr>		
         <tr>
            <td><?php echo $entry_auction_irregular; ?></td>
					<td> 
					<?php if ($auction_irregular == $text_yes ) { ?>
					<input type="radio" name="auction_irregular" value="<?php echo $text_yes; ?>" checked="checked" />
					<?php echo $text_yes; ?>              
					<input type="radio" name="auction_irregular" value="<?php echo $text_no; ?>"/>			   
					<?php echo $text_no; ?> 
					<?php } ?>
					<?php if ($auction_irregular == $text_no ) { ?>
					<input type="radio" name="auction_irregular" value="<?php echo $text_yes; ?>" />
					<?php echo $text_yes; ?>              
					<input type="radio" name="auction_irregular" value="<?php echo $text_no; ?>" checked="checked" />			   
					<?php echo $text_no; ?> 
				  <?php } ?>
				  </td> 
          </tr>		  
         <tr>
            <td><?php echo $entry_auction_dimensions ; ?></td>
            <td><input type="text" name="length" id ="length"  value="<?php echo $length; ?>" <?php if( $auction_shipping == $text_calculated ) { echo ' disbaled = "false"'; } else { echo ' disabled = "true"'; } ?> " size="4" /><a>in.</a>
              <input type="text" name="width" id="width"  value="<?php echo $width; ?>"  <?php if( $auction_shipping == $text_calculated ) { echo ' disbaled = "false"'; } else { echo ' disabled = "true"'; } ?> size="4" /><a>in.</a>
              <input type="text" name="height" id="height"  value="<?php echo $height; ?>"  <?php if( $auction_shipping == $text_calculated ) { echo ' disbaled = "false"'; } else { echo ' disabled = "true"'; } ?> size="4" /><a>in.</a>
			 </td>
          </tr>
          <tr>
            <td><?php echo $entry_auction_weight; ?></td>
            <td><input type="text" name="weight" id="weight"  value="<?php echo $weight; ?>" <?php if( $auction_shipping == $text_calculated ) { echo ' disbaled = "false"'; } else { echo ' disabled = "true"'; } ?> /><a>lbs</a></td>
          </tr>
		  <tr>
			<td><?php echo $entry_auction_freeshipping; ?></td>            
					<td> 
					<?php if ($auction_freeshipping == $text_yes ) { ?>
					<input type="radio" name="auction_freeshipping" value="<?php echo $text_yes; ?>" checked="checked" />
					<?php echo $text_yes; ?>              
					<input type="radio" name="auction_freeshipping" value="<?php echo $text_no; ?>"/>			   
					<?php echo $text_no; ?> 
					<?php } ?>
					<?php if ($auction_freeshipping == $text_no ) { ?>
					<input type="radio" name="auction_freeshipping" value="<?php echo $text_yes; ?>" />
					<?php echo $text_yes; ?>              
					<input type="radio" name="auction_freeshipping" value="<?php echo $text_no; ?>" checked="checked" />			   
					<?php echo $text_no; ?> 
				  <?php } ?>
				  </td> 			
		 </tr> 
		  <tr>
			<td><?php echo $entry_auction_localpickup; ?></td>            
					<td> 
					<?php if ($auction_localpickup == $text_yes ) { ?>
					<input type="radio" name="auction_localpickup" value="<?php echo $text_yes; ?>" checked="checked" />
					<?php echo $text_yes; ?>              
					<input type="radio" name="auction_localpickup" value="<?php echo $text_no; ?>"/>			   
					<?php echo $text_no; ?> 
					<?php } ?>
					<?php if ($auction_localpickup == $text_no ) { ?>
					<input type="radio" name="auction_localpickup" value="<?php echo $text_yes; ?>" />
					<?php echo $text_yes; ?>              
					<input type="radio" name="auction_localpickup" value="<?php echo $text_no; ?>" checked="checked" />			   
					<?php echo $text_no; ?> 
				  <?php } ?>
				  </td> 
			</tr> 
		 <tr>
            <td><?php echo $entry_auction_handlingtime; ?></td>
			<td><select name="auction_handlingtime">				
				<option value="<?php echo $text_oneday; ?>" <?php if( $auction_handlingtime == $text_oneday || $auction_handlingtime  == '') { echo 'selected = "selected"'; }  ?>><?php echo $text_oneday; ?></option>
				<option value="<?php echo $text_twodays; ?>" <?php if( $auction_handlingtime == $text_twodays) { echo 'selected = "selected"'; } ?>><?php echo $text_twodays; ?></option>					
				<option value="<?php echo $text_threedays; ?>" <?php if( $auction_handlingtime == $text_threedays) { echo 'selected = "selected"'; } ?>><?php echo $text_threedays; ?></option>	
				<option value="<?php echo $text_fourdays; ?>" <?php if( $auction_handlingtime == $text_fourdays) { echo 'selected = "selected"'; } ?>><?php echo $text_fourdays; ?></option>					
				<option value="<?php echo $text_fivedays; ?>" <?php if( $auction_handlingtime == $text_fivedays) { echo 'selected = "selected"'; } ?>><?php echo $text_fivedays; ?></option>						
				<option value="<?php echo $text_tendays; ?>" <?php if( $auction_handlingtime == $text_tendays) { echo 'selected = "selected"'; } ?>><?php echo $text_tendays; ?></option>		
				<option value="<?php echo $text_fifteendays; ?>" <?php if( $auction_handlingtime == $text_fifteendays) { echo 'selected = "selected"'; } ?>><?php echo $text_fifteendays; ?></option>	
				<option value="<?php echo $text_twentydays; ?>" <?php if( $auction_handlingtime == $text_twentydays) { echo 'selected = "selected"'; } ?>><?php echo $text_twentydays; ?></option>					
				<option value="<?php echo $text_thirtydays; ?>" <?php if( $auction_handlingtime == $text_thirtydays) { echo 'selected = "selected"'; } ?>><?php echo $text_thirtydays; ?></option>
			</select>				
			</td>    
          </tr>
        </table>
      </div>	  
		<div id="tab_condition">
		<table class="form">
		<tr>
            <td><?php echo $entry_auction_condition; ?></td>
			<td><select name="auction_condition">				
				<option value="<?php echo $text_condition_new; ?>" <?php if( $auction_condition == $text_condition_new || $auction_condition  == '') { echo 'selected = "selected"'; }  ?>><?php echo $text_condition_new; ?></option>
				<option value="<?php echo $text_condition_newoth; ?>" <?php if( $auction_condition == $text_condition_newoth) { echo 'selected = "selected"'; } ?>><?php echo $text_condition_newoth; ?></option>					
				<option value="<?php echo $text_condition_mfgref; ?>" <?php if( $auction_condition == $text_condition_mfgref) { echo 'selected = "selected"'; } ?>><?php echo $text_condition_mfgref; ?></option>	
				<option value="<?php echo $text_condition_selref; ?>" <?php if( $auction_condition == $text_condition_selref) { echo 'selected = "selected"'; } ?>><?php echo $text_condition_selref; ?></option>					
				<option value="<?php echo $text_condition_used; ?>" <?php if( $auction_condition == $text_condition_used) { echo 'selected = "selected"'; } ?>><?php echo $text_condition_used; ?></option>						
				<option value="<?php echo $text_condition_parts; ?>" <?php if( $auction_condition == $text_condition_parts) { echo 'selected = "selected"'; } ?>><?php echo $text_condition_parts; ?></option>		
			</select>				
			</td>    
          </tr>
		<tr>
            <td><?php echo $entry_auction_returns; ?></td>
			<td><select name="auction_returns">				
				<option value="<?php echo $text_returns_accepted; ?>" <?php if( $auction_returns == $text_returns_accepted || $auction_returns  == '') { echo 'selected = "selected"'; }  ?>><?php echo $text_returns_accepted; ?></option>
				<option value="<?php echo $text_returns_notaccepted; ?>" <?php if( $auction_returns == $text_returns_notaccepted) { echo 'selected = "selected"'; } ?>><?php echo $text_returns_notaccepted; ?></option>					
			</select>				
			</td>    
         </tr>
		</table>
      </div>
      
    </form>
  </div>
</div>
</div>

<script type="text/javascript" src="view/javascript/ckeditor/ckeditor.js"></script>
<script type="text/javascript"><!--
<?php foreach ($languages as $language) { ?>
CKEDITOR.replace('auction_description', {
	filebrowserBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserImageBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserFlashBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserImageUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserFlashUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>'
});
<?php } ?>
//--></script>



<script type="text/javascript"><!--
function setcalculated(){
var selected_value;
var w;
w = document.getElementById('shipping_type').selectedIndex;
selected_value = document.getElementById('shipping_type').options[w].value;
if( selected_value == 'Calculated:cost varies by buyer location') {
document.getElementById("packagetype").disabled=false;
document.getElementById("length").disabled=false;
document.getElementById("width").disabled=false;
document.getElementById("height").disabled=false;
document.getElementById("weight").disabled=false;
document.getElementById("irregular").disabled=false;
}else{
document.getElementById("packagetype").disabled=true;
document.getElementById("length").disabled=true;
document.getElementById("width").disabled=true;
document.getElementById("height").disabled=true;
document.getElementById("weight").disabled=true;
document.getElementById("irregular").disabled=true;
}

}

//--></script>
<script type="text/javascript"><!--
function ajaxGetCategories(box,purl){
var ajaxRequest; 
var selected_text;
var selected_value;
var w;
var passedurl = purl;

if (box == 1) {
w = document.getElementById('category1').selectedIndex;
selected_text = document.getElementById('category1').options[w].text;
selected_value = document.getElementById('category1').options[w].value;
document.getElementById('auction_category').value = selected_value;

}else if (box == 2) {
w = document.getElementById('category2').selectedIndex;
selected_text = document.getElementById('category2').options[w].text;
selected_value = document.getElementById('category2').options[w].value;
document.getElementById('auction_category').value = selected_value;
}else if (box == 3) {
w = document.getElementById('category3').selectedIndex;
selected_text = document.getElementById('category3').options[w].text;
selected_value = document.getElementById('category3').options[w].value;
document.getElementById('auction_category').value = selected_value;
}else if (box == 4) {
w = document.getElementById('category4').selectedIndex;
selected_text = document.getElementById('category4').options[w].text;
selected_value = document.getElementById('category4').options[w].value;
document.getElementById('auction_category').value = selected_value;
}else if (box == 5) {
w = document.getElementById('category5').selectedIndex;
selected_text = document.getElementById('category5').options[w].text;
selected_value = document.getElementById('category5').options[w].value;
document.getElementById('auction_category').value = selected_value;
}else if (box == 6) {
w = document.getElementById('category6').selectedIndex;
selected_text = document.getElementById('category6').options[w].text;
selected_value = document.getElementById('category6').options[w].value;
document.getElementById('auction_category').value = selected_value;
}



	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser does not support AJAX call");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var options;
			if (box == 1) {
			options = ajaxRequest.responseText;
			$('#category2').html(options);
			//document.getElementById('category2').innerHTML = ajaxRequest.responseText;
			document.getElementById('category3').innerHTML = null;
			document.getElementById('category4').innerHTML = null;
			document.getElementById('category5').innerHTML = null;
			document.getElementById('category6').innerHTML = null;
			} else if (box == 2) {
			options = ajaxRequest.responseText;
			$('#category3').html(options);
			//document.getElementById('category3').innerHTML = ajaxRequest.responseText;
			document.getElementById('category4').innerHTML = null;
			document.getElementById('category5').innerHTML = null;
			document.getElementById('category6').innerHTML = null;
			} else if (box == 3) {
			options = ajaxRequest.responseText;
			$('#category4').html(options);
			//document.getElementById('category4').innerHTML = ajaxRequest.responseText;
			document.getElementById('category5').innerHTML = null;
			document.getElementById('category6').innerHTML = null;
			}else if (box == 4) {
			options = ajaxRequest.responseText;
			$('#category5').html(options);
			//document.getElementById('category5').innerHTML = ajaxRequest.responseText;
			document.getElementById('category6').innerHTML = null;
			}else if (box == 5) {
			options = ajaxRequest.responseText;
			$('#category6').html(options);
			//document.getElementById('category6').innerHTML = ajaxRequest.responseText;
			}
		}
	}
var querystring = "&ebay_catid=" + selected_value;
ajaxRequest.open("GET",passedurl + querystring, true);
ajaxRequest.send(null); 
}
//--></script>





<script type="text/javascript" src="view/javascript/jquery/ui/ui.draggable.js"></script>
<script type="text/javascript" src="view/javascript/jquery/ui/ui.resizable.js"></script>
<script type="text/javascript" src="view/javascript/jquery/ui/ui.dialog.js"></script>
<script type="text/javascript" src="view/javascript/jquery/ui/external/bgiframe/jquery.bgiframe.js"></script>
<script type="text/javascript"><!--
function image_upload(field, preview) {
	$('#dialog').remove();
	
	$('#content').prepend('<div id="dialog" style="padding: 3px 0px 0px 0px;"><iframe src="index.php?route=common/filemanager&token=<?php echo $token; ?>&field=' + encodeURIComponent(field) + '" style="padding:0; margin: 0; display: block; width: 100%; height: 100%;" frameborder="no" scrolling="auto"></iframe></div>');
	
	$('#dialog').dialog({
		title: '<?php echo $text_image_manager; ?>',
		close: function (event, ui) {
			if ($('#' + field).attr('value')) {
				$.ajax({
					url: 'index.php?route=common/filemanager/image&token=<?php echo $token; ?>',
					type: 'POST',
					data: 'image=' + encodeURIComponent($('#' + field).attr('value')),
					dataType: 'text',
					success: function(data) {
						$('#' + preview).replaceWith('<img src="' + data + '" alt="" id="' + preview + '" class="image" onclick="image_upload(\'' + field + '\', \'' + preview + '\');" />');
					}
				});
			}
		},	
		bgiframe: false,
		width: 700,
		height: 400,
		resizable: false,
		modal: false
	});
};
//--></script>

<script type="text/javascript" src="view/javascript/jquery/ui/ui.datepicker.js"></script>
<script type="text/javascript"><!--
$(document).ready(function() {
	$('.date').datepicker({dateFormat: 'yy-mm-dd'});
});
//--></script>
<script type="text/javascript"><!--
$('#tabs a').tabs(); 

$('#languages a').tabs(); 
//--></script>
<?php echo $footer; ?>