var BrowserDetect = {
    init: function () {
        this.browser = this.searchString(this.dataBrowser) || 'An unknown browser';
        this.version = this.searchVersion(navigator.userAgent)
                || this.searchVersion(navigator.appVersion)
                || 'an unknown version';
        this.OS = this.searchString(this.dataOS) || 'an unknown OS';
    },
    searchString: function (data) {
        for (var i = 0; i < data.length; i++) {
            var dataString = data[i].string;
            var dataProp = data[i].prop;
            this.versionSearchString = data[i].versionSearch || data[i].identity;
            if (dataString) {
                if (dataString.indexOf(data[i].subString) != -1)
                    return data[i].identity;
            }
            else if (dataProp)
                return data[i].identity;
        }
    },
    searchVersion: function (dataString) {
        var index = dataString.indexOf(this.versionSearchString);
        if (index == -1) return;
        return parseFloat(dataString.substring(index + this.versionSearchString.length + 1));
    },
    dataBrowser: [
        {     string: navigator.userAgent,
            subString: 'OmniWeb',
            versionSearch: 'OmniWeb',
            identity: 'OmniWeb'
        },
        {
            string: navigator.vendor,
            subString: 'Apple',
            identity: 'Safari'
        },
        {
            prop: window.opera,
            identity: 'Opera'
        },
        {
            string: navigator.vendor,
            subString: 'iCab',
            identity: 'iCab'
        },
        {
            string: navigator.vendor,
            subString: 'KDE',
            identity: 'Konqueror'
        },
        {
            string: navigator.userAgent,
            subString: 'Firefox',
            identity: 'Firefox'
        },
        {
            string: navigator.vendor,
            subString: 'Camino',
            identity: 'Camino'
        },
        {        // for newer Netscapes (6+)
            string: navigator.userAgent,
            subString: 'Netscape',
            identity: 'Netscape'
        },
        {
            string: navigator.userAgent,
            subString: 'MSIE',
            identity: 'Explorer',
            versionSearch: 'MSIE'
        },
        {
            string: navigator.userAgent,
            subString: 'Gecko',
            identity: 'Mozilla',
            versionSearch: 'rv'
        },
        {         // for older Netscapes (4-)
            string: navigator.userAgent,
            subString: 'Mozilla',
            identity: 'Netscape',
            versionSearch: 'Mozilla'
        }
    ],
    dataOS : [
        {
            string: navigator.platform,
            subString: 'Win',
            identity: 'Windows'
        },
        {
            string: navigator.platform,
            subString: 'Mac',
            identity: 'Mac'
        },
        {
            string: navigator.platform,
            subString: 'Linux',
            identity: 'Linux'
        }
    ]

};

function stop_bubble(e) {
    if (!e) var e = window.event;
    e.cancelBubble = true;
    if (e.stopPropagation) e.stopPropagation();
    return true;
}

var Browser = {
    setEventPropagation: function (event, boolValue) {
        BrowserDetect.init();

        if (BrowserDetect.browser.indexOf('Explorer') != -1) {
            event.cancelBubble = !boolValue;
        } else if (BrowserDetect.browser.indexOf('Opera') != -1) {
            if (event.stopPropagation) event.stopPropagation();
            event.cancelBubble = !boolValue;
        } else if (BrowserDetect.browser.indexOf('Firefox') != -1) {
            if (event.stopPropagation) event.stopPropagation();
            event.cancelBubble = !boolValue;
        } else if (BrowserDetect.browser.indexOf('Mozilla') != -1) {
            if (event.stopPropagation) event.stopPropagation();
            event.cancelBubble = !boolValue;
        } else if (BrowserDetect.browser.indexOf('Netscape') != -1) {
            if (event.stopPropagation) event.stopPropagation();
            event.cancelBubble = !boolValue;
        } else if (BrowserDetect.browser.indexOf('Konqueror') != -1) {
            if (event.stopPropagation) event.stopPropagation();
            event.cancelBubble = !boolValue;
        } else if (BrowserDetect.browser.indexOf('Safari') != -1) {
            if (event.stopPropagation) event.stopPropagation();
            event.cancelBubble = !boolValue;
        }
    }
};
  
//<script type="text/javascript">

//SETTING UP OUR POPUP
//0 means disabled; 1 means enabled;
var popupStatus = 0;
var popup3Status = 0;

//loading popup with jQuery magic!
function loadPopup(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		jQuery("#backgroundPopup").css({
			"opacity": "0.8"
		});
		jQuery("#backgroundPopup").show();
		jQuery("#11").fadeIn();
		popupStatus = 1;
	}
}
function loadPopup3(){
	//loads popup only if it is disabled
	if(popup3Status==0){
		jQuery("#backgroundPopup3").css({
			"opacity": "0.8"
		});
		jQuery("#backgroundPopup3").show();
		jQuery("#113").fadeIn();
		popup3Status = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopup(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		jQuery("#backgroundPopup").hide();
		jQuery("#11").fadeOut();
		popupStatus = 0;
	}
}
function disablePopup2(){
//    jQuery("#backgroundPopup2").hide();
//    jQuery(".actualSendMailForm").fadeOut();
    window.location="/web/konventum/forside"; 
}

function disablePopup3(){
    if(popup3Status==1){
        jQuery("#backgroundPopup3").hide();
        jQuery("#113").hide();
		popup3Status = 0;
	}
}

//CONTROLLING EVENTS IN jQuery
jQuery(document).ready(function(){

	//LOADING POPUP
	//Click the button event!

	jQuery("#button2").click(function(){
		//centering with css
		//centerPopup();
		//load popup
		loadPopup();
	});

	//CLOSING POPUP
	//Click the x event!
	jQuery("#popupContactClose").click(function(){
		disablePopup();
	});
	//Click out event!
	jQuery("#backgroundPopup").click(function(){
		disablePopup();
	});
	//Press Escape event!
	jQuery(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup();
		}
	});


    
	//Click the x event!
	jQuery(".popupClose").click(function(){
        if(jQuery("#backgroundPopup2").is("div")){
		    disablePopup2();
        }
	});



    //LOADING POPUP3
	//Click the button3 event!
	jQuery("#button3").click(function(){
		//centering with css
		//centerPopup();
		//load popup
		loadPopup3();
	});
    //CLOSING POPUP3
    //Click the x event!
	jQuery(".popup3Close").click(function(){
		disablePopup3();
	});
});

function selectPostcardImage(element){
    var pImgs =  jQuery('.postkortImg');

    for (var i=0; i < pImgs.length; i++){
            pImgs[i].style.borderColor='#EBEBE3';
    }
    element.style.borderColor='#48A9D2';


    var newElement = document.createElement('div');
    var elements = element.childNodes;
    for (i = 0; i < elements.length; i++) {
        var elementi = elements[i];
        if (elementi.tagName != null) {

            if (elementi.tagName.toUpperCase().indexOf("DIV") != -1) {
                newElement.innerHTML="<img src=" + element.title + " alt=\"\" style=\"padding-bottom:10px;padding-right:10px;\"/><div>" + elementi.innerHTML + "</div>";
            }
        }
    }

    document.getElementById("postcardText").value = newElement.innerHTML;
}

    function submission1() {
        var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;

        if (document.getElementById('friendName').value.replace(/^\s+|\s+$/g, "") == '') {
            alert('Indtast modtagers navn.');
	    document.getElementById('friendName').focus();
            return false;
        }
        if (document.getElementById('toAddress').value.replace(/^\s+|\s+$/g, "") == '') {
            alert('Modtagers email er ikke korrekt el. mangler');
	    document.getElementById('toAddress').focus();
            return false;
        }
	if(!document.getElementById('toAddress').value.match(emailExp)) {
	    alert('Modtagers email er ikke korrekt el. mangler');
	    document.getElementById('toAddress').focus();
	    return false;
	}

        if (document.getElementById('yourName').value.replace(/^\s+|\s+$/g, "") == '') {
            alert('Indtast navn.');
	    document.getElementById('yourName').focus();
            return false;
        }
        if (document.getElementById('senderAddress').value.replace(/^\s+|\s+$/g, "") == '') {
            alert('Din email er ikke korrekt el. mangler');
	    document.getElementById('senderAddress').focus();
            return false;
        }
	if(!document.getElementById('senderAddress').value.match(emailExp)) {
	    alert('Din email er ikke korrekt el. mangler');
	    document.getElementById('senderAddress').focus();
	    return false;
	}
          if (document.getElementById('postcardText').value.replace(/^\s+|\s+$/g, "") == '') {
            alert('Vaelg billede og titel');
            return false;
        }
        return true;
    }


function validateContentS() {
    if (typeof(submission1) != "undefined") {
        return submission1();
    } else {
        return true;
    }
}

function onSubmitMailerPostcard(oForm) {
    BrowserDetect.init();
    if (!validateContentS()) {
        return false;
    }
    var postcardMailText = document.createElement("INPUT");
    postcardMailText.setAttribute("type","hidden");
    postcardMailText.id = "postcardMailText";
    postcardMailText.name = "postcardMailText";

    var oDiv = document.getElementById("11");
//"interpretable" is the id of the div for wich we want to calculate the inner html
    changeToLabels(oDiv);

    if (BrowserDetect.browser.indexOf('Explorer') != -1) {
        postcardMailText.value = "<div id=\"backgroundPopup2\" "+
                                "style=\"opacity: 0.8;"+
                                "position:fixed;"+
                                "-moz-background-clip: -moz-initial;-moz-background-origin: -moz-initial;-moz-background-inline-policy: -moz-initial;"+
                                "height:100%;"+
                                "width:100%;"+
                                "top:0;"+
                                "left:0;"+
                                "background: rgb(0, 0, 0) none repeat scroll 0% 0%;"+
                                "border: 1px solid rgb(206, 206, 206);"+
                                "z-index:20;\">"+
                            "</div>"+
                            /*"<div class=\"sendPostkort\">"+
                                "<a id=\"button2\" href=\"#\">"+
                                    "<img src=\"../../html/themes/Konventum/images/Lo_skolen/sendPostkortImg.png\" alt=\"\"/>"+
                                "</a>"+                                 
                            "</div>"+*/
                            "<div class=\"sendPostkortForm\" style=\"z-index:500;position:relative;\">"+
                                "<div id=\"11\" class=\"actualSendMailForm\" style=\"padding: 0pt; background: rgb(235, 235, 227) url(/html/themes/Konventum/images/Lo_skolen/sendPostkortBKG.jpg) no-repeat scroll left top; z-index: 20000; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; min-height: 525px; min-width: 865px; width: 865px;\">"+
                                ""+oDiv.innerHTML+"</div></div>";
    } else {
        postcardMailText.value =  "<div id=\"backgroundPopup2\" "+
                                "style=\"opacity: 0.8;"+
                                "position:fixed;"+
                                "-moz-background-clip: -moz-initial;-moz-background-origin: -moz-initial;-moz-background-inline-policy: -moz-initial;"+
                                "height:100%;"+
                                "width:100%;"+
                                "top:0;"+
                                "left:0;"+
                                "background: rgb(0, 0, 0) none repeat scroll 0% 0%;"+
                                "border: 1px solid rgb(206, 206, 206);"+
                                "z-index:20;\">"+
                            "</div>"+
                           /* "<div class=\"sendPostkort\">"+
                                "<a id=\"button2\" href=\"#\">"+
                                    "<img src=\"../../html/themes/Konventum/images/Lo_skolen/sendPostkortImg.png\" alt=\"\"/>"+
                                "</a>"+
                            "</div>"+*/
                            "<div class=\"sendPostkortForm\" style=\"z-index:500;position:relative;\">"+
                                ""+calculateInnerHtml(oDiv)+"</div>";
    }
    oForm.appendChild(postcardMailText);
    return true;
}

function calculateInnerHtml(node) {
    var data = "";
    if (node.tagName != null) {
        data = data + " <" + node.tagName;
        var i = 0;
        var attributes = node.attributes;
        if (attributes != null) {
            for (i = 0; i < attributes.length; i++) {
                var attribute = attributes[i];
                var atrValue = attribute.value;
                if (atrValue==undefined) atrValue = '';
                data = data + " " + attribute.name + "=\"" + atrValue + "\" ";
            }
        }

        var elements = node.childNodes;

        if (elements.length == 0) data = data + " /";
        data = data + ">";

        if (elements.length > 0) {
            for (i = 0; i < elements.length; i++) {
                var element = elements[i];
                data = data + calculateInnerHtml(element);
            }
            data = data + "</" + node.tagName + ">";
        }
    } else {

         var nodeContent = node.textContent;
                if (nodeContent==undefined) nodeContent = '';
        data = data + nodeContent;
    }
    return data;
}

function changeToLabels(node) {
    var elements = node.childNodes;
    var i = 0;
//    var gasit = false;
    for (i = 0 ; i < elements.length ; i++) {
        var element = elements[i];
        if (element.tagName != null) {

            if (element.tagName.toUpperCase().indexOf("INPUT") != -1) {
                if (element.getAttribute("type").toUpperCase().indexOf("HIDDEN") != -1) {
                    if(element.id == "postcardText"){
                        var newElement = document.createElement('span');
                        newElement.innerHTML = element.value;

                        var postcardImgElem = document.getElementById("postcardImg");
                        postcardImgElem.innerHTML=element.value;
                        postcardImgElem.style.padding="0";
                        postcardImgElem.style.margin="35px 0 0 15px";
                        postcardImgElem.style.width="550px";
                        postcardImgElem.style.fontFamily="Lucida Grande,Myriad Pro,Verdana,sans-serif";
                        postcardImgElem.style.fontSize="13px";
                        postcardImgElem.style.fontWeight="normal";
                        postcardImgElem.style.color="#414141";
//                        postcardImgElem.style.backgroundColor="#FFFFFF";

                        node.removeChild(element);

//                        var popCloseElem = document.getElementById("popupContactClose");
//                        popCloseElem.innerHTML="<span>.</span>";
//                        popCloseElem.style.color="#C6BFB9";

//                        var formElem = document.getElementById("form1");
//                        formElem.style.top="103px";
                    }
                }
                else if (element.getAttribute("type").toUpperCase().indexOf("SUBMIT") != -1) {
                    node.removeChild(element);
                }
                else if (element.getAttribute("type").toUpperCase().indexOf("BUTTON") != -1) {
                    node.removeChild(element);
                }
                else  if (element.getAttribute("type").toUpperCase().indexOf("FILE") != -1) {
                    node.removeChild(element);
                }
                else if (element.getAttribute("type").toUpperCase().indexOf("IMAGE") != -1) {
                    node.removeChild(element);
                }
                else if (element.getAttribute("type").toUpperCase().indexOf("RESET") != -1) {
                    node.removeChild(element);
                }
                /*else if (element.type.toUpperCase().indexOf("PASSWORD") != -1) {
                    var newElement = document.createElement('span');
                    newElement.innerHTML = "******";
                    node.replaceChild(newElement, element);
                }
                else if (element.type.toUpperCase().indexOf("RADIO") != -1) {
                    var newElement = document.createElement('span');
                    if (element.checked) {
                        newElement.innerHTML = element.value;
                    } else {
                        newElement.innerHTML = "";
                    }
                    node.replaceChild(newElement, element);
                }
                else if (element.type.toUpperCase().indexOf("CHECKBOX") != -1) {
                    var newElement = document.createElement('span');
                    if (element.checked) {
                        newElement.innerHTML = "YES";
                    } else {
                        newElement.innerHTML = "NO";
                    }
                    node.replaceChild(newElement, element);
                }*/
                else if (element.getAttribute("type").toUpperCase().indexOf("TEXT") != -1) {
                    var newElement = document.createElement('div');
                    element.style.display = "none";
//                    element.value = newElement.innerHTML;
//                    element.setAttribute("value",element.value);
//                    element.setAttribute("style","display:none;");
                      node.appendChild(newElement);
                      newElement.innerHTML = element.value;
                }
            }
            /*else if ((element.tagName.toUpperCase().indexOf("OPTION") != -1)) {
                var newElement = document.createElement('span');
                if (gasit) {
                    newElement.innerHTML = "";
                } else {
                    if (element.selected) {
                        newElement.innerHTML = element.innerHTML;
                        gasit = true;
                    } else {
                        newElement.innerHTML = "";
                    }
                }
                node.replaceChild(newElement, element);
            }*/
            /*else if ((element.tagName.toUpperCase().indexOf("SELECT") != -1)) {
                changeToLabels(element);
                var newElement = document.createElement('span');
                newElement.innerHTML = element.innerHTML;
                node.replaceChild(newElement, element);
            }*/
            else if ((element.tagName.toUpperCase().indexOf("TEXTAREA") != -1)) {
                var newElement = document.createElement('div');
                newElement.innerHTML = element.value;
                element.innerHTML=element.value;
//                element.setAttribute("style","display:none;");
                element.style.display = "none";
                node.appendChild(newElement);
//                newElement.setAttribute("style","height:280px");
                newElement.style.height = "220px";
                newElement.style.overflow = "auto";
                newElement.style.margin = "0 0 60px 0";                       
//                node.replaceChild(newElement, element);
            }
            else {
                if ((element.tagName.toUpperCase().indexOf("BR") != -1)){
                    element.style.display = "none";
                }
                changeToLabels(element);
            }
        }
    }
}

    function focusFunc(obj, val){
        if (obj.value.trim()==val) {
            obj.value = '';
        }
    }

    function blurFunc(obj, val){
        if (obj.value.trim()=='') {
            obj.value = val;
        }
    }

//</script>

function jsCleanup(html){
    var re = new RegExp("<SCRIPT.*</SCRIPT>");
    while (html.match(re)){
    html = html.replace(re,"");
    }
    return html;
}


var gAutoPrint = true; // Flag for whether or not to automatically call the print function

function printFriendly(printFriendlyName1,printFriendlyName2)
{
if (document.getElementById!= null)
{
var html = '<HTML>\n<HEAD>\n';

if (document.getElementsByTagName!= null)
{
var headTags = document.getElementsByTagName("head");
if (headTags.length > 0) {
var inHTML = headTags[0].innerHTML.toString();
html += inHTML;
}
}

html += '\n</HEAD>';
html += '\n<body>';


var printPageElem1 = document.getElementById(printFriendlyName1);
var printPageElem2 = document.getElementById(printFriendlyName2);

if (printPageElem1 != null || printPageElem2 != null)
{
    
html+= '<style>'+
    '.sIFR-flash {'+
    'display    : none !important;'+
    'height     : 0;'+
    'width      : 0;'+
    'position   : absolute;'+
    'overflow   : hidden;'+
  '}'+

  '.sIFR-alternate {'+
    'visibility : visible !important;'+
    'display    : block   !important;'+
    'position   : static  !important;'+
    'left       : auto    !important;'+
    'top        : auto    !important;'+
    'width      : auto    !important;'+
    'height     : auto    !important;'+
  '}'+
'</style>';

html += '<center>';

html += '<div id=\"wrapper\" style=\"padding-left:0;background-color:#FFFFFF;width:800px;\">';
    html += '   <div id=\"footer\" style=\"position:inherit;text-transform:none;display:inline;float:left;width:700px;text-align:left;border-top:none;padding-left:12px;padding-top:29px\">';
    html += '       <div class=\"forPrint\" style=\"width:165px;float:left;padding-left:10px;padding-right:10px;\">' +
            '           <strong>Konventum</strong>' +
            '           <br />Lo-skolens konferencecenter' +
            '           <br />Gl. Helleb&aelig;kvej 70' +
            '           <br />DK-3000 Helsing&oslash;r</div>';
    html += '       <div class=\"forPrint\" style=\"width:50px;float:left;padding-right:0;\">' +
            '           Tlf.' +
            '           <br />Fax' +
            '           <br />E-mail' +
            '           <br />Web</div>';
    html += '       <div class=\"forPrint\" style=\"width:130px;float:left;\">' +
            '           [+45] 49 28 09 00' +
            '           <br />[+45] 49 21 65 66' +
            '           <br />booking@konventum.dk' +
            '           <br />www.konventum.dk</div>';
    html += '   </div>';


html += '<div id=\"banner\" style=\"display:inline; float:right;width:62px;min-height:80px;height:145px;padding-top:9px;\">';
html += '	<h1  style=\"position:relative;right:40px\">';
html += '		<a  href="#" style="height:162px; width:80px;">';
html += '                <img src=\"/html/themes/Konventum/images/Lo_skolen/logo.gif\" style=\"border:1px solid #F1EFEC\"/>';
html += '		</a>';
html += '	</h1>';
html += '</div>';

html += '<div style=\"clear:both;\">';
html += '</div>';
html += '<div id=\"content-wrapper\" style=\"text-align:left;padding-bottom:1px;\">';
html += '   <table id=\"layout-grid\" class=\"lfr-grid\" style=\"background-color:#FFFFFF;\">';
html += '       <tbody>';
html += '           <tr>';
html += '               <td class=\"lfr-column eighty\" valign=\"top\" style=\"padding:19px\">';
    if (printPageElem1 != null)
    {
html +=                     printPageElem1.innerHTML;
    }
html += '               </td>';
html += '               <td class=\"lfr-column twenty\" valign=\"top\" style=\"padding:19px\">';
    if (printPageElem2 != null)
    {
html +=                     printPageElem2.innerHTML;
    }
html += '               </td>';
html += '           </tr>';
html += '       </tbody>';
html += '   </table>';
html += '</div>';
html += '</div>';
html += '       </div>';

html += '</center>';

}
else
{
alert("Could not find the printReady section in the HTML");
return;
}

html += '\n</BODY>\n</HTML>';

    html = jsCleanup(html);


var printWin = window.open('','printFriendly','directories=no,height=640,location=no,menubar=yes,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=868');
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(printFriendlyName1,printFriendlyName2)
{
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\" 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 printPageElem1 = document.getElementById(printFriendlyName1);
var printPageElem2 = document.getElementById(printFriendlyName2);

if (printPageElem1!= null ||printPageElem2!= null)
{

html += '<center>';

html += '<div id=\"wrapper\">';
html += '<div id=\"banner\">';
html += '	<h1 class=\"logo\">';
//html += '		<a class=\"png\" href=\"/web/guest/forside\">';
html += '		<a  href=\"/web/guest/forside\">';
html += '			FONDEN LO-SKOLEN';
html += '		</a>';
html += '	</h1>';
html += '</div>';
html += '<div id=\"navigation\" style=\"min-height:2px;\">';
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=\"Fonden Lo-skolen : 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:5px;padding-bottom:13px;\"><input type=\"image\" src=\"/html/themes/Fonden Lo_skolen/images/Lo_skolen/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=\"content-wrapper\" style=\"background-color:#FFFFFF;text-align:left;margin-top:15px; padding:15px 0 1px 0; border-top:1px dotted #cccccc;\" >';
html += '   <table id=\"layout-grid\" class=\"lfr-grid\">';
html += '       <tbody>';
html += '           <tr>';
html += '               <td class=\"lfr-column seventy\" valign=\"top\" style=\"padding:19px\">';
    if (printPageElem1 != null)
    {
html +=                     printPageElem1.innerHTML;
    }
html += '               </td>';
html += '               <td class=\"lfr-column thirty\" valign=\"top\" style=\"padding:19px\">';
    if (printPageElem2 != null)
    {
html +=                     printPageElem2.innerHTML;
    }
html += '               </td>';
html += '           </tr>';
html += '       </tbody>';
html += '   </table>';
html += '</div>';


html += '   <div id=\"footer\" style=\"position:inherit;\">';
html += '       <div class=\"leftTxt\">Konventum, Lo-skolens konferencecenter</div>';
html += '       <div class=\"rightTxt\">Gl. Helleb&aelig;kvej 70 | DK-3000 Helsing&oslash;r | Denmark | Tlf.: +45 4928';
html += '               0900 | Fax: +45 4921 6566 | <a href=\"mailto:info@konventum.dk\"><span class=\"infoMail\">info@konventum.dk</span></a>';
html += '       </div>';
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=950');
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.");
}
}
