
//script that build a dynamic table with product specs

function specs_gen()
{

// retrieve product information from array

var langver;
var thecategory;
var backlink;
var picfolder, pdffolder;


if (document.location.search.substring(document.location.search.length-1 ,document.location.search.length) == "f")
	langver = "_f";
else langver = "_e";



  if (item_group != "")
		if (langver == "_f")
			thecategory = eval(item_group + "_french_title");
		else thecategory = eval(item_group + "_english_title");
  else
		 thecategory = "Please click on a category on the left menu!"; 




var thecompany = eval(item_group + "_item_company[" + item_num + "]");
var thefolder_name = eval(item_group + "_item_folder_name[" + item_num + "]");
var themake = eval(item_group + "_item_make[" + item_num + "]");
var themodel = eval(item_group + "_item_model[" + item_num + "]");
var thedesc = eval(item_group + "_item_desc[" + item_num + "]");
var themisc = eval(item_group + "_item_misc[" + item_num + "]");
var theprice = eval(item_group + "_item_price[" + item_num + "]");
var thetel = eval(item_group + "_item_tel[" + item_num + "]");
var thefax = eval(item_group + "_item_fax[" + item_num + "]");
var theemail = eval(item_group + "_item_email[" + item_num + "]");
var thecontact = eval(item_group + "_item_contact[" + item_num + "]");
var theurl = eval(item_group + "_item_url[" + item_num + "]");
var thepdf = eval(item_group + "_item_pdf[" + item_num + "]");
var thepaypal = eval(item_group + "_item_paypal[" + item_num + "]");




picfolder = "products_js/" + parsedfolder + "/detail/";
pdffolder = "products_js/" + parsedfolder + "/pdf/";

var thumbimage = picfolder + eval(item_group + "_item_image[" + item_num + "]");
var largeimage = thumbimage.substring(0, thumbimage.indexOf("s.gif")) + "l.gif";




eval('document.writeln("<table width=\'530\' border=\'0\' cellspacing=\'0\' cellpadding=\'0\'>") ');
eval('document.writeln("  <tr> ") ');
eval('document.writeln("    <td width=\'270\' valign=\'top\' align=\'center\'><img name= \'itemimage\' src=" + largeimage + " hspace=\'8\'></td> ") ');
eval('document.writeln("    <td valign=\'top\' class=\'black_text\'>Category: " + thecategory + "<br> ") ');
if (thecompany != null && thecompany !="")
	eval('document.writeln(		      "Company: " + thecompany + "<br> ") ');

if (thefolder_name != null && thefolder_name!="")
	eval('document.writeln(		      "Folder Name: " + thefolder_name + "<br> ") ');

if (themake != null && themake!="")
	eval('document.writeln(		      "Manufacturer: " + themake + "<br> ") ');

if (themodel != null && themodel!="")
	eval('document.writeln(		      "Model: " + themodel + "<br> ") ');

if (thedesc != null && thedesc !="" )
	eval('document.writeln(               "Description: " + thedesc + "<br> ") ');

if (themisc != null && themisc !="")
	eval('document.writeln(               "Note: " + themisc + "<br> ") ');

if (theprice != null && theprice!="")
	eval('document.writeln(               "Price: " + theprice + "<br> ") ')
else 
	eval('document.writeln("               Please call for price<br> ") ');

eval('document.writeln("                	<br> ") ');

if (thetel != null && thetel!="")
	eval('document.writeln(              "Tel: " +  thetel + "<br> ") ');

if (thefax != null && thefax!="")
	eval('document.writeln(              "Fax: " + thefax + "<br> ") ');

if (theemail != null && theemail!="")
	eval('document.writeln(              "Email: <a href=\'mailto:" + theemail + "\'><font color=\'navy\'>" + theemail + "</font></a><br> ") ');

if (thecontact != null && thecontact!="")
	eval('document.writeln(              "contact: " + thecontact + "<br><br>") ');

if (thepdf != null && thepdf!="")
	eval('document.writeln(              "<a href=\'" + pdffolder + thepdf + "\' target=\'specssheet\'><font color=\'navy\'>Click for specs sheet [" + thepdf + "]</font></a><br> ") ');

if (theurl != null && theurl!="")
	eval('document.writeln(              "URL: <a href=\'" + theurl + "\' target=\'_new\'><font color=\'navy\'>" + theurl + "</font></a><br> ") ');

if (thepaypal == true)
	eval('document.writeln(              "<a href=\'http://www.paypal.com\' target=\'_new\'><img src=\'images/paypal_logo.gif\' vspace=3 border=0></a><br> ") ');
	
	



backlink = item_category + "_" + item_group + langver + "&" + backpagenum;

// convert category to lower case
backlink = backlink.toLowerCase();




eval('document.writeln(			     "<img src=\'images/filler.gif\' width=\'10\' height=\'10\'><br><a href=\'products.html?" + backlink + "\' onFocus=\'if (this.blur) this.blur()\'><img src=\'images/back-bt.gif\' border=\'0\' ></a>")');
eval('document.writeln("        </td>") ');
eval('document.writeln("    </tr>") ');
eval('document.writeln("</table>") ');



}                      


