<?php
error_reporting('E_PARSE');
?>
<style>
div.options {
	display:table;	
	text-align:center;
}

div.optionrow > div {
	display:table-cell;
	text-align:center;
	width:20%;
	margin: 0 2%;
	font-size:16px;
}

div.optionrow img {
	display:block;
	width:172px;
	text-align:center;
	max-height:150px;
}

.optionrow {
    align-self: center;
    display: table;
}
.options > .optionrow:first-child {
    align-self: left;    
    margin: 40px auto 0 5px;
}

.optionrow h2 {
	display: table-cell;
	text-align: left;
	width: 100%;
	font-size:18px;	
}

table tbody tr:nth-child(2n) {
	background-color:#FFF!important;	
}

form > table.text {
	border:0px solid white!important;	
}

.textline {
	font-size:16px;
	text-align:left;
	margin:5px;
}
.optionrow input[type="text"] {
    width: 450px;
    display: block;
    font-size:16px;
}
</style>

<?php
echo '<form enctype="multipart/form-data" method="post" action="pgm-form_submit.php">'."\n";

if(!function_exists('createRadio')){
	function createRadio($header,$name,$values,$images){
		global $_SESSION;
		$values=explode(',', $values); $images=explode(',', $images);  $name=preg_replace('/[,.\'"!\$]/i','',str_replace(' ','_',$name)); $header=str_replace('_',' ',$header);
		echo '	<div class="options">					<div class="optionrow"><h2>'.$header.'</h2></div>			<div class="optionrow">'."\n";
		foreach($values as $var=>$val){
			if(strlen(str_replace(' ','',$val)) > 1){
				echo '			<div>					<img src="/images/'.preg_replace('/\/?images\//i','',str_replace(' ','',$images[$var])).'">					<input id="'.$name.'" name="'.$name.'"  value="'.preg_replace('/[\'"!]/i','',$val).'" type="radio">'.htmlspecialchars($val).'				</div>'."\n";	
			}
		}
		$_SESSION['required_form_elements'][]=$name;
		echo '		</div>		<div>'."\n";
	}
}
?>