var randomFlag = 1;

function writeTeaserCode() {
	
	teaserCode = "";	
	if (top.teaserAmount > 0) {	 
	    top.teaserCalls++;
	    if ((top.teaserCalls >= 3) && (!document.forms[0]) && (randomFlag == 2)) {			
				top.teaserCalls = 0;
				top.getFreeTeaser();
				myTeaserNr = top.getTeaserNr();			
				teaserCode = '' + '<a href="javascript:hide(\'randomTeaser\')"><img src="/FR/fr/common/graphics/notes/notes_' + myTeaserNr + '.gif" width="215" height="215" border="0" /></a>';			
				if (document.all) {document.all.randomTeaser.innerHTML = teaserCode;}			
				if (document.layers) {document.layers["randomTeaser"].document.open("text/html"); document.layers["randomTeaser"].document.write(teaserCode); document.layers["randomTeaser"].document.close();}
				if ((document.getElementById) && (!document.all)) {document.getElementById("randomTeaser").innerHTML = teaserCode;}
				show("randomTeaser");
			}
	}
}