function showAddProduct(){

	var div = $.create('div', {'id':'blocking_div','style':'background-color:#6699cc;font-family:verdana;font-size:10px;width:100%;height:100%;position:absolute;top:0px;left:0px;opacity:1;z-index:9998;'});
	var div1 = $.create('div', {'id':'blocking_inner_div', 'style':'background-color: rgb(102, 153, 204); position:relative;width:750px;height:100%;border:2px solid #f1f1f1;margin-right:auto;margin-left:auto;z-index:9999;'});
	//div1.css('top', 100);
	
	var html = '<div style="background-color:white;margin: auto; position: absolute; font-family: verdana;font-size: 16px; font-weight: bold; black; opacity: 1; width: 100%;padding-top:50px;"><table width="100%" border="1" height="100%" align="left">';
	
	html += '<tr><td align="left"><a href="#" style="" onclick="showEditing(this);">Info</a></td></tr>\
	<tr><td id="info-div" style="display:none;">Info Content</td></tr>\
	<tr><td align="left"><a href="#" style=""  onclick="showEditing(this);">Images</a></td></tr>\
	<tr><td id="images-div" style="display:none;">Images Content</td></tr>\
	<tr><td align="left"><a href="#" style=""  onclick="showEditing(this);">Combinations</a></td></tr>\
	<tr><td id="combinations-div" style="display:none;">Combinations Content</td></tr>\
	<tr><td  align="left"><a href="#" style=""  onclick="showEditing(this);">Features</a></td></tr>\
	<tr><td id="features-div" style="display:none;">Info Features</td></tr>\
	<tr><td  align="left"><a href="#"  style=""  onclick="showEditing(this);">Customization</a></td></tr>\
	<tr><td id="customization-div" style="display:none;">Customization Content</td></tr>\
	<tr><td  align="left"><a href="#" style=""  onclick="showEditing(this);">Discounts</a></td></tr>\
	<tr><td id="discounts-div" style=" display:none;">Discounts Content</td></tr>\
	<tr><td  align="left"><a href="#" style=""  onclick="showEditing(this);">Attachments</a></td></tr>\
	<tr><td id="attachments-div" style="display:none;">Attachments Content</td></tr>';
	
	
	html += '</table></div>';
	
	div1.html(html);
	
	
	div.appendTo("#content");
	div1.appendTo("#blocking_div");
	
	return false;
	$.ajax({
			type: "POST",
			url: "http://www.google.com",
			success: function(msg){				
			}
		});
	
	
	//$.create('div', {'id': '', 'style':'padding: 5px;'}).appendTo('#bodynode');
	//div.appendTo("#bodyNode");
	//alert('Hello');
}

function showEditing(t){
	$(".activated").css("color", "black").removeClass('activated').next().hide();
	var t = $(t).html();
	$(t).css('color', 'red').addClass('activated');
	$("#"+t.toLowerCase()+"-div").show();

}

function	autoUrl(name, dest)
{
	var loc;
	var id_list;

	id_list = document.getElementById(name);
	loc = id_list.options[id_list.selectedIndex].value;
	if (loc != 0)
		location.href = dest+loc;
	return ;
}

function	autoUrlNoList(name, dest)
{
	var loc;

	loc = document.getElementById(name).checked;
	location.href = dest + (loc == true ? 1 : 0);
	return ;
}

/*
** show or hide element e depending on condition show
*/
function toggle(e, show)
{
	e.style.display = show ? '' : 'none';
}

function toggleMultiple(tab)
{
    var len = tab.length;

    for (var i = 0; i < len; i++)
        if (tab[i].style)
            toggle(tab[i], tab[i].style.display == 'none');
}

/**
* Show dynamicaly an element by changing the sytle "display" property
* depending on the option selected in a select.
*
* @param string $select_id id of the select who controls the display
* @param string $elem_id prefix id of the elements controlled by the select
*   the real id must be : 'elem_id'+nb with nb the corresponding number in the
*   select (starting with 0).
*/
function showElemFromSelect(select_id, elem_id)
{
	var select = document.getElementById(select_id);
	for (var i = 0; i < select.length; ++i)
	{
	    var elem = document.getElementById(elem_id + select.options[i].value);
		if (elem != null)
			toggle(elem, i == select.selectedIndex);
	}
}

/**
* Get all div with specified name and for each one (by id), toggle their visibility
*/
function openCloseAllDiv(name, option)
{
	var tab = $('*[name='+name+']');
	for (var i = 0; i < tab.length; ++i)
		toggle(tab[i], option);
}

/**
* Toggle the value of the element id_button between text1 and text2
*/
function toggleElemValue(id_button, text1, text2)
{
	var obj = document.getElementById(id_button);
	if (obj)
		obj.value = ((!obj.value || obj.value == text2) ? text1 : text2);
}

function addBookmark(url, title)
{
	if (window.sidebar)
		return window.sidebar.addPanel(title, url, "");
	else if ( window.external )
		return window.external.AddFavorite( url, title);
	else if (window.opera && window.print)
		return true;
	return true;
}

function writeBookmarkLink(url, title, text, img)
{
	var insert = '';
	if (img)
		insert = writeBookmarkLinkObject(url, title, '<img src="' + img + '" alt="' + escape(text) + '" title="' + escape(text) + '" />') + '&nbsp';
	insert += writeBookmarkLinkObject(url, title, text);
	document.write(insert);
}

function writeBookmarkLinkObject(url, title, insert)
{
	if (window.sidebar || window.external)
		return ('<a href="javascript:addBookmark(\'' + escape(url) + '\', \'' + escape(title) + '\')">' + insert + '</a>');
	else if (window.opera && window.print)
		return ('<a rel="sidebar" href="' + escape(url) + '" title="' + escape(title) + '">' + insert + '</a>');
	return ('');
}

function checkCustomizations()
{
	var tmp;
	var pattern = new RegExp(' ?filled ?');
	for (var i = 0; i < customizationFields.length; i++)
		/* If the field is required and empty then we abort */
		if (parseInt(customizationFields[i][1]) == 1 && $('#' + customizationFields[i][0]).val() == '' && !pattern.test($('#' + customizationFields[i][0]).attr('class')))
			return false;
	return true;
}

