function agb() {
    agb_win = window.open('/popup/agb.html','agb_win','width=688,height=800,menubar=no,locationbar=no,screenX=50,screenY=50,scrollbars=yes,resizable=no');
	agb_win.focus();
}

function adv() {
    adv_win = window.open('/popup/adv.html','adv_win','width=688,height=800,menubar=no,locationbar=no,screenX=50,screenY=50,scrollbars=yes,resizable=no');
	adv_win.focus();
}

function handbuch() {
    handbuch_win = window.open('http://www.adressdialog.de/go/handbuch.html','handbuch_win','width=820,height=800,menubar=no,locationbar=no,screenX=50,screenY=50,scrollbars=yes,resizable=no');
	handbuch_win.focus();
}

function webmaster() {
    webmaster_win = window.open('http://webmaster.addressdialog.com/','webmaster_win','width=668,height=740,menubar=no,locationbar=no,screenX=50,screenY=50,scrollbars=yes,resizable=yes');
	webmaster_win.focus();
}

function flashdemo() {
    flashdemo_win = window.open('/flashdemo/','flashdemo_win','width=588,height=540,menubar=no,locationbar=no,screenX=50,screenY=50,scrollbars=no,resizable=no');
	flashdemo_win.focus();
}

function aktion() {
    aktion_win = window.open('http://webmaster.addressdialog.com/go/B29625EE0F/','aktion_win','width=756,height=740,menubar=no,locationbar=no,screenX=50,screenY=50,scrollbars=yes,resizable=no');
	aktion_win.focus();
}

function stoerer() {
    stoerer_win = window.open('/go/mailing_tage-start.html','stoerer_win','width=525,height=600,menubar=no,locationbar=no,screenX=50,screenY=50,scrollbars=yes,resizable=no');
	stoerer_win.focus();
}

function eifel() {
    eifel_win = window.open('/data/erfolgsbeispiele/eifel/1.html','eifelde','width=800,height=740,menubar=no,locationbar=no,screenX=50,screenY=50,scrollbars=yes,resizable=no');
	eifel_win.focus();
}

function unicef(code) {
	path = 'http://go.addressdialog.com/8F93DCC42F/' + code;
    unicef_win = window.open(path,'unicef','width=800,height=740,menubar=no,locationbar=no,screenX=50,screenY=50,scrollbars=yes,resizable=no');
	unicef_win.focus();
}

function juher(code) {
	path = 'http://go.addressdialog.com/EAD9D5E603/' + code;
    juher_win = window.open(path,'juher','width=800,height=740,menubar=no,locationbar=no,screenX=50,screenY=50,scrollbars=yes,resizable=no');
	juher_win.focus();
}

function dpag() {
    dpag_win = window.open('/data/erfolgsbeispiele/dpag/popup.html','dpag','width=500,height=694,menubar=no,locationbar=no,screenX=50,screenY=50,scrollbars=yes,resizable=no');
	dpag_win.focus();
}

function jugend() {
    dpag_win = window.open('/data/erfolgsbeispiele/jugend/popup.html','jugend','width=640,height=750,menubar=no,locationbar=no,screenX=50,screenY=50,scrollbars=yes,resizable=no');
	dpag_win.focus();
}

function registrieren() {
    login_win = window.open('https://backend.adressdialog.de/adressdialog/VersenderRegistrierung.do','login_win','width=688,height=669,menubar=no,locationbar=no,screenX=50,screenY=50,scrollbars=yes,resizable=yes');
	login_win.focus();
}

function openLogin() {
    login_win = window.open('/popup/opener.html','login_win','width=788,height=669,menubar=no,locationbar=no,screenX=50,screenY=50,scrollbars=yes,resizable=yes');
	login_win.focus();
}

function beispiel(project,examplecode) {
	
	if(project == 'gewinnspiel')
	{
		path = 'http://go.addressdialog.com/805BAC73FD/'+examplecode;
	}
	else
	{
		path = 'http://go.addressdialog.com/5D4003A1DC/'+examplecode;
	}
	
    beispiel_win = window.open(path,'beispiel_win','width=716,height=800,menubar=no,locationbar=no,screenX=50,screenY=50,scrollbars=yes,resizable=no');
	beispiel_win.focus();
}

function popupIntegration(examplecode)
{
    beispiel_win = window.open('http://go.addressdialog.com/E86FF9D606/'+examplecode,'beispiel_win','width=716,height=700,menubar=no,locationbar=no,screenX=50,screenY=50,scrollbars=yes,resizable=no');
	beispiel_win.focus();
}

function analysis(id)
{
	bwidth = screen.availWidth;
	bheight = screen.availHeight;	

	if(id == 1)
	{
		path = 'http://leads.addressdialog.com/q9DkJA3X94D7Lt2BNis+Mv+w1FLCGymFjjnsjVazdoVx6xr0qZDG8cFpj6oje8POaDSS7MPmPLNEknneU0CLFxNu80eDJFuAyou67jQMaoVBArQqPl6UaQ==';
	}
	else
	{
		path = 'http://leads.addressdialog.com/6sw2yL+72iML1LLAe0lkB5W3MVbRnBSygR5TiEJHqT3Uw/1UffX+nBpatQTDyK7faZ7cva+jzPI6sumB4Gu1/KTdRAs6g+hU';
	}

	pwidth = Math.round(bwidth * 0.8);
	pheight = Math.round(bheight * 0.8);	

    analysis_win = window.open(path,'analysis_win','width='+pwidth+',height='+pheight+',menubar=no,locationbar=no,screenX=0,screenY=0,scrollbars=yes,resizable=yes');

	analysis_win.focus();	
}

function toggleQuestion(id) {
	box = document.getElementById("faq_answer_"+id);
	
	if(box.className == "faq_answer_invisible")
	{
    	box.className = "faq_answer";
    }
    else
    {
    	box.className = "faq_answer_invisible";
    }
}

function switchTo(page)
{
	window.location.href = page;
}

function hideQuestion(id) {
	box = document.getElementById("faq_answer_"+id);
	box.className = "faq_answer_invisible";
}

function buttonOver(id) {
	sbutton = document.getElementById(id);
	sbutton.className = "form_button_over";
}

function buttonOut(id) {
	sbutton = document.getElementById(id);
	sbutton.className = "form_button_out";
}

function noemailspam(adrs,dmain,nme,extra) {      	
    // Function made by TheHPage DOT com
    
    // ### MAKE VARS ###
    var first = 'ma';
    var second = 'il';
    var third = 'to:';
    
    // ### MAILTO-PART ###
    ausgabe = '<a href="';
    ausgabe = ausgabe+first+second+third;
    ausgabe = ausgabe+adrs+'&#64'+dmain;
    ausgabe = ausgabe+'"';
    
    // Check: Insert style? PART 1
    if(extra != ''){
        ausgabe = ausgabe+' style="color: '+extra+'"';    
        ausgabe = ausgabe+'>';
    }
    
    else {
    	
    	ausgabe = ausgabe+'>';
    	
    }
    
    // ### Check: Show E-Mail or Name? ###
    if(nme != ''){
        ausgabe = ausgabe+nme;
    } else {
        ausgabe = ausgabe+adrs+'&#64'+dmain;
    }    
    
    
    // ### FINISH IT ###    
    ausgabe = ausgabe+'<\/a>';
    document.write(ausgabe);
}  

function $id(id) {
    return document.getElementById(id);
}

function createCloseButton()
{
	var output  = '<div id="pos_close">';
		output += '<a href="javascript:self.close()" title="Aktuelles Fenster schlie&szlig;en"><img src="/images/button_close.gif" width="84" height="15" alt="Button: Seite schlie&szlig;en" /></a>';
		output += '</div>';
		
	document.write(output);
}

function createLoginForm(headline,label_user,label_password,label_submit)
{
	var output  = '<div id="pos_login">';
		output += '<div id="login">';
		output += '<h1>';
		output += headline;
		output += '</h1>';
		output += '<form name="form_login" id="form_login" action="javascript:openLogin();">';
		output += '<div class="login_row">';
		output += '<label for="form_login_name">';
		output += label_user;
		output += ':</label>';
		output += '<input type="text" name="name" id="form_login_name" />';
		output += '</div>';
		output += '<div class="login_row">';
		output += '<label for="form_login_password">';
		output += label_password;
		output += ':</label>';
		output += '<input type="password" name="password" id="form_login_password" />';
		output += '</div>';
		output += '<div class="login_submit">';
		output += '<input type="submit" name="submit" id="form_login_submit" value="';
		output += label_submit;
		output += '" title="';
		output += label_submit;
		output += '" />';
		output += '</div>';
		output += '</form>';
		output += '</div>';
		output += '<div class="clearboth"><img src="/images/blank.gif" width="0" height="0" alt="" /></div>';
		output += '</div>';
		
	document.write(output);
}