var Random = Math.floor(Math.random() * 1 + 1);

if (Random == 1)
{
var ad3002ID      = new Array();
var ad3002WSID    = new Array();
var ad3002File    = new Array();
var ad3002Type    = new Array();
var ad3002W       = new Array();
var ad3002H       = new Array();
var ad3002URL     = new Array();
var ad3002BGColor = new Array();
var ad3002Ratio   = new Array();
var ad3002Poll    = new Array();

var i = 0;

ad3002ID[i]      = '35587';
ad3002WSID[i]    = 'discuss2';
ad3002File[i]    = 'http://mxmtrack.com/creative/20090922-hic/3.gif';
ad3002Type[i]    = 'img';
ad3002W[i]       = '300';
ad3002H[i]       = '250';
ad3002URL[i]     = 'http://www.moviesuper.com/big5/video_dvdvcd_details.asp?hLight=New&hType=DVD_VCD&hKeyID=MS-9068';
ad3002BGColor[i] = '';
ad3002Ratio[i++] = 0;

ad3002ID[i]      = '30472';
ad3002WSID[i]    = 'discuss2'; /* 20090915-op-halloweenbash / Video LREC */
ad3002File[i]    = 'http://akzone.com.hk/flv/op_halloween_videoLrec_networks.swf';
ad3002Type[i]    = 'swf';
ad3002W[i]       = '300';
ad3002H[i]       = '250';
ad3002URL[i]     = 'http://www.halloweenbash.com.hk/tc/';
ad3002BGColor[i] = '';
ad3002Ratio[i++] = 0;

ad3002ID[i]      = '30404';
ad3002WSID[i]    = 'discuss2'; /* OP-Summer 09 / 1st JUL 09 */
ad3002File[i]    = 'http://akzone.com.hk/flv/OPdino_video_300x250.swf';
ad3002Type[i]    = 'swf';
ad3002W[i]       = '300';
ad3002H[i]       = '250';
ad3002URL[i]     = 'http://summer.oceanpark.com.hk';
ad3002BGColor[i] = '';
ad3002Ratio[i++] = 0;

ad3002ID[i]      = '2343';
ad3002WSID[i]    = 'discuss2';
ad3002File[i]    = 'http://www.akzone.com.hk/flv/discuss_300x250.swf';
ad3002Type[i]    = 'swf';
ad3002W[i]       = '300';
ad3002H[i]       = '250';
ad3002URL[i]     = 'http://www.pocarisweat.hk/pocari_sweat_ad.htm';
ad3002BGColor[i] = '';
ad3002Ratio[i++] = 0;

ad3002ID[i]      = '30364';
ad3002WSID[i]    = 'discuss2';
ad3002File[i]    = 'http://mxmtrack.com/creative/20090408-clariol/LREC_uwants.swf';
ad3002Type[i]    = 'swfdiv';
ad3002W[i]       = '300';
ad3002H[i]       = '250';
ad3002URL[i]     = 'http://www.clairol-live.com.hk';
ad3002BGColor[i] = '';
ad3002Ratio[i++] = 0;

var k = 0;
var ad3002PollCheck = -1;
var ad3002PollUnique = 2;
for (var i = 0;i < ad3002Ratio.length;i++) {
	for (var j = 0;j < ad3002Ratio[i];j++) {
		ad3002Poll[k++] = i;

		if (ad3002PollUnique == 2) {
			ad3002PollCheck = i;
			ad3002PollUnique--;
		} else if (ad3002PollUnique == 1) {
				if (ad3002PollCheck != i) {
				ad3002PollUnique = 0;
			}
		}
	}
}

function mxmadsetCookie(cookieName, cookieValue) {
	var today = new Date();
	var expire = new Date();
	expire.setTime(today.getTime() + 10 * 1000);
	document.cookie = cookieName + '=' + escape(cookieValue)
	+ ';expires=' + expire.toGMTString();
}

function mxmadgetCookie(name) {
	var dc = document.cookie;
	var prefix = name + '=';
	var begin = dc.indexOf('; ' + prefix);

	if (begin == -1) {
		begin = dc.indexOf(prefix);
		if (begin != 0) return null;
	} else
		begin += 2;

	var end = document.cookie.indexOf(';', begin);
	if (end == -1)
		end = dc.length;

	return unescape(dc.substring(begin + prefix.length, end));
}

lastmxmad3002 = mxmadgetCookie('mxmad3002');

var i = Math.floor(Math.random()*(ad3002Poll.length));

if (lastmxmad3002 == ad3002Poll[i] && ad3002PollUnique == 0) {
	while (lastmxmad3002 == ad3002Poll[i]) {
		var i = Math.floor(Math.random() * (ad3002Poll.length));
	}
}

mxmadsetCookie('mxmad3002', ad3002Poll[i]);

if (ad3002File[ad3002Poll[i]]) 
{
var ad3002ID      = ad3002ID[ad3002Poll[i]];
var ad3002WSID    = ad3002WSID[ad3002Poll[i]];
var ad3002File    = ad3002File[ad3002Poll[i]];
var ad3002Type    = ad3002Type[ad3002Poll[i]];
var ad3002W       = ad3002W[ad3002Poll[i]];
var ad3002H       = ad3002H[ad3002Poll[i]];
var ad3002URL     = ad3002URL[ad3002Poll[i]];
var ad3002BGColor = ad3002BGColor[ad3002Poll[i]];

ad3002File = ad3002File + '?clickTAG=' + escape('http://www.mxmtrack.com/click.php?id=' + ad3002ID + '&ws_id=' + ad3002WSID + '&url=' + ad3002URL);

document.write('<div style="position:absolute;visibility:hidden"><img src="http://www.mxmtrack.com/impression.php?id=' + ad3002ID + '&ws_id=' + ad3002WSID + '&url=http://www.mxmtrack.com/blank.gif"></div>');

ad3002URL = 'http://www.mxmtrack.com/click.php?id=' + ad3002ID + '&ws_id=' + ad3002WSID + '&url=' + escape(ad3002URL);

var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

function nk3002_DoFSCommand(command, args) 
{
	var nk3002Obj = InternetExplorer ? nk3002 : document.nk3002;
	if (command == 'click')
		window.open(ad3002URL);
}

if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) 
{
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Sub nk3002_FSCommand(ByVal command, ByVal args)\n');
	document.write(' call nk3002_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}

if (ad3002Type == 'js')
{
	document.write('<scr' + 'ipt src="' + ad3002File + '"></scr' + 'ipt>');
}

if (ad3002Type == 'swfdiv')
{
	document.write('<div style="position:absolute;visibility:visible;z-index:2;">');
	document.write('<a href="' + ad3002URL + '" target="_blank"><img src="http://mxmtrack.com/blank.gif" width="' + ad3002W + '" height="' + ad3002H + '" border="0"></a>');
	document.write('</div>');
}

if (ad3002BGColor)
	var BGColor = ' bgcolor="' + ad3002BGColor + '" ';

if (ad3002Type != 'js')
	document.write('<div id="nk3002" style="position:absolute;visibility:visible;z-index:1;">')

if (ad3002Type == 'swf' || ad3002Type == 'swfdiv')
{
	document.write('<object id="nk3002" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ' + BGColor + ' width="' + ad3002W + '" height="' + ad3002H + '">');
	document.write('<param name="movie" value="' + ad3002File + '" />');
	document.write('<param name="quality" value="high" />');
	if (ad3002BGColor) 
		document.write('<param name="bgcolor" value="' + ad3002BGColor + '" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<embed wmode="transparent" id="nk3002" name="nk3002" src="' + ad3002File + '" quality="high" ' + BGColor + ' width="' + ad3002W + '" height="' + ad3002H + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" swLiveConnect="true"/>');
	document.write('</object>');
}
else if (ad3002Type == 'img')
{
	document.write('<a href="' + ad3002URL + '" target="_blank"><img border="0" src="' + ad3002File + '" width="' + ad3002W + '" height="' + ad3002H + '"></a>');
}

if (ad3002Type != 'js')
{
	document.write('</div>');
	document.write('<table ' + BGColor + ' cellpadding="0" cellspacing="0" width="' + ad3002W + '" height="' + ad3002H + '"><tr><td></td></tr></table>');
}
}

}