apnpageNum = Math.round(Math.random() * 100000000);

function show_ad_tag(apnadserver,site,classification_type,classification,page_type,ad_size,keyword,pos){
	
	// Cache-busting and pageid values
	apnrandom = Math.round(Math.random() * 100000000);
	
	//if (!apnpageNum) var apnpageNum = Math.round(Math.random() * 100000000);

	apntarget = "/SITE=" + site + "/AREA=" + classification_type + "." + classification + "." + page_type + "/AAMSZ=" + ad_size
	
	if (keyword.length) apntarget = apntarget + "/KEYWORD=" + keyword;
	
	if (pos.length) apntarget = apntarget + "/POS=" + pos;
	
	if ( (classification_type.length > 0) && (classification.length > 0) )
		{
			document.write('<SCR');
			document.write('IPT SRC="' + apnadserver + '/jserver' + apntarget + '/acc_random=' + apnrandom +  "/pageid=" + apnpageNum + '">');
			document.write('</SCR');
			document.write('IPT>');
		}

}