// www.jjam.de - Alertbox mit JavaScript - Version 20.12.2002

//Nur für IE 5+, NN6+ und Opera 5+
ie5=(document.getElementById && document.all && document.styleSheets)?1:0;
nn6=(document.getElementById && !document.all)?1:0;
op5=(document.getElementById&&document.all&&!document.styleSheets)?1:0;

// Alertbox erstellen
if(ie5||nn6||op5) {
	//if(ie5) cp=5,cs=2,th=30,bh=50;
	//else if(nn6) cp=2,cs=0,th=22,bh=35;
	//else cp=0,cs=1,th=15,bh=20; //wg. Layout
	if(ie5) cp=5,cs=2,th=20,bh=22;
	else if(nn6) cp=2,cs=0,th=22,bh=35;
	else cp=0,cs=1,th=15,bh=20; //wg. Layout

	document.write(
		"<div style='position:absolute;top:-500;left:0;z-index:100' id='alertWA'>"+
		"<table style='border-style:outset;border-width:2;border-color:#E6E6CD;background-color:#F5F5DC' cellpadding='"+cp+"' cellspacing='"+cs+"' width='"+alertWidth+"' height='"+alertHeight+"' onmousedown='getxyRelativ()' onmousemove='moveAlert()' onmouseup='moveStatus=0'>"+
			"<tr><td height='"+th+"' bgcolor='#DEDEC5'><b>Werbeaktionen</b></td></tr>"+
			"<tr><td>Zielgruppenspezifische Werbung für Ihre Homepage in Ihrer Region!</td></tr>"+
			"<tr><td>Machen Sie mit unserer Hilfe gezielt Werbung in Ihrer Region für Ihre Angebote und Dienstleistungen.!</td></tr>"+
			"<tr align='right'><td height='"+bh+"'>"+
				"<input style='background-color:#E9E9CF;border-width:1;font-family:arial,verdana;font-size:80%' type='button' value='schliessen' onclick='okAlertWA()' onfocus='if(this.blur)this.blur()'>"+
			"</td></tr>"+
		"</table>"+
		"</div>" +
		"<div style='position:absolute;top:-500;left:0;z-index:100' id='alertRE'>"+
		"<table style='border-style:outset;border-width:2;border-color:#E6E6CD;background-color:#F5F5DC' cellpadding='"+cp+"' cellspacing='"+cs+"' width='"+alertWidth+"' height='"+alertHeight+"' onmousedown='getxyRelativ()' onmousemove='moveAlert()' onmouseup='moveStatus=0'>"+
			"<tr><td height='"+th+"' bgcolor='#DEDEC5'><b>Realisierung</b></td></tr>"+
			"<tr><td>wir realisieren ihren Web-Auftritt nach ihren Wünschen</td></tr>"+
			"<tr><td>unsere Erfahrung garantiert einen Web-Auftritt state of the art</td></tr>"+
			"<tr align='right'><td height='"+bh+"'>"+
				"<input style='background-color:#E9E9CF;border-width:1;font-family:arial,verdana;font-size:80%' type='button' value='schliessen' onclick='okAlertRE()' onfocus='if(this.blur)this.blur()'>"+
			"</td></tr>"+
		"</table>"+
		"</div>" +
		"<div style='position:absolute;top:-500;left:0;z-index:100' id='alertKO'>"+
		"<table style='border-style:outset;border-width:2;border-color:#E6E6CD;background-color:#F5F5DC' cellpadding='"+cp+"' cellspacing='"+cs+"' width='"+alertWidth+"' height='"+alertHeight+"' onmousedown='getxyRelativ()' onmousemove='moveAlert()' onmouseup='moveStatus=0'>"+
			"<tr><td height='"+th+"' bgcolor='#DEDEC5'><b>Konzepterstellung</b></td></tr>"+
			"<tr><td>ihre Angebote, Leistungen und Ziele ergeben zusammen mit unserer Erfahrung ein schlagkräftiges Konzept für ihren Web-Auftritt</td></tr>"+
			"<tr align='right'><td height='"+bh+"'>"+
				"<input style='background-color:#E9E9CF;border-width:1;font-family:arial,verdana;font-size:80%' type='button' value='schliessen' onclick='okAlertKO()' onfocus='if(this.blur)this.blur()'>"+
			"</td></tr>"+
		"</table>"+
		"</div>" +
		"<div style='position:absolute;top:-500;left:0;z-index:100' id='alertBE'>"+
		"<table style='border-style:outset;border-width:2;border-color:#E6E6CD;background-color:#F5F5DC' cellpadding='"+cp+"' cellspacing='"+cs+"' width='"+alertWidth+"' height='"+alertHeight+"' onmousedown='getxyRelativ()' onmousemove='moveAlert()' onmouseup='moveStatus=0'>"+
			"<tr><td height='"+th+"' bgcolor='#DEDEC5'><b>Beratung und Unterstützung</b></td></tr>"+
			"<tr><td>Hosting, Domains, Flatrates, HTML, XML, URls, Links,  was braucht man wirklich davon ?</td></tr>"+
			"<tr><td>wir beraten und unterstützen sie, so dass ein für sie passendes Paket entsteht.</td></tr>"+
			"<tr align='right'><td height='"+bh+"'>"+
				"<input style='background-color:#E9E9CF;border-width:1;font-family:arial,verdana;font-size:80%' type='button' value='schliessen' onclick='okAlertBE()' onfocus='if(this.blur)this.blur()'>"+
			"</td></tr>"+
		"</table>"+
		"</div>" +
		"<div style='position:absolute;top:-500;left:0;z-index:100' id='alertHO'>"+
		"<table style='border-style:outset;border-width:2;border-color:#E6E6CD;background-color:#F5F5DC' cellpadding='"+cp+"' cellspacing='"+cs+"' width='"+alertWidth+"' height='"+alertHeight+"' onmousedown='getxyRelativ()' onmousemove='moveAlert()' onmouseup='moveStatus=0'>"+
			"<tr><td height='"+th+"' bgcolor='#DEDEC5'><b>Web-Hosting</b></td></tr>"+
			"<tr><td>wir organisieren ihre Domaine</td></tr>"+
			"<tr><td>wir richten ihren WebSpace ein</td></tr>"+
			"<tr><td>wir organisieren ihre Email-Postfächer</td></tr>"+
			"<tr><td>wir aktualisieren und pflegen</td></tr>"+
			"<tr><td>wir unterstützen sie in allen Fragen zu ihrem Web-Auftritt</td></tr>"+
			"<tr align='right'><td height='"+bh+"'>"+
				"<input style='background-color:#E9E9CF;border-width:1;font-family:arial,verdana;font-size:80%' type='button' value='schliessen' onclick='okAlertHO()' onfocus='if(this.blur)this.blur()'>"+
			"</td></tr>"+
		"</table>"+
		"</div>"



	);

}

// Box anzeigen
function showAlert(alName) {
	moveStatus=0;
	xAlert=xAlertStart, yAlert=yAlertStart;
	if(ie5) {
		document.getElementById(alName).style.left=xAlert+document.body.scrollLeft;
		document.getElementById(alName).style.top=yAlert+document.body.scrollTop;
		document.getElementById(alName).style.visibility="visible";
		//alert(alName);
	}
	else if(nn6||op5) {
		document.getElementById(alName).style.left=xAlert+window.pageXOffset;
		document.getElementById(alName).style.top=yAlert+window.pageYOffset;
		document.getElementById(alName).style.visibility="visible";
	}
	else alertAlternative();
}

// Relative Mausposition ermitteln
var xRelativ, yRelativ;
function getxyRelativ() {
	//moveStatus=1;
	moveStatus=0;
	if(ie5) {
		//xRelativ=event.clientX-xAlert;
		//yRelativ=event.clientY-yAlert;
		xRelativ=xAlert;
		yRelativ=yAlert;
	}
}

// Verschieben nur für IE
function moveAlert() {
	if(ie5&&moveStatus>0) {
		//xAlert=document.getElementById("alert").style.left=event.clientX+document.body.scrollLeft-xRelativ;
		//yAlert=document.getElementById("alert").style.top=event.clientY+document.body.scrollTop-yRelativ;
		xAlert=document.getElementById("alert").style.left=document.body.scrollLeft-xRelativ;
		yAlert=document.getElementById("alert").style.top=document.body.scrollTop-yRelativ;
	}
}
