
//  Kategori object constructor 
    function kategori(kategori, kategori_US) { 
//alert("Indlæser kategori: "+ kategori);
//alert("Indlæser kategori_US: "+ kategori_US);
            this.kategori = kategori; 
            this.kategori_US = kategori_US; 
            this.show = kategori_show; 
            this.show_val = kategori_show_val; 
    }
    
    function kategori_show() {
//alert("Show_val: "+ show_val)    	
      if (parent.Lang == 'DK')  {
       window.document.write(this.kategori);
//alert(this.katergori)    	
      }
      else {
       window.document.write(this.kategori_US);
//alert(this.katergori_US)    	
      }
    }
    function kategori_show_val() {
       window.document.write(this.kategori);
   }
   
   function go(form) {
	var pages=form.to.selectedIndex
	if ( form.to.options[form.to.selectedIndex].value
	!= "none" ) {
	parent.aktuel_kategori = form.to.options[pages].value;
//alert(form.to.options[pages].value)
	parent.main.document.location.href= 'vis_varer.html'
	}
   };
   
   function crt_cat() {
      document.write("<form method='post' action=''><td>"); 
      document.write("<select name='to' size=1 onChange='go(this.form)'>");
//alert(parent.lang);      
      if (parent.Lang == 'DK')  {      
         document.write("<option selected value='none'>Vælg kategori ... </option>");
      }   
      else {
         document.write("<option selected value='none'>Choose Category ... </option>");
      }


//      alert(parent.kategori.length)
      for (var i=1; i<=parent.kategori.length-1; i++) {
//      alert(parent.kategori[i].show())
         
//         document.write('<option value="javascript:vis_kategori(\'')
//         parent.kategori[i].show() 
//         document.write('\')">')
//         parent.kategori[i].show_val() 
//         document.write('</option>')

         document.write('<option value="')
         parent.kategori[i].show_val() 
         document.write('">')
         parent.kategori[i].show() 
         document.write('</option>')

         var foundit = 1;
      }
      document.write("</select></td></form>");

   }