<?php
/*
  www.oscGold.com (C) Kamelia-Net Jacek Krysiak
  modul oscGold wer 4.0
*/

function drawDropDownPrefix($params,$selected = '') {
	return tep_draw_pull_down_menu(
		"prefix",
		array(
			array('id'=>'','text'=>''),
			array('id'=>urlencode('+'),'text'=>'+'),
			array('id'=>'-','text'=>'-')
		),
		($selected == '+') ? urlencode('+') : $selected,
		$params
	);
}

function &amGetAttributeManagerInstance($get) {

	if (!is_numeric($get['products_id']) || AM_ATOMIC_PRODUCT_UPDATES) {

		// first time visiting the page - delete the session var and start again
		if('new_product' == $get[AM_PAGE_ACTION_NAME] && !tep_not_null($get[AM_ACTION_GET_VARIABLE]))
			amSessionUnregister(AM_SESSION_VAR_NAME);

			amSessionRegister(AM_SESSION_VAR_NAME, array());

		$attributeManager =& new attributeManagerAtomic(amGetSesssionVariable(AM_SESSION_VAR_NAME));
	}
	else
		$attributeManager =& new attributeManagerInstant($_GET['products_id']);

	return $attributeManager;
}

?>