var ad_html = '\
<h3 class="red" style="font-size: 18px; margin-bottom: 10px;">Temporary Maternity Cover <br />(Minimum 6 month contract) <br />For Office Administrator and more...</h3>\
<p style="color:#ff0; width:380px;">Creative design company requires an articulate, confident and organised person to join our support team. Duties will involve: accounts support, implementing systems, preparation of reports, dealing with telephone enquiries; diary management; arranging travel; welcoming visitors; organising events.</p>\
<p style="color:#ff0; width:380px;">Must be able to manage time and various responsibilities to strict deadlines.<br />\
Part time - 3 days a week, Wednesday-Friday.<br /> Salary subject to experience.</p>\
<p><span class="red">Apply to:</span> <a href="mailto:elaine@wpa-pinfold.co.uk">elaine@wpa-pinfold.co.uk</a></p>\
<h1 title="close" id="recruitment_x" onclick="recruitment_popup(\'hide\')">X</h1>';

function recruitment_popup(action) {
	var container = document.getElementById('recruitment_container');
	if (action == 'show' && !document.getElementById('recruitment_ad')) {
		// fade out bg
		var bg = document.createElement('div');
		bg.id = 'recruitment_bg';
		document.body.appendChild(bg);
		
		// show the ad
		var ad = document.createElement('div');
		ad.id = 'recruitment_ad';
		ad.innerHTML = ad_html;
		container.appendChild(ad);
	} else
	if (action == 'hide') {
		// hide the ad
		var ad = document.getElementById('recruitment_ad');
		var bg = document.getElementById('recruitment_bg');
		container.removeChild(ad);
		document.body.removeChild(bg);
	}
}
