// JavaScript Document
<!--
<!-- Original:  Robert Bui (astrogate@hotmail.com) -->
<!-- Web Site:  http://astrogate.virtualave.net -->

<!-- Adaptation Martin Mc Arthur (martin@rmweb.co.za -->

<!-- Begin
var interval = 5; // delay between changing quotes (in seconds)
var random_display = 0; // 0 = no, 1 = yes
interval *= 1000;

var quote_index = 0;
quote_list = new Array();
quote_list[quote_index++] = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="34%" valign="top"><img src="images/special-phaser3635-img.jpg" width="263" height="233" /></td><td width="66%" valign="top" class="specials-container"><div class="specials-info"><h1 class="orange">Phaser 3635 MFP</h1><ul><li>Copy | Print | Fax | Colour Scan</li><li>Convenient Stapler</li><li>From 4.8c per copy</li></ul ><h2>R399 per month rental</h2><p>&nbsp;</p><p><div class="rm-orange"><a href="/office-equipment/multifuction/BW-over-30-ppm/phaser-3635mfp.html">Read more</a></div></div><div class="specials-button"><a href="specials.html"><img src="images/specials-button.png" border="0" /></a></div></td></tr></table>';
quote_list[quote_index++] = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="34%" valign="top"><img src="images/specials-colorqube-img.jpg" width="263" height="233" /></td><td width="66%" valign="top" class="specials-container"><div class="specials-info"><h1>ColorQube<sup>TM</sup> 9201/9202/9203</h1><h2>Break through the colour page price barrier.</h2><div style="float:left;"><a href="/office-equipment/multifuction/colour/colorqube-9201-9202-9203.html"><img src="images/colorqube-piggy.png" border="0" /></a></div><div style="float:left; padding-left:15px; color:#FFFFFF; font-weight:bold; font-family:Arial, Helvetica, sans-serif; font-size:12px; line-height:20px;"> &nbsp;&nbsp;8c - Black/White<br />&nbsp;&nbsp;8c - Useful Colour<br />25c - Everyday Colour<br />49c - Expressive Colour</div><div style="clear:both; height:1px;"></div><p>&nbsp;</p><p><div class="rm-green"><a href="/office-equipment/multifuction/colour/colorqube-9201-9202-9203.html">Read more</a></div></div><div class="specials-button"><a href="specials.html"><img src="images/specials-button.png" border="0" /></a></div></td></tr></table>';
quote_list[quote_index++] = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="34%" valign="top"><img src="images/special-6128mfp.jpg" width="263" height="233" /></td><td width="66%" valign="top" class="specials-container"><div class="specials-info"><h1 class="purple">Phaser 6128 MFP Colour </h1><ul><li>12 Colour, 16 B/W ppm </li><li>Copy | Print | Fax | Scan </li></ul ><h2>From R199 per month</h2><p style="margin:-12px 0px -10px 0px;">Terms and Conditions Apply  </p><p>&nbsp;</p><p><div class="rm-purple"><a href="/office-equipment/multifuction/colour/phaser-6128mfp.html">Read more</a></div></div><div class="specials-button"><a href="specials.html"><img src="images/specials-button.png" border="0" /></a></div></td></tr></table>';
var number_of_quotes = quote_list.length;

function generate(x, y) {
var range = y - x + 1;
return Math.floor(Math.random() * range) + x;
}

function getNextQuote() {
	if (random_display) {
		quote_index = generate(0, number_of_quotes-1);
	}
	else {
		quote_index = (quote_index+1) % number_of_quotes;
	}
	var new_quote = quote_list[quote_index];
	return(new_quote);
}

function changeQuote(div_id) {

	_findObj(div_id).innerHTML = getNextQuote();
	var recur_call = "changeQuote('"+div_id+"')";
	setTimeout(recur_call, interval);
}
//  End -->

function _findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}