

function checkform(){
	var tableid = document.getElementById("table_events");
        var tabletr = tableid.getElementsByTagName("tr");
        var lengthtr = tabletr.length;
        //var test = tabletr[0];
        for(i=1; i<lengthtr; i++){
        	var tabletd = tabletr[i].getElementsByTagName('td');
        	//alert(i+' '+tabletd.length);
        	tabletd[0].style.borderLeft = "0";
        	tabletd[tabletd.length-1].style.borderRight= "0";
        }
        

	if($("tx_szcplxevents_pi2_address_m").checked || $("tx_szcplxevents_pi2_address_f").checked){
        	$("asterisk_mf").hide();
        	$("alert_addressmf").innerHTML ="";
        	
	} 
	
        else {
        	$("asterisk_mf").show();

	} 
	if(Field.present("firstn")) {
		$("asterisk_fn").hide();        	
		$("firstn").style.borderColor = "#959FA6";
    	        $("alert_firstname").innerHTML ="";
    	        
	}  
    	else  {
		$("asterisk_fn").show();

	}
	if(Field.present("lastn")) {
		$("asterisk_ln").hide();
		$("lastn").style.borderColor = "#959FA6";
		$("alert_lastname").innerHTML ="";
    	      
    	        
	} 
   	else if(!Field.present("lastn")) {
		$("asterisk_ln").show();
	} 
	if(Field.present("company")) {
		$("asterisk_co").hide();
		$("company").style.borderColor = "#959FA6";
    	        $("alert_company").innerHTML ="";;
	} 
   	else if(!Field.present("company")) {
		$("asterisk_co").show();
	} 
	if(Field.present("department")) {
		$("asterisk_dep").hide();
		$("department").style.borderColor = "#959FA6";
		$("alert_department").innerHTML ="";
		
    	   
	} 
   	else if(!Field.present("department")) {
		$("asterisk_dep").show();
	} 
	if(Field.present("street")) {
		$("asterisk_street").hide();
		$("street").style.borderColor = "#959FA6";
		$("alert_street").innerHTML ="";
    	    
	} 
   	else if(!Field.present("street")) {
		$("asterisk_street").show();
	} 
	if(Field.present("zip")) {
		$("asterisk_zip").hide();
		$("zip").style.borderColor = "#959FA6";
		$("alert_zip").innerHTML ="";
    	 
	} 
   	else if(!Field.present("zip")) {
		$("asterisk_zip").show();
	} 
	if(Field.present("city")) {
		$("asterisk_city").hide();
		$("city").style.borderColor = "#959FA6";
		$("alert_city").innerHTML ="";
    	    
	} 
   	else if(!Field.present("city")) {
		$("asterisk_city").show();
	} 
	if(Field.present("tel")) {
		$("asterisk_tel").hide();
		$("tel").style.borderColor = "#959FA6";
		$("alert_tel").innerHTML ="";
    	    
	} 
   	else if(!Field.present("tel")) {
		$("asterisk_tel").show();
	} 
	if(Field.present("mail")) {
		$("asterisk_mail").hide();
		$("mail").style.borderColor = "#959FA6";
		//$("alert_street").innerHTML ="";
    	     
	} 
   	else if(!Field.present("mail")) {
		$("asterisk_mail").show();
	} 
	if($("tx_szcplxevents_pi2_gtc").checked) {
        	$("asterisk_gtc").hide();
        	$("alert_gtc").style.display = "none";
        	$("last_width").style.display = "";
        	$("tx_szcplxevents_pi2_gtc").focus();
	} 
	else if(!($("tx_szcplxevents_pi2_gtc").checked)) {
        	$("asterisk_gtc").show();
	}
}
function checksubmit(){
	
	

   if(!($("tx_szcplxevents_pi2_address_m").checked || $("tx_szcplxevents_pi2_address_f").checked)){
    	$("alert_addressmf").style.display = "inline";
    	$("first_width").style.display = "none";
     }
   else if(!Field.present("firstn")){
    	$("firstn").style.borderColor = "#f15931";
    	$("alert_firstname").style.display = "inline";    	
    	$("first_width").style.display = "none";
     }
   else if(!Field.present("lastn")){
    	$("lastn").style.borderColor = "#f15931";
    	$("alert_lastname").style.display = "inline";
    	$("first_width").style.display = "none";
     }
  
   else if(!Field.present("company")){
    	$("company").style.borderColor = "#f15931";
    	$("alert_company").style.display = "inline";
    	$("first_width").style.display = "none";
     }
   else if(!Field.present("department")){
    	$("department").style.borderColor = "#f15931";
    	$("alert_department").style.display = "inline";
    	$("first_width").style.display = "none";
     }
   else if(!Field.present("street")){
    	$("street").style.borderColor = "#f15931";
    	$("alert_street").style.display = "inline";
    	$("first_width").style.display = "none";
     }
   else if(!Field.present("zip")){
    	$("zip").style.borderColor = "#f15931";
    	$("alert_zip").style.display = "inline";
    	$("first_width").style.display = "none";
     }
   else if(!Field.present("city")){
    	$("city").style.borderColor = "#f15931";
    	$("alert_city").style.display = "inline";
    	$("first_width").style.display = "none";
     }
   else if(!Field.present("tel")){
    	$("tel").style.borderColor = "#f15931";
    	$("alert_tel").style.display = "inline";
    	$("first_width").style.display = "none";
     }
   else if(!Field.present("mail")){
    	$("mail").style.borderColor = "#f15931";
    	$("alert_mail").style.display = "inline";
    	$("first_width").style.display = "none";
     }
   else if(!($("tx_szcplxevents_pi2_gtc").checked)) {
        $("alert_gtc").style.display = "inline";
        $("tx_szcplxevents_pi2_gtc").focus();
        $("last_width").style.display = "none";

	}
   else {
     document.event_signup.submit();
    }

}



function displayHTML(printContent) {
if (navigator.appName.indexOf("Explorer") >= 0){
	var copymode = document.getElementById(printContent).innerHTML;
}
else {
	var copymode = document.getElementById(printContent).cloneNode(true);
}
var inf = copymode;

win = window.open('', 'popup', 'width=700,height=980,resizable,scrollbars');
win.document.write('<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Strict\/\/EN" "http:\/\/www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">');
win.document.write('<html>\r\n<head>\r\n');

win.document.write('<title>msgGillardon Anmeldeformular</title>\r\n<style type="text/css" media="screen">\r\n');

win.document.write('body {text-align: left;color: #424242; height: 980px; width: 700px; font-size: 11px; font-family: Arial, Helvetica, sans-serif; background: #FFFFFF;padding: 0;margin: 0;}\r\n');
win.document.write('a,h1,h2,h3,h4,h5,h6,ol,ul,li,dl,dt,dd,p,input,textarea,select {font-weight: normal; color: #424242;}\r\n');
win.document.write('table{ border-collapse: collapse;}\r\n');
win.document.write('input, input.text, textarea {width: 200px; border: 1px solid black;} textarea {height: 90px; }\r\n');
win.document.write('input.checkbox, input.radio {border: 0; width: 10px; } table tr td.box {font-weight: bold; width: 310px;} .orange {color: #f15931;}\r\n');
win.document.write('#formlogo {position: absolute; left: 60px; top: 15px;}\r\n');
win.document.write('img {border: 0;margin: 0;} .clear {clear: both;} label {font-weight: normal;} li {font-size: 11px;}\r\n');
win.document.write('#header {position: absolute; top: 85px; width: 700px; height: 95px; background-color: #969696; border-left: 20px solid #F15931; text-align: left; }\r\n ');
win.document.write('#header h1 {margin: 15px 0 0 50px; line-height: 1em; padding: 0; font-size: 30px; color: #FFFFFF;  }\r\n ');
win.document.write('#header h2 {margin: 0 0 15px  50px; line-height: 1em; padding: 0; font-size: 20px; color: #FFFFFF;  }\r\n ');
win.document.write('div.tx-szcplxevents-pi2 { position: absolute; top: 170px; text-align: left;}');
win.document.write('.tx-szcplxevents-pi2 h1 { color: #F15931; font-size: 12px; font-weight: bold; width: 330px; display: block; position: relative; left: 0; top: 10px;} * html .tx-szcplxevents-pi2 h1 { top: 17px;} *+html .tx-szcplxevents-pi2 h1 { top: 17px;}\r\n');
win.document.write('table {margin-top:5px; border-collapse: collapse; clear: both; position: relative; left: 0; } table td { padding: 5px; border: 1px solid black; font-size: 11px; vertical-align: top; } table th { text-align: left; padding: 10px; font-size: 11px; vertical-align: top; }\r\n');
win.document.write('div.tx-szcplxevents-pi2 table.dates, div.tx-szcplxevents-pi2 table.events {width: 330px;}');
win.document.write('div.tx-szcplxevents-pi2 table.event-form td.left {float: left; width: 110px; }  td.left {width: 80px;} *html td.left {width: 100px;} div.tx-szcplxevents-pi2 table.event-form td.right { float: left; width: 200px;} td.right{} ');
win.document.write('#table_events {position: relative; left: 0; top: 0; width: 320px;}'); 
win.document.write('form table { background-color: #FFFFFF;  margin: 0 0 5px 0; } form tbody { background-color: #FFFFFF; } form table tr td {padding: 2px; font-size: 11px; border: 0; }');
win.document.write('td.cell_width {display: none!important;}\r\n');
win.document.write('#textfield { display: none!important; }\r\n');
win.document.write('#anmeldungssatz { border: 0; position: absolute; top: 772px; left: 330px; width: 380px;} *html #anmeldungssatz {top: 815px;} *+html #anmeldungssatz {top: 830px;} #anmeldungssatz td {border: 0; }');
win.document.write(' #third_part {position: absolute; left: 330px; top: 140px; width: 500px;} * html #third_part { position: absolute; left: 330px; top: 40px; }  *+html #third_part { position: absolute; top: 40px; } #fourth_part {position: absolute; left: 330px; top: 410px; z-index: 100; width: 500px; }* html #fourth_part {position: absolute; left: 330px; top: 320px; z-index: 100; } *+html #fourth_part {top: 330px;}');
win.document.write('* html #event_signup {position: relative; top: -40px;} *+html #event_signup {position: relative; top: -40px;}');
win.document.write('#tx_szcplxevents_pi2_callback, #tx_szcplxevents_pi2_gtc, #tx_szcplxevents_pi2_send_information, #tx_szcplxevents_pi2_selftest, #tx_szcplxevents_pi2_katalog_excl, #tx_szcplxevents_pi2_katalog { float: left; }');
win.document.write('#bedingungen, div.button1, div.button2, div.button3 { display: none; }');
// win.document.write('#tx_szcplxevents_pi2_accommodation_smoker_yes { float: left; }  #smoker label {float: left; } #smoker {clear: both!important;}'); 
win.document.write('.blockleft {float:left; margin-left: 5px; width:150px;}\r\n');
win.document.write('#rooms, #nonsmoker { width: 95px!important; }\r\n');
win.document.write('#datenschutz, #hotel_information { display: none; }\r\n');
win.document.write('#address {position: absolute; width: 500px;font-weight: normal; font-size: 11px; top: 180px; left: 445px;  padding: 3px; } * html #address {position: absolute; font-weight: normal; font-size: 11px; top: 180px; left: 445px;  padding: 3px; } #address p { margin: 5px 0; } #address span.bold { font-weight: bold; } #address table { margin: 0; border: 0; position: relative; left: 0;} #address table td {padding: 0; border: 0;}');
win.document.write('input#zip { width: 50px; float: left; margin-right: 2px; } input#city { width: 148px; float: left;} * html input#city { width: 140px; float: left; } *+html input#city { width: 135px; float: left; }\r\n');
win.document.write('#menschen {position: absolute; left: 427px; top: 880px;}* html #menschen {position: absolute; left: 400px; top: 1030px; z-index: 200;}*+html #menschen {position: absolute; left: 416px; top: 940px; z-index: 200;}');
win.document.write('#reg_head { display: none; }');
win.document.write('</style>');


win.document.write('<style type="text/css" media="print">\r\n');
win.document.write('body {text-align: left;color: #424242; height: 970px; width: 700px; font-size: 11px; font-family: Arial, Helvetica, sans-serif; background: #FFFFFF;padding: 0;margin: 0;}\r\n');
win.document.write('a,h1,h2,h3,h4,h5,h6,ol,ul,li,dl,dt,dd,p,input,textarea,select {font-weight: normal; color: #424242;}\r\n');
win.document.write('table{ border-collapse: collapse;}\r\n');
win.document.write('input, input.text, textarea {width: 200px; border: 1px solid black;} textarea {height: 90px; }\r\n');
win.document.write('input.checkbox, input.radio {border: 0; width: 10px; } table tr td.box {font-weight: bold; width: 310px;} .orange {color: #f15931;}\r\n');
win.document.write('#formlogo {position: absolute; left: 60px; top: 15px;}\r\n');
win.document.write('img {border: 0;margin: 0;} .clear {clear: both;} label {font-weight: normal;} li {font-size: 11px;}\r\n');
win.document.write('#header {position: absolute; top: 85px; width: 700px; height: 95px; background-color: #969696; border-left: 20px solid #F15931; text-align: left; }\r\n ');
win.document.write('#header h1 {margin: 15px 0 0 50px; line-height: 1em; padding: 0; font-size: 30px; color: #FFFFFF;  }\r\n ');
win.document.write('#header h2 {margin: 0 0 15px  50px; line-height: 1em; padding: 0; font-size: 20px; color: #FFFFFF;  }\r\n ');
win.document.write('div.tx-szcplxevents-pi2 { position: absolute; top: 170px; text-align: left;}');
win.document.write('.tx-szcplxevents-pi2 h1 { color: #F15931; font-size: 12px; font-weight: bold; width: 330px; display: block; position: relative; left: 0; top: 10px;} * html .tx-szcplxevents-pi2 h1 { top: 17px;} *+html .tx-szcplxevents-pi2 h1 { top: 17px;}\r\n');
win.document.write('table {margin-top:5px; border-collapse: collapse; clear: both; position: relative; left: 0; } table td { padding: 5px; border: 1px solid black; font-size: 11px; vertical-align: top; } table th { text-align: left; padding: 10px; font-size: 11px; vertical-align: top; }\r\n');
win.document.write('div.tx-szcplxevents-pi2 table.dates, div.tx-szcplxevents-pi2 table.events {width: 330px;}');
win.document.write('div.tx-szcplxevents-pi2 table.event-form td.left {float: left; width: 110px; }  td.left {width: 80px;} *html td.left {width: 100px;} div.tx-szcplxevents-pi2 table.event-form td.right { float: left; width: 200px;} td.right{} ');
win.document.write('#table_events {position: relative; left: 0; top: 0; width: 320px;}'); 
win.document.write('form table { background-color: #FFFFFF;  margin: 0 0 5px 0; } form tbody { background-color: #FFFFFF; } form table tr td {padding: 2px; font-size: 11px; border: 0; }\r\n');
win.document.write('#textfield { display: none!important; }\r\n');
win.document.write('td.cell_width {display: none!important;}\r\n');
win.document.write('#anmeldungssatz { border: 0; position: absolute; top: 773px; left: 330px; width: 380px;} * html #anmeldungssatz {top: 815px;} *+html #anmeldungssatz {top: 830px;} #anmeldungssatz td {border: 0; }\r\n');
win.document.write(' #third_part {position: absolute; left: 330px; top: 140px; width: 500px;} * html #third_part { position: absolute; left: 330px; top: 40px; }  *+html #third_part { position: absolute; top: 40px; } #fourth_part {position: absolute; left: 330px; top: 410px; z-index: 100; width: 500px; }* html #fourth_part {position: absolute; left: 330px; top: 320px; z-index: 100; } *+html #fourth_part {top: 330px;}\r\n');
win.document.write('* html #event_signup {position: relative; top: -40px;} *+html #event_signup {position: relative; top: -40px;}');
win.document.write('#tx_szcplxevents_pi2_callback, #tx_szcplxevents_pi2_gtc, #tx_szcplxevents_pi2_send_information, #tx_szcplxevents_pi2_selftest, #tx_szcplxevents_pi2_katalog_excl, #tx_szcplxevents_pi2_katalog { float: left; }\r\n');
win.document.write('#bedingungen, div.button1, div.button2, div.button3 { display: none; }\r\n');
// win.document.write('#tx_szcplxevents_pi2_accommodation_smoker_yes { float: left; }  #smoker label {float: left; } #smoker {clear: both!important;}'); 
win.document.write('.blockleft {float:left; margin-left: 5px; width:150px;}\r\n');
win.document.write('#rooms, #nonsmoker { width: 95px!important; }\r\n');
win.document.write('#datenschutz, #hotel_information { display: none; }\r\n');
win.document.write('#textfield { display: none; }\r\n');
win.document.write('#address {position: absolute; width: 500px;font-weight: normal; font-size: 11px; top: 180px; left: 445px;  padding: 3px; } * html #address {position: absolute; font-weight: normal; font-size: 11px; top: 180px; left: 445px;  padding: 3px; } #address p { margin: 5px 0; } #address span.bold { font-weight: bold; } #address table { margin: 0; border: 0; position: relative; left: 0;} #address table td {padding: 0; border: 0;}');
win.document.write('input#zip { width: 50px; float: left; margin-right: 2px; } input#city { width: 144px; float: left;} * html input#city { width: 140px; float: left; } *+html input#city { width: 135px; float: left; }\r\n');
win.document.write('#menschen img { border: 0; margin: 0; } #menschen {position: absolute; left: 400px; top: 870px;}* html #menschen {position: absolute; left: 400px; top: 1150px; z-index: 200;} *+html #menschen {position: absolute; left: 416px; top: 940px; z-index: 200;}');
win.document.write('</style>');

win.document.write('</head><body>');
win.document.write('<div id="formlogo"><img src="http://www.msg-gillardon.com/fileadmin/template/img/formlogo.gif" alt="msg-Gillardon Logo" /></div>\r\n');
win.document.write('<div id="header"><h1 id="anmeldefax">Anmeldefax</h1><br /><h2 id="event_fax_registration">+49 (0) 7252 9350-7211</h2></div>\r\n');
win.document.write('<div id="formular">&nbsp;</div>');
if (navigator.appName.indexOf("Explorer") >= 0){
	win.document.write(inf);
}
else {
  win.document.getElementById('formular').appendChild(inf);
}
win.document.write('<div id="address">\r\n<p>msgGillardon AG<br />Edisonstra&szlig;e 2<br />75015 Bretten</p><table><tr><td>Telefon</td><td id="tel2">&nbsp;+49 (0) 7252 9350-110</td></tr><tr><td>Fax</td><td id="event_fax">&nbsp;+49 (0) 7252 9350-7211</td></tr><tr><td>E-Mail</td><td id="event_mail">&nbsp;veranstaltungen@msg-gillardon.de</td></tr></table><p><span class="orange">\></span> <span class="bold">www.msg-gillardon.de</span></p></div>');
win.document.write('<table class="event-form" id="anmeldungssatz"><tr><td colspan="2" class="box">Mit der Anmeldung akzeptieren wir die<br />Veranstaltungsbedingungen der msgGillardon AG.</td></tr><tr><td class="left">Datum</td><td class="right"><input  value="" class="text" type="text" /></td></tr><tr><td class="left">Unterschrift</td><td class="right"><input name="" value="" class="text" type="text" /></td></tr></table>');
win.document.write('<div id="menschen"><img src="http://www.msg-gillardon.com/fileadmin/template/img/menschen_logo.jpg" alt="msg-Gillardon img" /></div>\r\n');
win.document.write('');
win.document.write('<script type="text/javascript">\r\n');
win.document.write('//<![CDATA[\r\n');
//win.document.write('  document.getElementById("alert_addressmf").style.display = "none";\r\n')
win.document.write('  if (document.getElementById("seminar_id")){');
win.document.write('  document.getElementById("tel").innerHTML = "&nbsp;+49 (0) 7252 / 9350-115";\r\n');
win.document.write('  document.getElementById("tel2").innerHTML = "&nbsp;+49 (0) 7252 / 9350-115";\r\n');
win.document.write('  document.getElementById("event_mail").innerHTML = "&nbsp;seminare@msg-gillardon.de";\r\n');
win.document.write('  document.getElementById("event_fax").innerHTML = "&nbsp;+49 (0) 7252 9350-7115";\r\n');
win.document.write('  document.getElementById("event_fax_registration").innerHTML = "&nbsp;+49 (0) 7252 9350-7115";}\r\n');
win.document.write(' //]]>');
win.document.write('</script>\r\n');
win.document.write('</body></html>');
win.print();
win.document.close(); // new line
}


