function popup(sUrl, sName, iWidth, iHeight, bScrollbar)
{
	var xPositionPopup = Math.round((screen.availWidth / 2) - (iWidth / 2));
	var yPositionPopup = Math.round((screen.availHeight / 2) - (iHeight / 2));
	window.open(sUrl, '', "top=" + yPositionPopup + ",left=" + xPositionPopup + ",resizable=no,scrollbars=" + (bScrollbar == 1 ? "yes" : "no" ) + ",width=" + iWidth + ",height=" + iHeight);
}

function showSubCollection(iCollection)
{
  oSubCollection = document.getElementById('sub_col_' + iCollection);
  oImgCollection = document.getElementById('img_col_' + iCollection);
  if (oSubCollection)
  {
  	if (oSubCollection.style.display == "block")
    {
  		oSubCollection.style.display = 'none';
      oImgCollection.src = '/images/ic_col_left.gif'
    }
  	else
    {
  		oSubCollection.style.display = 'block';
      oImgCollection.src = '/images/ic_col_down.gif'
  	}
  }
}

function setEmptyInput(oField,sValue)
{
	if(oField.value == sValue)
		oField.value = '';
}

function collectionSearchSubmit()
{
  if (document.forms.c_search.r.value == "Reference")
    document.forms.c_search.r.value = ""
  if (document.forms.c_search.d.value == "Size")
    document.forms.c_search.d.value = ""
  if (document.forms.c_search.p.value == "Maximum Price")
    document.forms.c_search.p.value = ""
}

function setDefault(oField,sValue)
{
  if(oField.value == "")
    oField.value = sValue;
}


function afficheDhtml(dhtmlobject)
{
if (dhtmlobject.style.display == "block")
{dhtmlobject.style.display = 'none';
modifier2();
 }
else
{dhtmlobject.style.display = 'block';
 modifier();
 }
}
var simple = "Simple Search";
var avanzada = "Advanced Search";
function modifier() { document.all.monparagraphe.innerHTML = simple; }
function modifier2() { document.all.monparagraphe.innerHTML = avanzada; }
