// BADGEPREVIEW.JS ////////////////////////////////////////////////////////////////////////////////////////
// This function displays an image of the badge. It relies on having a form with fields correctly named
// on the page that it is called from. By default, this is 'qform' for the form name, and 'er_title',
// 'er_initials', 'er_surname' and 'er_company' for the fields.
// ////////////////////////////////////////////////////////////////////////////////////////////////////////

function showbadge(){
var abadge="<html><head><title>Recruitment Consultant Badge Preview</title></head>" +
"<body bgcolor='#e0e0e0' link='#0000FF' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>"+
"<table width='299' border='0' cellpadding='5' cellspacing='0' height='240' name='badge' bgcolor='#FFFFFF' bordercolor='#CCCCCC'>"+
" <font face='Arial, Helvetica, sans-serif'>"+
"  <tr> "+
"    <td width='103' height='32'><img src='../global/barcode.gif' height='30' border='0'></td>"+
"    <td></td>"+
"    <td width='80' height='65'><img src='badgelogo.gif' width='80' border='0'></td>"+
"  </tr>"+
"  <tr> "+
"    <td colspan='3' align='center' height='5'>" + "<font face='Arial, Helvetica, sans-serif'> "+
"		<font size ='4'><b>"+document.qform.er_title.value + "&nbsp;" + document.qform.er_initials.value + "&nbsp;" + document.qform.er_surname.value +"</b></font></td>"+
"  </tr>"+
"  <tr> "+
"    <td colspan='3' align='center' height='5'><font face='Arial, Helvetica, sans-serif'><font size ='4'><b>"+document.qform.er_company.value+"</b></td>"+
"  </tr>"+
"  <tr> "+
"    <td colspan='3' align='center' height='5'><font face='Arial, Helvetica, sans-serif'><font size ='4'><b>VISITOR</b></td>"+
"  </tr>"+
"</table>"+
"<p align='center'><font face='verdana, arial, helvetica, sans-serif' size='2' color='#3A305B'>"+
"<i><font size=-2>This picture is for illustration purposes only</font></i> <br>"+
"<i><font size=-2>You must still submit the form in order to register</font></i> <br>"+
"<a href='javascript:window:close()'>Close Window</a></font></p>"+
"</body></html>";
BadgeWin=window.open("", "badge", "width=300,height=320,scrollbars=no");
BadgeWin.document.write(abadge);
BadgeWin.document.close();
}

