var gAutoPrint = true; // Flag for whether or not to automatically call the print function function printFriendly(printFriendlyName) { if (document.getElementById!= null) { var html = '<HTML>\n<HEAD>\n'; if (document.getElementsByTagName!= null) { var headTags = document.getElementsByTagName("head"); if (headTags.length > 0) html += headTags[0].innerHTML; } html += '\n</HEAD>';html += '\n<body>';var printPageElem = document.getElementById(printFriendlyName); if (printPageElem!= null) { html += '<center>';html += '<div id=\"wrapper\" style=\"width:650px;background: transparent url(/html/themes/astmaAllergi/images/common/banner_bg.png) no-repeat scroll 0 0;\">';html += '<div id=\"banner\" style=\"width:650px;margin-left:5px;\">';html += '	<h1 class=\"logo\">';html += '		<a href=\"/web/portal/home\">';html += '			<span style=\"display:none;\">Astma-Allergi Forbundet</span>';html += '		</a>';html += '	</h1>';html += '</div>';html += '<div id=\"container\" class=\"theContainer\" style=\"text-align:left;padding-left:12px;margin-left:5px; border:none; border-top:1px dotted #cccccc; background:none;\" >';html += printPageElem.innerHTML;html += '</div>';html += '</div>';html += '</center>';} else { alert("Could not find the printReady section in the HTML"); return; } html += '\n</BODY>\n</HTML>'; var printWin = window.open('','printFriendly','directories=no,height=640,location=no,menubar=yes,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=680'); printWin.document.open(); printWin.document.write(html); printWin.document.close(); if (gAutoPrint) printWin.print(); } else { alert("Sorry, the printer friendly feature works\nonly in javascript enabled browsers."); } }function sendToFriend(printFriendlyName){if (document.getElementById!= null){var html = '<HTML>\n<HEAD>\n';if (document.getElementsByTagName!= null){var headTags = document.getElementsByTagName("head");if (headTags.length > 0)html += headTags[0].innerHTML;}//html += '\n<script type=\"text/javascript\"src=\"/html/themes/astmaAllergi/javascript/mailer.js\"> </script>';html += '\n<script type=\"text/javascript\" LANGUAGE=\"JavaScript1.1\">';html += '\n    function submission1() {';html += '\n ';html += '\n     if (document.getElementById(\'yourName\').value.replace(/^\\s+|\\s+$/g, \"\") == \'\') {';html += '\n         alert(\'Indtast navn.\');';html += '\n         return false;';html += '\n     }\n ';html += '\n     if (document.getElementById(\'senderAddress\').value.replace(/^\\s+|\\s+$/g, \"\") == \'\') {';html += '\n         alert(\'Din email er ikke korrekt el. mangler\');';html += '\n         return false;';html += '\n     }\n ';html += '\n     if (document.getElementById(\'friendName\').value.replace(/^\\s+|\\s+$/g, \"\") == \'\') {';html += '\n         alert(\'Indtast modtagers navn.\');';html += '\n         return false;';html += '\n     }\n ';html += '\n     if (document.getElementById(\'toAddress\').value.replace(/^\\s+|\\s+$/g, \"\") == \'\') {';html += '\n         alert(\'Modtagers email er ikke korrekt el. mangler\');';html += '\n         return false;';html += '\n     }\n ';html += '\n      return true;';html += '\n    }';html += '\n</script>';html += '\n</HEAD>';html += '\n<body>';var printPageElem = document.getElementById(printFriendlyName);if (printPageElem!= null){html += '<center>';html += '<div id=\"wrapper\" style=\"width:650px;background: transparent url(/html/themes/astmaAllergi/images/common/banner_bg.png) no-repeat scroll 0 0;\">';html += '<div id=\"banner\" style=\"width:650px;margin-left:5px; border-bottom:1px dotted #cccccc;\">';html += '	<h1 class=\"logo\">';html += '		<a href=\"/web/portal/home\">';html += '			<span style=\"display:none;\">Astma-Allergi Forbundet</span>';html += '		</a>';html += '	</h1>';html += '</div>';    html += '<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" style=\"font-size:11px;\">';    html += '		<form id=\"form1\" action=\"/c/ext/mailPage/SendMailToFriend\" name=\"friendsender\" method=\"post\" enctype=\"multipart/form-data\">';    html += '			<input type=\"hidden\" name=\"subject\" value=\"Astma-Allergi : Email fra en ven\">';    var loc=String(this.location);    html += '			<input type=\"hidden\" name=\"redirectURL\" id=\"redirectURL\" value='+loc+'>';    html += '			<input type=\"hidden\" name=\"resultURL\" id=\"resultURL\" value=\"/html/portlet/mailPage/sendSuccess.jsp\">';    html += '			<tr>';    html += '				<td valign=\"top\">';    html += '				    <font class=\"friendsender_head\"><b>Send til en ven</b></font><br>';    html += '				    <br>';    html += '				    <br>';    html += '					<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"font-size:11px;\">';    html += '						<tr>';    html += '							<td width=\"50%\" valign=\"top\"><font class=\"friendsender_lead\">Dit navn :</font></td>';    html += '							<td width=\"50%\" valign=\"top\"><input type=\"text\" id=\"yourName\" name=\"yourName\" alt=\"blank\" emsg=\"Indtast navn.\"></td>';    html += '						</tr>';    html += '						<tr>';    html += '							<td width=\"50%\" valign=\"top\"><font class=\"friendsender_lead\">Din e-mail :</font></td>';    html += '							<td width=\"50%\" valign=\"top\"><input type=\"text\" id=\"senderAddress\" name=\"senderAddress\" alt=\"email\" emsg=\"Din email er ikke korrekt el. mangler\"></td>';    html += '						</tr>';    html += '						<tr>';    html += '							<td width=\"50%\" valign=\"top\"><font class=\"friendsender_lead\">Modtagers navn :</font></td>';    html += '							<td width=\"50%\" valign=\"top\"><input type=\"text\" id=\"friendName\" name=\"friendName\" alt=\"blank\" emsg=\"Indtast modtagers navn.\"></td>';    html += '						</tr>';    html += '						<tr>';    html += '							<td width=\"50%\" valign=\"top\"><font class=\"friendsender_lead\">Modtagers e-mail :</font></td>';    html += '							<td width=\"50%\" valign=\"top\"><input type=\"text\" name=\"toAddress\" id=\"toAddress\" alt=\"email\" emsg=\"Modtagers email er ikke korrekt el. mangler\"></td>';    html += '						</tr>';    html += '						<tr>';    html += '							<td width=\"50%\" valign=\"top\"><font class=\"friendsender_lead\">Evt. besked :</font></td>';    html += '							<td width=\"50%\" valign=\"top\"><textarea name=\"messageInput\" cols=\"30\" rows=\"6\"></textarea></td>';    html += '						</tr>';    html += '						<tr>';    html += '							<td width=\"50%\" valign=\"top\"></td>';    html += '							<td width=\"50%\" valign=\"top\" style=\"padding-top:13px;\"><input type=\"image\" src=\"/html/themes/astmaAllergi/images/astma_allergi/sendButton.gif\" value=\"submit\" onClick=\"return submission1();\"></td>';    html += '						</tr>';    html += '					</table>';    html += '				</td>';    html += '			</tr>';    html += '		</form>';                             html += '		<tr>';    html += '			<td align=\"left\" valign=\"top\">';    html += '			    <font size=\"1\"><b>Sender link til f&oslash;lgende side :</b></font><br>';    html += '           </td>';    html += '       </tr>';    html += '   </table>';html += '<div id=\"container\" class=\"theContainer\" style=\"text-align:left;margin-top:15px;padding-left:12px;margin-left:5px; border:none; border-top:1px dotted #cccccc; background:none;\" >';html += printPageElem.innerHTML;html += '</div>';html += '</div>';html += '</center>';}else{alert("Could not find the printReady section in the HTML");return;}html += '\n</BODY>\n</HTML>';var printWin = window.open('','printFriendly','directories=no,height=640,location=no,menubar=yes,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=680');printWin.document.open();printWin.document.write(html);printWin.document.close();//if (gAutoPrint)//printWin.print();}else{alert("Sorry, the printer friendly feature works\nonly in javascript enabled browsers.");}}