function editor(divclassIE, height, width, content, css){
	var objIE = "document";
	var objMoz = "document.getElementById('myeditor').contentWindow.document";
	
	var focusMoz = "document.getElementById('myeditor').contentWindow.focus()";
	
	var BoldIE = objIE+".execCommand('Bold', false, null)";
	var BoldMoz =objMoz+".execCommand('Bold',false, null);"+focusMoz;
	var ItalicIE = objIE+".execCommand('Italic', false, null)";
	var ItalicMoz =objMoz+".execCommand('Italic',false, null);"+focusMoz;
	var UlineIE = objIE+".execCommand('Underline', false, null)";
	var UlineMoz =objMoz+".execCommand('Underline',false, null);"+focusMoz;
	var h1IE = objIE+".execCommand('FormatBlock', false, '<H1>')";
	var h1Moz =objMoz+".execCommand('FormatBlock',false, '<H1>');"+focusMoz;
	var h2IE = objIE+".execCommand('FormatBlock', false, '<H2>')";
	var h2Moz =objMoz+".execCommand('FormatBlock',false, '<H2>');"+focusMoz;
	var pIE = objIE+".execCommand('FormatBlock', false, '<p>')";
	var pMoz =objMoz+".execCommand('FormatBlock',false, '<p>');"+focusMoz;
	var LeftIE = objIE+".execCommand('JustifyLeft', false, null)";
	var LeftMoz =objMoz+".execCommand('JustifyLeft',false, null);"+focusMoz;
	var CenterIE = objIE+".execCommand('JustifyCenter', false, null)";
	var CenterMoz =objMoz+".execCommand('JustifyCenter',false, null);"+focusMoz;
	var RightIE = objIE+".execCommand('JustifyRight', false, null)";
	var RightMoz =objMoz+".execCommand('JustifyRight',false, null);"+focusMoz;
	var OListIE = objIE+".execCommand('InsertOrderedList', false, null)";
	var OListMoz =objMoz+".execCommand('InsertOrderedList',false, null);"+focusMoz;
	var UListIE = objIE+".execCommand('InsertUnorderedList', false, null)";
	var UListMoz =objMoz+".execCommand('InsertUnorderedList',false, null);"+focusMoz;
	var LinkIE = objIE+".execCommand('CreateLink', true, null)";
	var LinkMoz =objMoz+".execCommand('CreateLink', false, prompt('URL?','http://'));"+focusMoz;
	var FontSizeIE = objIE+".execCommand('FontSize',false,this.options[this.selectedIndex].value)";
	var FontSizeMoz = objMoz+".execCommand('FontSize',false,this.options[this.selectedIndex].value);"+focusMoz;
	
	
	var editableIE = "<div id='myeditor' contentEditable style='padding:0px; height="+(height-40)+"; border-style:solid; border-width:1px;'>"+content+"</div>";
	var editableMoz = "<iframe id='myeditor' name='myeditor' height='"+height+"' width='"+width+"' scrolling = 'yes' frameborder='1'></iframe>";
	
	if(((document.all) && (window.offscreenBuffering))){
		document.write(editableIE);
		document.write("<div align='left' style=\"padding-top: 10px\">");
		document.write("<img src=\"images/button-bold.gif\" alt=\"Fett\" onClick=\""+BoldIE+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("<img src=\"images/button-italic.gif\" alt=\"Kursiv\" onClick=\""+ItalicIE+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("<img src=\"images/button-underline.gif\" alt=\"Unterstrichen\" onClick=\""+UlineIE+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("&nbsp;&nbsp;");
		document.write("<img src=\"images/button-h1.gif\" alt=\"&Uuml;berschrift 1\" onClick=\""+h1IE+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("<img src=\"images/button-h2.gif\" alt=\"&Uuml;berschrift 2\" onClick=\""+h2IE+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("<img src=\"images/button-p.gif\" alt=\"Normalformat\" onClick=\""+pIE+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("&nbsp;&nbsp;");
		document.write("<img src=\"images/button-left.gif\" alt=\"Linksbündig\" onClick=\""+LeftIE+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("<img src=\"images/button-center.gif\" alt=\"Zentriert\" onClick=\""+CenterIE+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("<img src=\"images/button-right.gif\" alt=\"Rechtsbündig\" onClick=\""+RightIE+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("&nbsp;&nbsp;");
		document.write("<img src=\"images/button-olist.gif\" alt=\"Nummerierte Liste\" onClick=\""+OListIE+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("<img src=\"images/button-ulist.gif\" alt=\"Unnummerierte Liste\" onClick=\""+UListIE+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("&nbsp;&nbsp;");
		document.write("<img src=\"images/button-link.gif\" alt=\"Link einfügen\" onClick=\""+LinkIE+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("&nbsp;&nbsp;");
		document.write("Schriftgröße: <select name=\"size\" onChange=\""+FontSizeIE+"\"><option value='1'>1</option><option value='2'>2</option><option value='3'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option></select>&nbsp;");
		document.write("</div>");
		
	}else{
		document.open();
		document.write(editableMoz);
		document.getElementById('myeditor').contentWindow.document.designMode='On';
		document.getElementById('myeditor').contentWindow.document.open();
		document.getElementById('myeditor').contentWindow.document.write("<html><link href='"+css+"' rel='stylesheet' type='text/css'><body>");
		document.getElementById('myeditor').contentWindow.document.write(content);
		document.getElementById('myeditor').contentWindow.document.write("</body></html>");
		document.getElementById('myeditor').contentWindow.document.close();
		document.write("<div align='left' style=\"padding-top: 10px\">");
		document.write("<img src=\"images/button-bold.gif\" alt=\"Fett\" onClick=\""+BoldMoz+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("<img src=\"images/button-italic.gif\" alt=\"Kursiv\" onClick=\""+ItalicMoz+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("<img src=\"images/button-underline.gif\" alt=\"Unterstrichen\" onClick=\""+UlineMoz+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("&nbsp;&nbsp;");
		document.write("<img src=\"images/button-h1.gif\" alt=\"&Uuml;berschrift 1\" onClick=\""+h1Moz+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("<img src=\"images/button-h2.gif\" alt=\"&Uuml;berschrift 2\" onClick=\""+h2Moz+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("<img src=\"images/button-p.gif\" alt=\"Normalformat\" onClick=\""+pMoz+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("&nbsp;&nbsp;");
		document.write("<img src=\"images/button-left.gif\" alt=\"Linksbündig\" onClick=\""+LeftMoz+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("<img src=\"images/button-center.gif\" alt=\"Zentriert\" onClick=\""+CenterMoz+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("<img src=\"images/button-right.gif\" alt=\"Rechtsbündig\" onClick=\""+RightMoz+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("&nbsp;&nbsp;");
		document.write("<img src=\"images/button-olist.gif\" alt=\"Nummerierte Liste\" onClick=\""+OListMoz+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("<img src=\"images/button-ulist.gif\" alt=\"Unnummerierte Liste\" onClick=\""+UListMoz+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("&nbsp;&nbsp;");
		document.write("<img src=\"images/button-link.gif\" alt=\"Link einfügen\" onClick=\""+LinkMoz+"\" style=\"cursor: pointer\">&nbsp;");
		document.write("&nbsp;&nbsp;");
		document.write("Schriftgröße: <select name=\"size\" onChange=\""+FontSizeMoz+"\"><option value='1'>1</option><option value='2'>2</option><option value='3'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option></select>&nbsp;");
		document.write("<br>");
		document.write("</div>");
		document.close();
	}
	
}

function getEditorHTML(){
	
	if(((document.all) && (window.offscreenBuffering)))
		var obj = document.getElementById('myeditor').innerHTML;
	else
		var obj = frames.myeditor.document.body.innerHTML;
	
	return obj;
}

function openPopUp(url, headline){
	var child = window.open('','Equipment','width=750,height=636,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	
	child.document.open();
	child.document.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
	child.document.write("<html>\n");
	child.document.write("<head><title>Equipment - "+headline+"</title>\n");
	child.document.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></head>\n");
	child.document.write("<body marginheight=\"1\" leftmargin=\"1\" rightmargin=\"1\" bottommargin=\"1\" marginwidth=\"1\" topmargin=\"1\" style=\"margin: 0px; padding:0px;\"><div style=\"margin: 0px; padding:0px;\"><img style=\"margin: 0px; padding:0px;\"src=\""+url+"\" alt=\""+headline+"\" width=\"750\" height=\"562\"></div>\n");
	
	child.document.write("<div width=\"100%\"style=\"border-style:solid; border-width:1px; border-color:#013467; \">\n");
	
	child.document.write("<font size=\"3\">\n");
	child.document.write("<div width=\"100%\" align=\"center\" style=\" line-height: 150%; color: rgb(31, 73, 125); line-height: 150%; font-family: 'Arial','sans-serif';\"\n");
	child.document.write("lang=\"EN-GB\">CONSULTING + TRAINING + EQUIPMENT</div></font>\n");
	
	child.document.write("<font size=\"3\">\n");
	child.document.write("<div width=\"100%\" align=\"center\" style=\"line-height: 150%; color: rgb(31, 73, 125); line-height: 150%; font-family: 'Arial','sans-serif';\"\n");
	child.document.write("lang=\"EN-GB\">For more details on this product please feel free to contact us: </div></font>\n");
	
	child.document.write("<font size=\"3\">\n");
	child.document.write("<div width=\"100%\" align=\"center\"  style=\"line-height: 150%; color: rgb(31, 73, 125); line-height: 150%; font-family: 'Arial','sans-serif';\"\n");
	child.document.write("lang=\"EN-GB\"></div></font>\n");
	
	child.document.write("<div width=\"100%\" align=\"center\" style=\"line-height: 115%; font-size: 12pt; color: rgb(31, 73, 125); line-height: 115%; font-family: 'Arial','sans-serif'; padding-bottom:5px; \"\n");
	child.document.write("lang=\"EN-GB\"><a href=\"mailto:info@disaster-medicine.com\">\n");
	child.document.write("<font color=\"#0000ff\">info@disaster-medicine.com</font></a></div>\n");
	
	child.document.write("</div>\n");
	
	child.document.write("</body></html>\n");
	child.document.close();
	child.focus();
}

function openPopUp2(url, headline){
	var child = window.open('','Gallerie','width=750,height=636,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	
	child.document.open();
	child.document.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
	child.document.write("<html>\n");
	child.document.write("<head><title>Gallerie - "+headline+"</title>\n");
	child.document.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></head>\n");
	child.document.write("<body marginheight=\"1\" leftmargin=\"1\" rightmargin=\"1\" bottommargin=\"1\" marginwidth=\"1\" topmargin=\"1\" style=\"margin: 0px; padding:0px;\"><div style=\"margin: 0px; padding:0px;\"><img style=\"margin: 0px; padding:0px;\"src=\""+url+"\" alt=\""+headline+"\" width=\"750\" height=\"562\"></div>\n");	
	child.document.write("<div width=\"100%\"style=\"border-style:solid; border-width:1px; border-color:#013467; \">\n");
	
	child.document.write("<font size=\"3\">\n");
	child.document.write("<div width=\"100%\" align=\"center\" style=\" line-height: 150%; color: rgb(31, 73, 125); line-height: 150%; font-family: 'Arial','sans-serif';\"\n");
	child.document.write("lang=\"EN-GB\">CONSULTING + TRAINING + EQUIPMENT</div></font>\n");
	
	child.document.write("<font size=\"3\">\n");
	child.document.write("<div width=\"100%\" align=\"center\" style=\"line-height: 150%; color: rgb(31, 73, 125); line-height: 150%; font-family: 'Arial','sans-serif';\"\n");
	child.document.write("lang=\"EN-GB\">For more details on this product please feel free to contact us: </div></font>\n");
	
	child.document.write("<font size=\"3\">\n");
	child.document.write("<div width=\"100%\" align=\"center\"  style=\"line-height: 150%; color: rgb(31, 73, 125); line-height: 150%; font-family: 'Arial','sans-serif';\"\n");
	child.document.write("lang=\"EN-GB\"></div></font>\n");
	
	child.document.write("<div width=\"100%\" align=\"center\" style=\"line-height: 115%; font-size: 12pt; color: rgb(31, 73, 125); line-height: 115%; font-family: 'Arial','sans-serif'; padding-bottom:5px; \"\n");
	child.document.write("lang=\"EN-GB\"><a href=\"mailto:info@disaster-medicine.com\">\n");
	child.document.write("<font color=\"#0000ff\">info@disaster-medicine.com</font></a></div>\n");
	
	child.document.write("</div>\n");
	
	child.document.write("</body></html>\n");
	child.document.close();
	child.focus();
}