// JavaScript Document
// Instantiate the real media variables 
	var oas='http://ads.traderonline.com/RealMedia/ads/';
	var RN = new String (Math.random());
	var RNS = RN.substring (2,11);
	var _version = 40;
	// Function to create an "oldstyle" realmedia ad
	function DisplayAds(page, sitepage, category, location, keywords, position, width, height) {
		var oaspage = sitepage + page + '/1' + RNS + '@' + position + '?' + category + location + keywords;
		if ( _version < 11 ) {
			document.write ('<a href="' + oas + 'adstream_nx.ads/' + oaspage + '" target="_top"><img src="' + oas + 'adstream_nx.ads/' + oaspage + '" border="0" width="' + width + ' height="' + height + '"></a>');
		} else {
			document.write ('<script language="JavaScript1.1" src="' + oas + 'adstream_jx.ads/' + oaspage + '">');
			document.write ('\<\!-- --\>');
			document.write ('\<\/script\>');
			document.write ('\<\!-- --\>');
		}
	}
	// Function to create an MJX style realmedia ad
	function DisplayAdsMJX(page, sitepage, poslist, pos, keywords, width, height) {
	// Render the Real Media Ad using OAS_RICH or OAS_NORMAL
	function OAS_AD(pos)
	{
    	if (OAS_version >= 11 && typeof OAS_RICH != 'undefined')
	  		OAS_RICH(pos);
		else
			OAS_NORMAL(pos);
	}
	//OAS_NORMAL : plugged in from Real Media code.
	function OAS_NORMAL(pos) 
		{
  			document.write('<A HREF="' + oas + 'click_nx.ads/' + sitepage + '/1' + RNS + '@' + poslist + '!' + pos + '?' + keywords + '" target="_top">');
  			document.write('<IMG SRC="' + oas + 'adstream_nx.ads/' + sitepage + '/1' + RNS + '@' + poslist + '!' + pos + '?' + keywords + '" BORDER="0" width="' + width + ' height="' + height + '"></A>');
		}
	//Set this variable to build the MJX tag
	// Since OAS_RICH is currently not defined. We call the constructor
	// and initialize the vars needed only once
	if (pos == 'Constructor')	
	{
		OAS_listpos = poslist;
		//test
		OAS_query = keywords;
		// Set version to 11 to render rich media ads 
		OAS_version = 11;
		// Real Media code (plugged in as provided)
		if ((navigator.userAgent.indexOf('Mozilla/3') != -1) || (navigator.userAgent.indexOf('Mozilla/4.0 WebTV') != -1))
		  OAS_version = 10;
		
		// Real Media code (plugged in as provided)
		if (OAS_version >= 11)
		 document.write('<SCR' + 'IPT LANGUAGE=JavaScript1.1 SRC="' + oas + 'adstream_mjx.ads/' + sitepage + '/' + page + '/1' + RNS + '@' + poslist + '!' + pos +  '?' + keywords + '"><\/SCRIPT>');//-->
	}
	else
		// Necessary variables should already exist, now we need to render 
		// the individual position
		OAS_AD(pos)
}
