//<script>// tabelle-gen.js - strumpf-test

function showtooltip (idname, onoff)
{
 if(document.getElementById)
 {
   if (onoff == false)
     document.getElementById(idname).style.visibility = "hidden";
   else
     document.getElementById(idname).style.visibility = "visible";
 }
}

function getSummeTxt (summe)				// max. 40 Punkte
{
  var summetext;
  if (summe >= 35)
  	   summetext = "Premiumklasse *****"; 
  else if (summe >= 30)
  	   summetext = "Komfortklasse ****"; 
  else if (summe >= 25)
	   summetext = "Luxusklasse ***"; 
  else if (summe >= 20)
	   summetext = "sehr gute Qualität **"; 
  else if (summe >= 15)
	   summetext = "gute Qualität *";
  else if (summe >= 10)
	   summetext = "befriedigende Qualität";
  else if (summe >= 5)
	   summetext = "ausreichende Qualität";
  else summetext = "unbrauchbar";
  return summetext;
}


function UmschaltTaste (bild)
{
  document.write('<table class="Normal" width="80%" border="0" style="border-style: none">');
  document.write('<tr><td style="border-style: none"><div align="left"><img src="'+bild+'" border="0"></div></td>');
//  if(navigator.cookieEnabled == true)
//  {
//    document.write('<td width="30%" style="border-style: none">&nbsp;</td>');
//    document.write('<td width="60%" style="border-style: none" title="Erlaubt die Umstellung zwischen kompakter und ausführlicher Darstellungsweise. Die Auswahl wird in einem Cookie gespeichert und wieder verwendet."><br>');
//  }
//  document.write('<form>');
//   if(navigator.cookieEnabled == true)
//   {
//     if (document.cookie.indexOf("kompakt") != -1)
//   	       document.write('<input type="button" value="ausführlich anzeigen" onClick="neuanzeigen(true);">');
//     else  document.write('<input type="button" value="kompakt anzeigen" onClick="neuanzeigen(false);">');
//   }
//   else    document.write('Umschaltung per Cookie disabled');
//
//  document.write('</form>');
  if (h1 != undefined)
  {
  	document.write('<td width="20" style="border-style: none">&nbsp;</td>');
  	document.write('<td  style="border-style: none"><h1>Feinstrumpfhosen von '+h1+'</h1></td>');
  }
  document.write('</tr></table>');
}


function neuanzeigen (wie)
{
  var modus;
  if (wie == true) // ausführlich
  {
    modus = "voll";
  }
  else     // kompakt
  {
    modus = "kompakt";
  }
  CookieSetzen (1, modus);
  location.reload();
}

function TabRowStart (idx, text)
{
    document.write('<tr class=');
	if (idx == 2 || idx == 4 || idx == 6 || idx == 8 || idx == 10 || idx == 12 || idx == 14 || idx == 16 || idx == 18 || idx == 20)
	   document.write('"smld">');
	else
	   document.write('"smlh">');
    document.write('<td width="350" colspan="2">'+idx+' - '+text+'</td>');
}

function TabRowEnd (tooltip, text, idx)
{
	document.write('<td width="40" title="'+tooltip+'" class="pkte">'+idx+'</td>');
    document.write('<td width="280" colspan="2">'+text+'</td>');
    document.write('</tr>');
}
 
function tabelle (modell,bild,denPreis,minug,maxug,minge,maxge,w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12,w13,w14,w15,w16,text15,text16,fazit,pfeil,blickdicht,shop,anzeigen)
{
  var text;
  var tooltip;
  var temp;
  var i;
  var tabbreite;
  var spbreite;
  var spbreite2;

  if (blickdicht == undefined)
  	 var blickdicht=" ";
  if (shop == undefined)
  	 var shop=" ";
  if (anzeigen == undefined)
  	 var anzeigen=" ";
  	 
  var spalte1 = 100;
  var spalte2 = 280;
  var spalte3 = 40;
  var spalte4 = 280;
  var spalte5 = 50;
  
  var dateiname = document.getElementsByTagName("link")[2].href;
  if (dateiname.indexOf("-1152.css") >= 0)	 
  {
      spalte1 = 100;
      spalte2 = 270;
      spalte3 = 40;
      spalte4 = 270;
      spalte5 = 40;
  }
  else if (dateiname.indexOf("-1024.css") >= 0)	 
  {
      spalte1 = 100;
      spalte2 = 255;
      spalte3 = 40;
      spalte4 = 260;
      spalte5 = 40;
  }
  var tabbreite = spalte1 + spalte2 + spalte3 + spalte4 + spalte5;	 

  var summe = w1+w2+w3+w4+w5+w6+w7+w8+w9+w10+w11+w12+w13+w14+w15+w16; 
  var summetext = getSummeTxt (summe);
 
  
  document.write('<table border="1" width="'+tabbreite+'">');
  document.write('<tr style="border-style:none">');
  document.write('<td width="'+spalte1+'" style="border-style:none"><img src="images/leer.gif" width="'+spalte1+'" height="0"></td>');
  document.write('<td width="'+spalte2+'" style="border-style:none"><img src="images/leer.gif" width="'+spalte2+'" height="0"></td>');
  document.write('<td width="'+spalte3+'" style="border-style:none"><img src="images/leer.gif" width="'+spalte3+'" height="0"></td>');
  document.write('<td width="'+spalte4+'" style="border-style:none"><img src="images/leer.gif" width="'+spalte4+'" height="0"></td>');
  document.write('<td width="'+spalte5+'" style="border-style:none"><img src="images/leer.gif" width="'+spalte5+'" height="0"></td>');
  document.write('</tr>');
  
  document.write('<tr height="70">');
  document.write('<td width="'+spalte1+'">&nbsp;');
  if (blickdicht == "a" || blickdicht == "A" || shop == "a" || shop == "A" || anzeigen == "a" || anzeigen == "A")
  	document.write('<a href="Verpackung/'+bild+'.jpg" rel="lytebox" title="'+modell+'<br />'+fazit+'"><img src="Verpackung/'+bild+'-1.jpg" border="0" /></a></td>');
	else
  	document.write('<img src="Verpackung/'+bild+'-1.jpg" border="0" /></td>');
  	
  document.write('<td width="'+spalte2+'" class="head">'+modell+'</td>');
  document.write('<td width="'+spalte3+spalte4+spalte5+'" colspan="3" class="head">'+denPreis+'</td>');
  document.write('</tr>');

	
  //alert (getCookieWert('Testanzeige'));
//if (getCookieWert('Testanzeige') == null || // Cookie existiert nicht
//    getCookieWert('Testanzeige') != null && getCookieWert('Testanzeige').indexOf("voll") != -1
//    (navigator.cookieEnabled == true && document.cookie && getCookieWert('Testanzeige').indexOf("voll") != -1)
//   || navigator.cookieEnabled == false || !document.cookie)
{
//alert (getCookieWert('Testanzeige'));

	TabRowStart (1, "Wie fühlen sich die Strümpfe nach dem Auspacken an");
      i = -1;
	  tooltip = "";
	  temp = 0;
	  do {
	  text = "";
	  do {
	  switch (i)
	  { case -1: text="fest, kratzig";	   break;
	    case 0: text="normal";	   break;
	    case 1: text="weich";	   break;
		case 2: text="schön weich";	   break;
	  }
	  if (temp == 0)
	  	 tooltip = tooltip + i + '&nbsp;&nbsp;' + text + '\n';
	  i ++;
	  } while (i <= 2 && temp == 0);
	  temp ++;
	  i = w1;
	  } while (temp <= 1);
	TabRowEnd (tooltip, text, w1);
	TabRowStart (2, "Wie lassen sie sich anziehen");
      i = 0;
	  tooltip = "";
	  temp = 0;
	  do {
	  text = "";
	  do {
	  switch (i)
	  { 
	    case 0: text="zu eng";	   break;
	    case 1: text="etwas eng";	   break;
		case 2: text="einwandfrei";	   break;
	  }
	  if (temp == 0)
	  	 tooltip = tooltip + i + '&nbsp;&nbsp;' + text + '\n';
	  i ++;
	  if (i == -1) i++;
	  } while (i <= 2 && temp == 0);
	  temp ++;
	  i = w2;
	  } while (temp <= 1);
	TabRowEnd (tooltip, text, w2);
	TabRowStart (3, "Wie fühlen sich die Strümpfe am Bein an");
      i = -1;
	  tooltip = "";
	  temp = 0;
	  do {
	  text = "";
	  do {
	  switch (i)
	  { case -1: text="fest, kratzig, hart";	   break;
	    case 1: text="normal";	   break;
	    case 3: text="weich";	   break;
		case 5: text="schön weich";	   break;
	  }
	  if (temp == 0)
	  	 tooltip = tooltip + i + '&nbsp;&nbsp;' + text + '\n';
	  i ++;
	  i ++;
	  } while (i <= 5 && temp == 0);
	  temp ++;
	  i = w3;
	  } while (temp <= 1);
	TabRowEnd (tooltip, text, w3);
	TabRowStart (4, "Passform ");
      i = -1;
	  tooltip = "";
	  temp = 0;
	  do {
	  text = "";
	  do {
	  switch (i)
	  { case -1: text="zu klein";	   break;
	    case 1: text="etwas knapp";	   break;
	    case 3: text="gut";	   break;
		case 5: text="sehr gut";	   break;
	  }
	  if (temp == 0)
	  	 tooltip = tooltip + i + '&nbsp;&nbsp;' + text + '\n';
	  i ++;
	  i ++;
	  } while (i <= 5 && temp == 0);
	  temp ++;
	  i = w4;
	  } while (temp <= 1);
	TabRowEnd (tooltip, text, w4);
	TabRowStart (5, "Tragekomfort generell");
      i = -1;
	  tooltip = "";
	  temp = 0;
	  do {
	  text = "";
	  do {
	  switch (i)
	  { case -1: text="stark einengend";	   break;
	    case 1: text="etwas einengend";	   break;
	    case 3: text="leicht";	   break;
		case 5: text="angenehm leicht";	   break;
	  }
	  if (temp == 0)
	  	 tooltip = tooltip + i + '&nbsp;&nbsp;' + text + '\n';
	  i ++;
	  i ++;
	  } while (i <= 5 && temp == 0);
	  temp ++;
	  i = w5;
	  } while (temp <= 1);
	TabRowEnd (tooltip, text, w5);
	TabRowStart (6, "wahrscheinliche Haltbarkeit");
      i = -1;
	  tooltip = "";
	  temp = 0;
	  do {
	  text = "";
	  do {
	  switch (i)
	  { case -1: text="undefinierbar, wg. kleinen Mängeln";	   break;
	    case 0: text="niedrig";	   break;
	    case 1: text="normal";	   break;
		case 2: text="hoch";	   break;
	  }
	  if (temp == 0)
	  	 tooltip = tooltip + i + '&nbsp;&nbsp;' + text + '\n';
	  i ++;
	  } while (i <= 2 && temp == 0);
	  temp ++;
	  i = w6;
	  } while (temp <= 1);
	TabRowEnd (tooltip, text, w6);
	TabRowStart (7, "Maschenbild - Optik");
      i = -1;
	  tooltip = "";
	  temp = 0;
	  do {
	   text = "";
	   do {
	    switch (i)
	    { case -1: text="fleckig, streifig";	   break;
	      case 0: text="gleichmäßig";	   break;
	      case 1: text="fein und gleichmäßig";	   break;
		  case 3: text="sehr zart und gleichmäßig";	   break;
	    }
	    if (temp == 0)
	  	   tooltip = tooltip + i + '&nbsp;&nbsp;' + text + '\n';
	    i ++;
	    if (i == 2)  i ++;
	   } while (i <= 3 && temp == 0);
	   temp ++;
	   i = w7;
	  } while (temp <= 1);
	TabRowEnd (tooltip, text, w7);
	TabRowStart (8, "Bündchen - Beinabschluß");
      i = 0;
	  tooltip = "";
	  temp = 0;
	  do {
	   text = "";
	   do {
	    switch (i)
	    { 
	      case 0: text="schmal";	   break;
	      case 1: text="breit (2,5 ... 4 cm)";	   break;
		  case 2: text="sehr breit (> 4 cm)";	   break;
	    }
	    if (temp == 0)
	  	   tooltip = tooltip + i + '&nbsp;&nbsp;' + text + '\n';
	    i ++;
	    if (i == -1)  i ++;
	   } while (i <= 2 && temp == 0);
	   temp ++;
	   i = w8;
	  } while (temp <= 1);
	TabRowEnd (tooltip, text, w8);
	TabRowStart (9, "Funktion Bündchen - Beinabschluß <br> (bei ca. 50-54 cm Beinumfang)");
      i = -2;
	  tooltip = "";
	  temp = 0;
	  do {
	   text = "";
	   do {
	    switch (i)
	    { case -2: text="Strümpfe rutschen, praktisch nicht mehr vorhanden";	   break;
	      case 0: text="Neigt zum Rutschen, oder aber: engt ein";	   break;
	      case 1: text="guter Halt";	   break;
		  case 2: text="sehr guter Halt";	   break;
	    }
	    if (temp == 0)
	  	   tooltip = tooltip + i + '&nbsp;&nbsp;' + text + '\n';
	    i ++;
	    if (i == -1)  i ++;
	   } while (i <= 2 && temp == 0);
	   temp ++;
	   i = w9;
	  } while (temp <= 1);
	TabRowEnd (tooltip, text, w9);
	TabRowStart (10, "Spitzenverstärkung");
      i = -1;
	  tooltip = "";
	  temp = 0;
	  do {
	   text = "";
	   do {
	    switch (i)
	    { case -1: text="zu dick";	   break;
	      case 0: text="relativ dick, könnte zarter sein";	   break;
	      case 1: text="transparent";	   break;
		  case 2: text="sehr zart und transparent, ähnlich dem Beinmaterial";	   break;
	    }
	    if (temp == 0)
	  	   tooltip = tooltip + i + '&nbsp;&nbsp;' + text + '\n';
	    i ++;
	   } while (i <= 2 && temp == 0);
	   temp ++;
	   i = w10;
	  } while (temp <= 1);
	TabRowEnd (tooltip, text, w10);
	TabRowStart (11, "Ausgeformt");
      i = 0;
	  tooltip = "";
	  temp = 0;
	  do {
	   text = "";
	   do {
	    switch (i)
	    { 
	      case 0: text="nein";	   break;
		  case 1: text="ja";	   break;
	    }
	    if (temp == 0)
	  	   tooltip = tooltip + i + '&nbsp;&nbsp;' + text + '\n';
	    i ++;
	   } while (i <= 1 && temp == 0);
	   temp ++;
	   i = w11;
	  } while (temp <= 1);
	TabRowEnd (tooltip, text, w11);
	TabRowStart (12, " Elastananteil");
      i = 0;
	  tooltip = "";
	  temp = 0;
	  do {
	   text = "";
	   do {
	    switch (i)
	    { case 0: text="kleiner 5%, bzw. ohne";	   break;
	      case 1: text="mehr als 15%";	   break;
	      case 2: text="5...15% (bzw. wenn < 10 den)";	   break;
//		  case 3: text="LYCRA<small><sup>&reg;</sup></small> 3D";	   break;
	    }
	    
	    if (modell.indexOf("Oroblu") > -1)
	    {
	    	if (i == 3)
	    			text="Progress 3D";
	    }
	    else
	    {
	    	if (i == 3)
	    			text="LYCRA<small><sup>&reg;</sup></small> 3D";
	    }
	    
	    if (temp == 0)
	  	   tooltip = tooltip + i + '&nbsp;&nbsp;' + text + '\n';
	    i ++;
	   } while (i <= 3 && temp == 0);
	   temp ++;
	   i = w12;
	  } while (temp <= 1);
	TabRowEnd (tooltip, text, w12);
	TabRowStart (13, "Verarbeitung");
      i = -1;
	  tooltip = "";
	  temp = 0;
	  do {
	   text = "";
	   do {
	    switch (i)
	    { 
	      case -1: text="einfache, runde Strumpfbandnaht bzw. unsauber verarbeitet";	   break;
	      case 0: text="Strumpfbandnähte an der Seite";	   break;
		  case 1: text="sauber verarbeitet";	   break;
	    }
	    if (temp == 0)
	  	   tooltip = tooltip + i + '&nbsp;&nbsp;' + text + '\n';
	    i ++;
	   } while (i <= 1 && temp == 0);
	   temp ++;
	   i = w13;
	  } while (temp <= 1);
	TabRowEnd (tooltip, text, w13);
	TabRowStart (14, "Verpackung");
      i = -1;
	  tooltip = "";
	  temp = 0;
	  do {
	   text = "";
	   do {
	    switch (i)
	    { 
	      case -1: text="unpraktische Knick-Pappschachtel";	   break;
	      case 0: text="einfache Pappschachtel";	   break;
	      case 1: text="flache Standardverpackung";	   break;
		  case 2: text="optimierte Verpackung, innen Folie, außen Pappe";	   break;
		  case 3: text="innen besonders geschützt, kein Kontakt zur Pappe";	   break;
	    }
	    if (temp == 0)
	  	   tooltip = tooltip + i + '&nbsp;&nbsp;' + text + '\n';
	    i ++;
	   } while (i <= 3 && temp == 0);
	   temp ++;
	   i = w14;
	  } while (temp <= 1);
	TabRowEnd (tooltip, text, w14);
	TabRowStart (15, "Besondere Highlights");
	document.write('<td width="70">'+w15+'</td>');
    document.write('<td colspan="2">'+text15+'</td>');
    document.write('</tr>');
	TabRowStart (16, "Besondere Mängel");
	document.write('<td width="70">'+w16+'</td>');
    document.write('<td colspan="2">'+text16+'</td>');
    document.write('</tr>');
}
    document.write('<tr class="smlh">');
    document.write('<td width="450" colspan="2" class="foot"><b>insgesamt</b></td>');

	tooltip = "ab 35: Premiumklasse\nab 30: Komfortklasse\nab 25: Luxusklasse\nab 20: sehr gute Qualität\nab 15: gute Qualität\nab 10: befriedigende Qualität\nab 5: ausreichende Qualität\ndarunter: unbrauchbar";

  document.write('<td class="foot" title="'+tooltip+'" style="cursor:help">'+summe+'</td>');
  document.write('<td colspan="2" class="foot">'+summetext+'</td>');
  document.write('</tr>');
  document.write('<tr class="smld">');
  document.write('<td height="20" class="foot">Fazit:&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/'+pfeil+'.gif" border="0"');
  switch (pfeil)
  {		 case "p1": document.write(' title="PLV sehr gut"');
  		 case "p2": document.write(' title="PLV gut"');
		 case "p3": document.write(' title="PLV befriedigend"');
		 case "p4": document.write(' title="PLV ausreichend"');
		 case "p5": document.write(' title="PLV mangelhaft"');
  }
  document.write('></td>');
  document.write('<td colspan="3" height="20" class="foot">'+fazit+'</td>');
	  
//  if (blickdicht == undefined)
//  	 var blickdicht=" ";
//  if (shop == undefined)
//  	 var shop=" ";
//  if (anzeigen == undefined)
//  	 var anzeigen=" ";
 
  if (blickdicht.indexOf("http") > -1 || shop.indexOf("http") > -1 || anzeigen.indexOf("http") > -1)
  {
   	 if (blickdicht.indexOf("http") > -1)
	 	var shopurl = blickdicht;
	 else var shopurl = shop;
  	 document.write('<td><a href="'+shopurl+'" title="direkt in einem Shop bestellen" target="_shop"><img src="images/korb.gif" width="20" height="20" border="0"></a></td>');
  }
  else
	  document.write('<td>&nbsp;</td>');

  document.write('</tr>');
  document.write('<tr class="smlh">');
  document.write('<td colspan="5" height="20">Strumpfband Dehnungsumfang ca. (ungedehnt): min '+minug+' max  '+maxug+' cm - (gedehnt): min '+minge+' max  '+maxge+' cm</td>');
	  
  document.write('</tr>');
  document.write('</table>');
}

//--- Script für Übersichtstabelle ---
var farbton;
var anzahl;

function TabStart ()
{
  document.write('<table width="98%" border="1" cellspacing="3" cellpadding="0" >');
    document.write('<tr>');
      document.write('<td width="28%" class="head">Marke - Modell</td>');
      document.write('<td width="12%" class="head">Bild</td>');
      document.write('<td width="60%" class="head">Kommentar</td>');
    document.write('</tr>');
	farbton = 1;
  anzahl = 0;
}

function TabEnde ()
{
    document.write('<tr>');
      document.write('<td width="28%" class="foot">einzelne Wertungen</td>');
      document.write('<td width="12%" class="foot">vergrößertes Bild</td>');
      document.write('<td width="60%" class="foot">ges. Anzahl: '+anzahl+' Modelle</td>');
    document.write('</tr>');
  document.write('</table>');
}

function Zeile (LinkTxt, modell, bild, denPreis, summe, kommentar, neu)
{
    document.write('<tr class=');
	if (farbton == 2)
	{   document.write('"smld" height="70">');
		farbton = 1;
	}
	else
	{   document.write('"smlh" height="70">');
		farbton = 2;
	}

    document.write('<td width="28%" class="uebers"><a href='+LinkTxt+'>'+modell+'</a>');
  	if (neu == "neu")
  		 document.write('<br><img src="../images/ani-punkt.gif" width="12" height="12" border="0">');
    document.write('</td>');
    document.write('<td width="12%">');
	document.write('<img src="Verpackung/'+bild+'-1.jpg" border="0">');
//	document.write('<a href="javascript:fenster(&quot;Verpackung/'+bild+'.jpg&quot;,&quot;'+modell+'&quot;,&quot;'+denPreis+'&quot;,&quot;'+summe+'&quot;,&quot;'+kommentar+'&quot;)"><img src="Verpackung/'+bild+'-1.jpg" border="0"></a>');
    document.write('</td>');
    document.write('<td width="60%" class="uebers"><b>');
	document.write(summe+'</b> Punkte: &nbsp;&nbsp;'+kommentar+' &nbsp; ');
    document.write('</td>');
    document.write('</tr>');
    anzahl ++;
}


var a, Bild;

function tauschen (a, Bild)
{
  if (document.getElementById)
  	 document.getElementById(a).src=Bild;
}


