﻿var phpAds_campain_big;
var phpAds_campain_sky;
function Slide(id){
	Effect.toggle(id,"appear");
	var oewa = new Image();
	var oewaext = new Image();
	var rand = Math.floor(Math.random() * 100000);
	oewa.src = "http://stats.boerse-express.com/cgi-bin/ivw/CP/RedCont/BElogs/stats/" + rand;
	oewaext.src = "http://wiblatt.oewabox.at/cgi-bin/ivw/CP/RedCont/BElogs/stats/" + rand + '/be24.at/';
}
function Toggle(id){
	Element.toggle(id);
	if('bttn_' + $(id)){
		Element.toggle('bttn_' + id);
	}
}

function beloggerabo(email,user){
	new Ajax.Request('/ajax/abo', {postBody:'email='+email+';userid='+user, onSuccess: function(t){
		var response = eval(t.responseText);
		if (response[0] == 1){
			var gespeichert = document.createElement('div');
			gespeichert.appendChild(document.createTextNode('Sie erhalten eine Mail, um Ihre Anmeldung zu bestätigen.'));
			gespeichert.style.color = "green";
			gespeichert.style.fontSize = "10px";
			$('beloggerabo').parentNode.replaceChild(gespeichert, $('beloggerabo'));
		} else {
			alert(response[1]);
		}

	} } );
}
function beloggersettings(email){
	new Ajax.Request('/ajax/settings', { postBody: 'email=' + email, onSuccess: function(t){
		var response = eval(t.responseText);
		if (response[0] == 1){
			var gespeichert = document.createElement('div');
			gespeichert.style.padding = '1em';
			gespeichert.appendChild(document.createTextNode(response[1]));
			gespeichert.style.color = "green";
			gespeichert.style.fontSize = "10px";
			$('beloggersettings').parentNode.parentNode.replaceChild(gespeichert, $('beloggersettings').parentNode);
		} else {
			alert(response[1]);
		}

	} } );
}

function Login(){
	var container = document.createElement('div');
	container.style.position = 'absolute';
	container.style.top = '0';
	container.style.bottom = '0';
	container.style.left = '0';
	container.style.right = '0';
	container.style.backgroundImage = 'url(/css/trans.png)';
	
	container.appendChild(document.createTextNode('Hallo Hallo'));

	var body = document.getElementById('body');
	body.appendChild(container);
}
function checkForm(form){
	if (!form.text.value){
		form.text.style.backgroundColor = "#ffc8c8";
		alert('Bitte fuellen Sie die rot gekennzeichneten Felder aus.');
		return false;
	}
}

function popUpWindow(URL, Name, width, height, resizable, scrollbars)
{
    popUp = window.open (URL, Name, 'toolbar=0,location=no,directories=0,status=0,menubar=0,resizable='+ resizable +',scrollbars='+ scrollbars +',width='+ width +',height='+ height);
}
