// *******************************************************************************

// *** 2004 zanox AG, Sebastian Schkudlara; Update 06/12/04                       ***

// *** Hilfe finden Sie unter:                     		                            ***

// *** http://lion.zanox-affiliate.de/web/z_help.nsf/pages/3014 ***

// *******************************************************************************

var zufallszahl, aktuelle_zufallszahl, multiplikator;



// *******************************************************************************

// *** set the following values between the quotation mark                ***

// *******************************************************************************

anzahl = 4;

// SET 1 ab 06/12/0204

product_id = new Array("615567", "322784", "21800X", "817257");

txt_product = new Array("HP Toner f&uuml;r<br>LaserJet", "Leitz Locher 5005", "Kyocera Toner TK17 für FS1000", "HP Office Paper");

txt_description = new Array("Original Toner zu Topp-Preisen!", "Metall-Locher in bewährter<br>Leitz Qualität!", "Original Toner zu Topp-Preisen! bei mypaper.de", "Hochleistungspapier");

txt_company = "bei mypaper.de"

txt_price = new Array("Jetzt 70,57 &euro;", "Jetzt 5,64 &euro;", "Jetzt 88,24 &euro;", "Jetzt 4,39 &euro;");

txt_price_old = new Array(" ", " ", " ", " ", " ");

img_source = new Array("q1338a_lf_0902.gif", "322784A1.gif", "21800X.gif", "817257A1.gif");

img_width = new Array("100", "100", "100", "100");

img_height = new Array("87", "87", "87", "87");



// SET 2 ab 12/2002

//product_id = new Array("424461", "853722", "230181", "330070");

//txt_product = new Array("Flip-Chart", "CD Turm 96", "Software Gastro Designer", "Abroller f&uuml;r Packband");

//txt_description = new Array("Weiße Metalltafel, magnethafend", "schwarz, 16,3 x 14,6 x 68,1 cm", "Drucksachen f&uuml;r Gastronomie und Events", "zum Verschließen von Kartons. 50 mm x 66 m.");

//txt_company = "bei mypaper"

//txt_price = new Array("52,00 &euro;", "15,99 &euro;", "31,00 &euro;", "3,35 &euro;");

//img_source = new Array("424461.gif", "853722.gif", "230181.gif", "330070.gif");

//img_width = new Array("78", "78", "78", "78");

//img_height = new Array("78", "78", "78", "78");



//link_path = "http://www.mypaper.de/cgi-bin/mypaper.storefront/DE/product/";

link_path = "";

//img_path = "http://www.mypaper.de/isroot/Produktbilder/Small/";

img_path = "http://www.mypaper.de/isroot/Produktbilder/Special/";

img_alt = "jetzt bei mypaper bestellen";



// *******************************************************************************

// *** determine the product                                                   ***

// *******************************************************************************

function ermittle_zufallszahl()

{	

	multiplikator = anzahl - 1;

	zufallszahl=Math.round((Math.random()*multiplikator));

	if (zufallszahl==aktuelle_zufallszahl)

	{

		ermittle_zufallszahl();

	}

	aktuelle_zufallszahl = zufallszahl;

}



// *******************************************************************************

// *** calling part:                                                           ***

// *** modify the name of the function  !!!                                    ***

// *******************************************************************************

function mypaper_ProductOfTheWeek(link)

{

	ermittle_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='" + link + link_path + product_id[zufallszahl] + "' TARGET='_blank'>");

	document.writeln("<IMG SRC='" + img_path + img_source[zufallszahl] + "' ALT='" + img_alt + "' BORDER='0' WIDTH='" + img_width[zufallszahl] + "' HEIGHT='" + img_height[zufallszahl] + "'>");

	document.writeln('<BR><B>' + txt_product[zufallszahl] + '</B></A><BR>' + txt_description[zufallszahl] + '<BR>' + txt_company + '<BR><span style="text-decoration:line-through;">' + txt_price_old[zufallszahl] + '</span>&nbsp;&nbsp;&nbsp;<FONT COLOR="red"><B>' + txt_price[zufallszahl] + '</B></FONT></CENTER></FONT>');

	document.writeln("</TD></TR></TABLE>");

}



function mypaper_ProductOfTheWeek_Sky(link)

{

	ermittle_zufallszahl();



	document.writeln('<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" WIDTH="120" HEIGHT="600" BGCOLOR="#00FF00"><TR><TD>');

	document.writeln('<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%" HEIGHT="100%"><TR HEIGHT="23"><TD WIDTH="120" HEIGHT="23" BGCOLOR="#FFFFFF"></TD></TR>');

	document.writeln('<TR HEIGHT="44"><TD WIDTH="120" HEIGHT="44" BGCOLOR="white"><CENTER><font style="font-size:18px; font-weight:normal; font-family:Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><b>B&uuml;robedarf</b><br></font><font style="font-size:11px; font-weight:normal; font-family:Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><b>Angebote der Woche</b></font></center></td></tr>');

	document.writeln('<tr height="6"><td width="120" height="6" bgcolor="#FFFFFF"></td></tr>');

	document.writeln('<tr height="19"><td width="120" height="19" bgcolor="#FFFFFF"></td></tr>');

	document.writeln('<tr height="199"><td width="120" height="199" bgcolor="white"><center>');



	// 1 mit Zufallszahl

	document.writeln('<font style="font-size:12px; font-weight:normal; font-family:Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><CENTER>');

	document.writeln('<A HREF="' + link + link_path + product_id[zufallszahl] + '" TARGET="_blank">');

	document.writeln('<IMG SRC="' + img_path + img_source[zufallszahl] + '" ALT="' + img_alt + '" BORDER="0" WIDTH="' + img_width[zufallszahl] + '" HEIGHT="' + img_height[zufallszahl] + '">');

	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('</center></td></tr>');

	document.writeln('<tr height="21"><td width="120" height="21" bgcolor="#FFFFFF"></td></tr>');

	document.writeln('<tr><td width="120" bgcolor="white"><center>');



	// 2 Zufallszahl + 1

	zufallszahl++; if (zufallszahl >= anzahl) zufallszahl = 0;

	document.writeln('<font style="font-size:12px; font-weight:normal; font-family:Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><CENTER>');

	document.writeln('<A HREF="' + link + link_path + product_id[zufallszahl] + '" TARGET="_blank">');

	document.writeln('<IMG SRC="' + img_path + img_source[zufallszahl] + '" ALT="' + img_alt + '" BORDER="0" WIDTH="' + img_width[zufallszahl] + '" HEIGHT="' + img_height[zufallszahl] + '">');

	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('</center></td></tr>');

	document.writeln('<tr height="21"><td width="120" height="21" bgcolor="#FFFFFF"></td></tr><tr height="71">');

	document.writeln('<td width="120" height="71" bgcolor="white"><img height="60" width="120" src="http://www.mypaper.de/isroot/mypaper/SiteImages/logo120x60.jpg"></td>	</tr>');

	document.writeln('</table></td></tr></table>');

}
