// *******************************************************************************
// *** 2002 zanox AG, Silke Müller; last Update: 09/05/03                ***
// *** Hilfe finden Sie unter:                                                            ***
// *** http://lion.zanox-affiliate.de/web/z_help.nsf/pages/faq_skript3   ***
// *******************************************************************************
var zufallszahl, aktuelle_zufallszahl, multiplikator, url_product;
// *******************************************************************************
// *** set the following values between the quotation mark                ***
// *** Hint: set the path of the product in zanox-affiliate!			***
// *** e.g. "http://www.mypaper.de/cgi-bin/mypaper.storefront/DE/product/" ***
// *******************************************************************************
anzahl = 1;
product_id = new Array("10200", "10015", "10001", "10071");
txt_product = new Array("SofLens Comfort", "SofLens one day", "Focus Visitint", "Focus Dailies");
txt_description = new Array("6er Box", "90er Box", "6er Box", "30er Box");
txt_company = "bei LENSspirit"
txt_price = new Array("18,90 €", "48,99 €", "ab 19,99 €", "22,99 €");
img_source = new Array("10200.jpg", "10015.jpg", "10001.jpg", "10071.jpg");
img_width = new Array("80", "80", "80", "80");
img_height = new Array("80", "80", "80", "80");
img_path = "http://lensspirit.de/lib/prodpics/de/normal/"
img_alt = "bei Lensspirit kaufen";
// *******************************************************************************
// *** determine the product                                                           ***
// *******************************************************************************
function ermittle_zufallszahl()
{	
	multiplikator = anzahl - 1;
	zufallszahl=Math.round((Math.random()*multiplikator));
	if ( (zufallszahl>0) && (zufallszahl==aktuelle_zufallszahl) )
	{
		ermittle_zufallszahl(); 
	}
	aktuelle_zufallszahl = zufallszahl;
}
// *******************************************************************************
// *** calling part:                                                                          ***
// *** modify the name of the function  !!!                                         ***
// *******************************************************************************
function lensspirit_RotationProducts(link)
{
	ermittle_zufallszahl();
	url_product = link + product_id[zufallszahl];
	document.writeln("<TABLE CELLSPACING=0 BORDER=0 WIDTH='120'><TR><TD WIDTH='120' 	VALIGN='TOP'>");
	document.writeln("<FONT SIZE='2' FACE='Arial,Helvetica,sans-serif'><CENTER>");
	document.writeln("<A HREF='" + url_product + "' TARGET='_blank'>");
	document.writeln("<IMG SRC='" + img_path + img_source[zufallszahl] + "' ALT='" + img_alt + "' BORDER='0' WIDTH='" + 	img_width + "' HEIGHT='" + img_height + "'>");
	document.writeln('<BR><B>' + txt_product[zufallszahl] + '</B></A><BR>' + txt_description[zufallszahl] + '<BR>' + 	txt_company + '<BR><FONT COLOR="red"><B>' + txt_price[zufallszahl] + '</B></FONT></CENTER></FONT>');
	document.writeln("</TD></TR></TABLE>");
}