


// Anfang CSS-Weiche + 3 Schriftgroessen


function chooseStyle (newstyle) {
	var expdate = new Date();
    expdate.setTime(expdate.getTime() + (1000*3600*24*365));
    document.cookie = 'style=' + newstyle + '; expires=' + expdate.toGMTString() + '; path=/';
	document.location = document.location
	}

var platte = navigator.userAgent.toLowerCase();
var brauser = navigator.appName.toLowerCase();


if (location.host == "www.asipa.ch") {
	var x= "http://www.asipa.ch";
	}
else {
	var x = "";
	}
if (platte.indexOf("mac") != -1 ) {
	x = x +  "/css/asipa_mac";
	}
else {

	x = x + "/css/asipa";
	if (brauser.indexOf("netscape") != -1) {
		x = x + "_ns";
		}
	else {
		x = x + "_ie";
		}
	}

 if (document.cookie.indexOf('style=S')>=0) {
 	document.write('<link rel="stylesheet" type="text/css" href="' + x + '_S.css">\n');
	}
else if (document.cookie.indexOf('style=L')>=0) {
	document.write('<link rel="stylesheet" type="text/css" href="' + x + '_L.css">\n');
	}
else if (document.cookie.indexOf('style=M')>=0 || !document.cookie){
	document.write('<link rel="stylesheet" type="text/css" href="' + x + '_M.css">\n');
	}



// Zufalls-Banner Schuelerduden

function weiterempfehlen(url) {
    var win = null;
    win = window.open("/allgemein/weiterempfehlen.php?url="+url,"weiterempfehlen", "width=460,height=500,top=100,left=100,screenx=100,screeny=100,toolbars=no,menubar=no,scrollbars=no,history=no,status=no,resize=no")
    if(win.window.focus){win.window.focus();}
}

// Anti-Spam
function diAntiSpam(addy,subj) {
    if (addy != "") {
        document.write ('<a href="mailto:' + addy + '@' + 'duden' + '.de');
        if (subj != "") {
            document.write ('?subject=' + subj);
        }
        document.write ('">' + addy + '@' + 'duden' + '.de</a>\n');
    }
}


