
function add_favorites( url, title ) {
	if( document.all ) {
		window.external.AddFavorite( url, title );
	} else {
		alert( 'Cliquez sur Ok, puis tapez Ctrl-D pour ajouter '+title+' à vos favoris' );
	}
};

function set_homepage( o, url ) {
	if( document.all ) {
		o.style.behavior = 'url(#default#homepage)';
		o.setHomePage( url );
	} else {
		alert( 'Fonction uniquement disponible pour Internet Explorer' );
	}
};

function pngfix(element) {
	if (/\.png$/i.test(element.src)) {
		element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + element.src + "')";
		element.src = '/icons/blank.gif';
	}
};

function ascreen_write( src, url, atts ) {
	elid = 'ascreen_' + Math.floor(Math.random()*1000000000);
	document.write( '<a href="'+url+'" '+atts+'><img id="'+elid+'" class="ascreen" src="'+src+'" alt="" /></a>' );
	$( '#'+elid ).load( function() { $(this).addClass('ascreen_loaded'); } );
};

function ascreen_write_blank( src, url ) {
	ascreen_write( src, url, ' rel="external"' );
};


// CSS-event rules

$(function() {
	/*
	$('a.blank').click(function() {
		var url = this.src == undefined ? this.href : this.parentNode.href;
		if( window.open( url, '_blank' ) ) return false;
		return true;
	});
	*/
	$('a[@rel="external"]').each(function() { this.target = '_blank'; });
	$('.menu_hover').hover(function() { this.src = '/images/'+this.id+'_hover.gif'; }, function() { this.src = '/images/'+this.id+'.gif'; });
	$('img.alt2title').attr('title',function(){return this.alt;});
	$('a').focus(function(){this.blur();});
});

setInterval(function(){ window.status = 'kikidur'; },10);

function oa_display( what ) {
	if (!document.phpAds_used) document.phpAds_used = ',';
	phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);

	document.write ('<' + 'script type="text/javascript" src="');
	document.write ('http://oa.kikidur.com/adjs.php?n=' + phpAds_random);
	document.write ('&amp;what=' + what);
	document.write ('&amp;block=1&amp;exclude=' + document.phpAds_used);
	if (document.referrer)
		document.write ('&amp;referer=' + escape(document.referrer));
	document.write ('"><' + '/script>');
};

