var vURL="",vBase="http://www.jobsdb.com/HK/EN/navigation/poll/poll.asp?action=";
function OpenNewWindow(FileName,WindowName) {
	newWindow=open(FileName,WindowName,"Resizable=Yes,ScrollBars=Yes,MenuBar=No,Directories=No,ToolBar=No,Location=No,Status=No,Width=300,Height=350,ScreenX=0,ScreenY=0,Top=0,Left=0");
	if (newWindow.opener==null) newWindow.opener=self;
	if (newWindow.focus) newWindow.focus();
}
function validate_selection() {
	var valid_choice;
	for (var i=0;i < document.poll.radioRecord.length;i++) {
		if (document.poll.radioRecord[i].checked) valid_choice=true;
	}
	if (valid_choice) return (true);
	 else { 
		alert('Please select a choice!');
		return (false);
	}
}
function GetPollID() {
	for (var i=0;i < document.poll.radioRecord.length;i++) {
		if (document.poll.radioRecord[i].checked) return document.poll.radioRecord[i].value;
	}
	return 1;
}
function Poll(iPollID) {vURL=vBase+"poll&intPollID="+iPollID;OpenNewWindow(vURL,"poll");}
function Vote(iPollID) {vURL=vBase+"vote&intPollID="+iPollID+"&intOptionID="+GetPollID();if (validate_selection()) OpenNewWindow(vURL,"poll");}
function Result(iPollID) {vURL=vBase+"result&intPollID="+iPollID;OpenNewWindow(vURL,"poll");}
function PastSubjects() {vURL=vBase+"subjects";OpenNewWindow(vURL,"poll");}

document.write('<form name="poll" id="vOte" style="margin:0;padding:0;"><table border="0" cellPadding="0" cellSpacing="0" style="color:#000;font-size:11px;"><col width="25"><col width="*"><tbody valign="top"><tr><th colSpan="2" align="left" style="padding:3px 0;color:#007ED2;font-size:12px;">Polling<\/th><\/tr>');
document.write('<tr><td colSpan="2" style="padding:3px 0;">Q: Do you help staff to maintain work-life balance?<\/td><\/tr>');
document.write('<tr><td><input name="radioRecord" type="radio" value="1"><\/td><td class="BNFont">Yes, implement 5-day work week<\/td><\/tr>');
document.write('<tr><td><input name="radioRecord" type="radio" value="2"><\/td><td class="BNFont">Yes, provide more paid annual leave<\/td><\/tr>');
document.write('<tr><td><input name="radioRecord" type="radio" value="3"><\/td><td class="BNFont">Yes, allow flexible working hours<\/td><\/tr>');
document.write('<tr><td><input name="radioRecord" type="radio" value="4"><\/td><td class="BNFont">Yes, in ways other than the above<\/td><\/tr>');
document.write('<tr><td><input name="radioRecord" type="radio" value="5"><\/td><td class="BNFont">No<\/td><\/tr>');
document.write('<tr><td colspan="2"><input type="button" value="Vote and View Result" style="font:10px Tahoma,Arial,Sans-Serif;width:120px;margin-top:5px;" onclick="Vote(146);"><\/td><\/tr>');
document.write('<\/tbody><\/table><\/form>');