
/* =============================================================================== */
/*        Copyright (C) VNU Business Publications LTD. All rights reserved.        */
/* ------------------------------------------------------------------------------- */
/*             Internal use only. Do not publish and/or redistribute.              */
/* =============================================================================== */


//Serve any component to third party websites
function RandomQuoter() 
{
	this.host = 'http://randomquotes.vnu.net';	//http://randomquotes-local:8080
	this.remoteUrl = document.URL;
	this.siteIdentifier = null;
 
	try 
	{
		if (siteIdentifier != null) 
		{
			this.siteIdentifier = siteIdentifier;
		} 
	}
	catch(error) 
	{
		this.siteIdentifier = "oh god";
	}

	var mappingFileName = "mapping_" + this.siteIdentifier + ".js";
	var mappingFileSrc = this.host + "/javascript/" + mappingFileName;
	document.write("<SCR" + "IPT type='text/javascript' src='" + mappingFileSrc + "'></SCR" + "IPT>");
}

RandomQuoter.prototype.GetQuote = function() 
{
	var quoteFileSrc = this.host + "/javascript/quote.js?section=" + params['section'];
	document.write("<SCR" + "IPT type='text/javascript' src='" + quoteFileSrc + "'></SCR" + "IPT>");
}