/**********************************/
/*       BANNER - INFOBOX         */
/**********************************/
function moveBannerButton() {
	Effect.Pulsate('bannerAdButton', { pulses: 1, duration: 1, from: 0.35});
}

function addBannerDiv() {
	$('bannerAdDiv').setStyle({display: 'block'});
	new Effect.Fade('bannerAdDiv', { duration: 1, from: 0, to: 1});
	new Effect.Move('bannerAdDiv', { x: 0, y: 4, mode: 'absolute' });
}


function closeBannerDiv() {
	new Effect.Move('bannerAdDiv', { x: -800, y: 4, mode: 'absolute'});
	new Effect.Fade('bannerAdDiv', { duration: 1, from: 1, to: 0, queue: 'end'});
}

function get_url_param(name) {
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");

	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp( regexS );
	var results = regex.exec( window.location.href );

	if ( results == null ) return "";
	else return results[1];

}


/**********************************/
/*     Newsletter - INFOBOX       */
/**********************************/
function addNewsletterDiv() {
	$('newsletterAdDiv').setStyle({display: 'block'});
	new Effect.Move('newsletterAdDiv', { x: 0, y: 150, mode: 'absolute'});
	//new Effect.Move('mailbuttons', { x: 390, y: 149, mode: 'absolute'});


}

function closeNewsletterDiv() {
	//new Effect.Move('mailbuttons', { x: 0, y: 149, mode: 'absolute' });
	new Effect.Move('newsletterAdDiv', { x: -800, y: 150, mode: 'absolute'});
	
	
}





Event.observe(window, 'load', function(){
	$('bannerAdButton').setStyle({display: 'block'});
	new Effect.Fade('bannerAdButton', { duration: 2, from: 0, to: 1});
	if(get_url_param('send') > 0) addBannerDiv();
	if(get_url_param('resend') > 0) addBannerDiv();
	
	if(get_url_param('sendnews') > 0) addNewsletterDiv();
});









