
	function updateAdPosition() {
		try {
			var  ad = window.document.getElementById('praatpaal');
			var  position = 'BR';
			var  top = 0;
			var  left = 0;
			var  set_width = 0;
			var  set_height = 0;
			
			var  is_CSS1 = ( document.compatMode == 'CSS1Compat' );
			var  is_IE = ( navigator.appName == 'Microsoft Internet Explorer' );
			var  is_FF = ( navigator.userAgent.indexOf( 'Firefox/') > -1 );
	
			if(typeof( window.innerWidth ) == 'number') { 
				set_width = window.innerWidth;
				set_height = window.innerHeight;
			}
			else if(is_CSS1) { 
				set_width = document.documentElement.clientWidth; 
				set_height = document.documentElement.clientHeight; 
			}
			else {
				set_width = document.body.clientWidth; 
				set_height = document.body.clientHeight; 
			}
	
			if(is_CSS1) { 
				cur_width = document.documentElement.scrollWidth; 
				cur_height = document.documentElement.scrollHeight; 
			}
			else { 
				cur_width = document.body.scrollWidth; 
				cur_height = document.body.scrollHeight; 
			}
	
			if(!is_IE) {
				if((set_width - cur_width) < 0) set_height -= 17;
				if((set_height - cur_height) < 0) set_width  -= 17;
			}
	
			if(is_CSS1 && (is_IE || is_FF)) {
				if(position == 'TR' || position == 'TC' || position == 'TL' )
					top = document.documentElement.scrollTop;
				else if(position == 'MR' || position == 'MC' || position == 'ML')
					top  = document.documentElement.scrollTop + (set_height / 2) - (ad.offsetHeight / 2);
				else
					top  = document.documentElement.scrollTop + set_height - ad.offsetHeight;
				if(position == 'BL' || position == 'ML' || position == 'TL' )
					left = document.documentElement.scrollLeft;
				else if(position == 'BC' || position == 'MC' || position == 'TC')
					left = document.documentElement.scrollLeft + (set_width  / 2) - (ad.offsetWidth  / 2);
				else
					left = document.documentElement.scrollLeft + set_width - ad.offsetWidth;
			} 
			else {
				if(position == 'TR' || position == 'TC' || position == 'TL') 
					top  = document.body.scrollTop ;
				else if(position == 'MR' || position == 'MC' || position == 'ML') 
					top  = document.body.scrollTop + (set_height / 2) - (ad.offsetHeight / 2);
				else 
					top  = document.body.scrollTop + set_height - ad.offsetHeight;
				
				if(position == 'BL' || position == 'ML' || position == 'TL')
					left = document.body.scrollLeft;
				else if(position == 'BC' || position == 'MC' || position == 'TC')
					left = document.body.scrollLeft + (set_width  / 2) - (ad.offsetWidth  / 2);
				else
					left = document.body.scrollLeft + set_width - ad.offsetWidth;
			}
	
			ad.style.top  = top  + "px";
			ad.style.left = left + "px";
		} catch( e ){}
	}
	
	function initAd() {
		var ad = window.document.getElementById('adDiv745857726');
	
		 if(ad) {
			ad.style.width  = '400px';
			ad.style.height = '308px';
		 }
	
		updateAdPosition(); 
		my_timeout_id = setTimeout( function() { updateAdPosition(); }, 750 );
	}
	
	function addEvent(obj, type, fn) {
		 if(obj.addEventListener) {
			  obj.addEventListener( type, fn, false );
		 } else if(obj.attachEvent) {
			  obj[ "e"+type+fn ] = fn;
			  obj[ type+fn ] = function() { obj[ "e"+type+fn ]( window.event ); }
			  obj.attachEvent( "on"+type, obj[ type+fn ]);
		 } else {
			  obj[ "on"+type ] = obj[ "e"+type+fn ];
		 }
	}
	
	function removeAd() {
		var  ad = window.document.getElementById('praatpaal');
		ad.style.display = "none";
	}
	
	addEvent( window, "scroll", updateAdPosition );
	addEvent( window, "resize", updateAdPosition );
	
	document.write( "<div id='praatpaal' style='position:absolute; z-index:1000001; top:0px; right:0px; width: 400px; height: 308px;'>" );
	var adName = "http://promotools.islive.nl/praatpaal/player/400x308/player.swf?video=http%3A%2F%2Fpromotools.islive.nl%2Fpraatpaal%2Fflv%2Fvrouw%2Fkinkybabex_2&landing=http%3A%2F%2Fwww.sexcaminjouwstad.nl";
	document.write( "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='400' height='308' id='ad'>" );
	document.write( "<param name='allowScriptAccess' value='always' />" );
	document.write( "<param name='movie' value='" + adName + "' />" );
	document.write( "<param name='quality' value='high' />" );
	document.write( "<param name='wmode' value='transparent' />" );
	document.write( "<param name='LOOP' value='false' />" );
	document.write( "<param name='bgcolor' value='#000000' />" );
	document.write( "<embed src='" + adName + "' quality='high' wmode='transparent' bgcolor='#666666' width='400' height='308' name='ad' align='bottom' allowscriptaccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />" );
	document.write( "</object>" );
	document.write( "</div>" );
	
	initAd();
