function setProductHighlight(v,w)
{
  if(parent.Lng == "fr")
  {
    var zusammen = 'produktHighlight'+w;
    switch (v)
    {
      case 'SdW':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/superpreis.gif" alt="Stiefel der Woche" title="Stiefel der Woche" width="45" height="45" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
        case 'SdW_grau':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/superpreis_grau.gif" alt="Stiefel der Woche" title="Stiefel der Woche Maenner" width="45" height="45" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Gift':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Gift.jpg" alt="Idée cadeau" title="Idée cadeau" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Smart':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Smart.jpg" alt="Shopping malin" title="Shopping malin" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Sale':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Sale.jpg" alt="Soldé" title="Soldé" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'New':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/New.jpg" alt="Nouveau" title="Nouveau" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Hot':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Hot.jpg" alt="hot hot hot" title="hot hot hot" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Eyecatcher1':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Eyecatcher1.jpg" alt="Point de mire" title="Point de mire" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Fashion1':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Fashion1.jpg" alt="Reine de la mode" title="Reine de la mode" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Fashion2':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Fashion2.jpg" alt="Reine de la mode" title="Reine de la mode" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Eyecatcher1':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Eyecatcher1.jpg" alt="Point de mire" title="Point de mire" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Date':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Date.jpg" alt="Séduction garantie" title="Séduction garantie" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Joy':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Joy.jpg" alt="Gagnants Joy Trend Award 2010" title="Gagnants Joy Trend Award 2010" width="50" height="50" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'New Season':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/newseason.gif" alt="Nouvelle saison" title="Nouvelle saison" width="32" height="32" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      default:
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Nein.jpg" alt="" title="" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
    }
  }
  else
  {
    var zusammen = 'produktHighlight'+w;
    switch (v)
    {
      case 'LifeAndStyle':
        if (BannerTimer(2011,11,9,23,59, 2011,11,30,23,59))
        {
          document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/lifeandstyle.gif" alt="Life & Style Shopping Special" title="Life & Style Shopping Special" width="43" height="43" border="0" style="z-index:1;margin-top: 10px;" />';
        }
        break;
      case 'SdW':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/superpreis.gif" alt="Stiefel der Woche" title="Stiefel der Woche" width="45" height="45" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
        case 'SdW_grau':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/superpreis_grau.gif" alt="Stiefel der Woche" title="Stiefel der Woche Maenner" width="45" height="45" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Gift':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Gift.jpg" alt="Schenken lassen" title="Schenken lassen" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Smart':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Smart.jpg" alt="Smart Shopping" title="Smart Shopping" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Sale':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Sale.jpg" alt="Sale" title="Sale" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'New':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/New.jpg" alt="Neu" title="Neu" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Hot':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Hot.jpg" alt="HOT, HOT, HOT" title="HOT, HOT, HOT" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Eyecatcher1':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Eyecatcher1.jpg" alt="Eyecatcher" title="Eyecatcher" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Fashion1':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Fashion1.jpg" alt="Fashion Queen" title="Fashion Queen" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Fashion2':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Fashion2.jpg" alt="Fashion Queen" title="Fashion Queen" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Eyecatcher1':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Eyecatcher1.jpg" alt="Eyecatcher" title="Eyecatcher" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Date':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Date.jpg" alt="Datetauglich" title="Datetauglich" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'Joy':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Joy.jpg" alt="Gewinner Joy Trend Award 2010" title="Gewinner Joy Trend Award 2010" width="50" height="50" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      case 'New Season':
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/newseason.gif" alt="New Season" title="New Season" width="32" height="32" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
      default:
        document.getElementById(zusammen).innerHTML = '<img src="../../Img/highlighting/Nein.jpg" alt="" title="" width="30" height="30" border="0" style="z-index:1;margin-top: 10px;" />';
        break;
    }
  }
}

var idSammlung = new Array();
var damengroessen = new Array('all_d','35d','36d','37d','38d','39d','40d','41d','42d');
var herrengroessen = new Array('all_h','39h','40h','41h','42h','43h','44h','45h','46h','47h','48h','49h');
var maxIndex;

function selectGroesse(auswahl,ausw)
{
	
	top.Grs = auswahl;
	
  if(location.href.match('damen_'))
  {
    for(i=0;i<damengroessen.length;i++)
    {
      document.getElementById(damengroessen[i]).style.background = '#ffffff';
      document.getElementById(damengroessen[i]).style.color = '#000000';
    }
  }
  if(location.href.match('herren_'))
  {
    for(i=0;i<herrengroessen.length;i++)
    {
      document.getElementById(herrengroessen[i]).style.background = '#ffffff';
      document.getElementById(herrengroessen[i]).style.color = '#000000';
    }
  }
  
  document.getElementById(ausw).style.background = '#000000';
  document.getElementById(ausw).style.color = '#ffffff';
	
  if(auswahl != 'all')
  {
    for(i=0; i < maxIndex; i++)
    {
      tmp1 = '' + idSammlung[i] + '';
      tmp2 = tmp1.match(auswahl);
      if(!tmp2)//if null => ausblenden
        document.getElementById('pr_' + i).style.display = 'none';
      else
        document.getElementById('pr_' + i).style.display = 'block';
    }
  }
  else
  {
    for(i=0; i < maxIndex; i++)
    {
      document.getElementById('pr_' + i).style.display = 'block';
    }
  }
}

function groessenFinder()
{ 
  if(location.href.match('damen_'))
  {
    document.write('<td style="">Ihre Schuhgröße:</td>\
                    <td style="width: 30px;"></td>\
                    <td align="center" id="all_d" style="border: 1px solid #ffffff; cursor: pointer; width: 30px; background: #000000; color: #ffffff;" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(\'all\',\'all_d\');">alle</td>\
                    <td align="center" id="35d" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(35,\'35d\');">35</td>\
                    <td align="center" id="36d" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(36,\'36d\');">36</td>\
                    <td align="center" id="37d" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(37,\'37d\');">37</td>\
                    <td align="center" id="38d" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(38,\'38d\');">38</td>\
                    <td align="center" id="39d" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(39,\'39d\');">39</td>\
                    <td align="center" id="40d" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(40,\'40d\');">40</td>\
                    <td align="center" id="41d" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(41,\'41d\');">41</td>\
                    <td align="center" id="42d" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(42,\'42d\');">42</td>');
  }
  if(location.href.match('herren_'))
  {
    document.write('<td style="">Ihre Schuhgröße:</td>\
                    <td style="width: 30px;"></td>\
                    <td align="center" id="all_h" style="border: 1px solid #ffffff; cursor: pointer; width: 30px; background: #000000; color: #ffffff;" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(\'all\',\'all_h\');">alle</td>\
                    <td align="center" id="39h" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(39,\'39h\');">39</td>\
                    <td align="center" id="40h" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(40,\'40h\');">40</td>\
                    <td align="center" id="41h" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(41,\'41h\');">41</td>\
                    <td align="center" id="42h" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(42,\'42h\');">42</td>\
                    <td align="center" id="43h" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(43,\'43h\');">43</td>\
                    <td align="center" id="44h" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(44,\'44h\');">44</td>\
                    <td align="center" id="45h" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(45,\'45h\');">45</td>\
                    <td align="center" id="46h" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(46,\'46h\');">46</td>\
                    <td align="center" id="47h" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(47,\'47h\');">47</td>\
                    <td align="center" id="48h" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(48,\'48h\');">48</td>\
                    <td align="center" id="49h" class="grAuswahlTd" onmouseover="this.style.border = \'1px solid #000000\'" onmouseout="this.style.border = \'1px solid #ffffff\'" onclick="selectGroesse(49,\'49h\');">49</td>');
  }
}

function array_unique( array ) {
	var p, i, j;
	for(i = array.length; i;)
	{
		for(p = --i; p > 0;)
		{
			if(array[i] === array[--p])
			{
				for(j = p; --p && array[i] === array[p];);
					i -= array.splice(p + 1, j - p).length;
			}
		}
	}
	return true;
}

function groessenFinderZwei()
{
// alert(idSammlung);
  var idSammlungZwei = "";
  var idSammlungDrei = "";
  var sortausgabe = "";
  
  for(aa = 0; aa < idSammlung.length; aa++)
  {
    idSammlungZwei += idSammlung[aa]+',';
  }
  //alert(idSammlungZwei);
  idSammlungZwei = idSammlungZwei.split(',');

  
  for(ii = 0; ii < idSammlungZwei.length; ii++) {
    for(jj = 0; jj < idSammlungZwei.length; jj++) {
      if(ii != jj && idSammlungZwei[ii] == idSammlungZwei[jj]){
         idSammlungDrei += idSammlungZwei[jj] + ' ' + jj + '\r\n';
				 idSammlungZwei.splice(ii,1,'');
}
    }
  }
  sortausgabe = idSammlungZwei.sort().join('|');
  idSammlungDrei = sortausgabe.split('|');
  
  for(cc = 0; cc < idSammlungDrei.length; cc++) {
    if(idSammlungDrei[cc] != "") {
  	  if(location.href.match('damen_')) {
  	    document.getElementById(idSammlungDrei[cc] +'d').style.display = 'inline';
  	  }
  	  if(location.href.match('herren_')) {
  	    document.getElementById(idSammlungDrei[cc] +'h').style.display = 'inline';
  	  }
    }
  }
}

function tgMenu() {
  if(document.getElementById('groesse').style.display == 'none')
    document.getElementById('groesse').style.display = 'block';
  else
    document.getElementById('groesse').style.display = 'none';
}


function CategoryToString(Category)
{
    Category = unescape(Category).replace(/ö/gi, 'oe');
		Category = unescape(Category).replace(/ä/gi, 'ae');
		Category = unescape(Category).replace(/ü/gi, 'ue');
		Category = unescape(Category).replace(/ß/gi, 'ss');
  
  if(Category.indexOf(',') != -1)
  {
    Category = Category.substring(0, Category.indexOf(',')).toLowerCase();
    Category = Category.replace(/\W/gi, '_');
    return Category;
  }
  else 
  {
    Category = Category.toLowerCase();
    Category = Category.replace(/\W/gi, '_');
    return Category;
  }
}


function IsImageOk(img) {
    // During the onload event, IE correctly identifies any images that
    // weren't downloaded as not complete. Others should too. Gecko-based
    // browsers act like NS4 in that they report this incorrectly.
    if (!img.complete) {
        return false;
    }

    // However, they do have two very useful properties: naturalWidth and
    // naturalHeight. These give the true size of the image. If it failed
    // to load, either of these should be zero.
    if (typeof img.naturalWidth != "undefined" && img.naturalWidth == 0) {
        return false;
    }

    // No other way of checking: assume it's ok.
    return true;
}

