﻿function OpenNewWindow(FileName,WindowName)
{
	WindowFeature="Resizable=Yes,ScrollBars=Yes,MenuBar=No,Directories=No,ToolBar=No,Location=No,Status=No,Width=300,Height=200,ScreenX=0,ScreenY=0,Top=0,Left=0"

	newWindow=open(FileName,WindowName,WindowFeature);
	if (newWindow.opener == null) { newWindow.opener = self; }
	if (newWindow.focus) { newWindow.focus(); }
	
}function validate_selection() {
var valid_choice;

	for ( i = 0 ; i < document.poll.radioRecord.length ; i++) {
		if(document.poll.radioRecord[i].checked==true)  
			valid_choice = true;
	}	
	
	if (valid_choice == true) {
		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) {
var strURL = "http://www.jobsdb.com.sg/SG/EN/navigation/poll/poll.asp?action=poll&intPollID="+iPollID;
OpenNewWindow(strURL,"poll")
}

function Vote(iPollID) {
var strURL = "http://www.jobsdb.com.sg/SG/EN/navigation/poll/poll.asp?action=vote&intPollID="+iPollID+"&intOptionID="+GetPollID();
	if (validate_selection() == true) {
		OpenNewWindow(strURL,"poll")
	}
}

function Result(iPollID) {
var strURL = "http://www.jobsdb.com.sg/SG/EN/navigation/poll/poll.asp?action=result&intPollID="+iPollID;
OpenNewWindow(strURL,"poll")
}

function PastSubjects() {
var strURL = "http://www.jobsdb.com.sg/SG/EN/navigation/poll/poll.asp?action=subjects";	
OpenNewWindow(strURL,"poll")
}



document.write('<form name="poll"><table border=0 width=100% cellspacing=0 cellpadding=0 >')
//document.write('<tr><td><IMG SRC="/Images/SG/EN/navigation/Poll/title_weeklypoll.gif" width=91 height=19></td></tr>')
document.write('<tr><td>')
document.write('<table cellPadding="0" cellSpacing="0" width="100%" border=0>')
document.write('<tr><td colSpan="2"><span style="font-family:Georgia, Times New Roman, Helvetica, sans-serif;font-size:11px"><b>What is the dominant factor determining your choice to join or stay with an employer?</b></span></td></tr>')
document.write('<tr><td colSpan="2">&nbsp;</td></tr>')
document.write('</table>')
document.write('<table cellPadding="2" cellSpacing="2" width="100%" border=0 >')
	document.write('<tr ><td height="18" width="22"><input name="radioRecord" type="radio" value="1"></td>')
	document.write('<td style="font-family:Arial, Georgia, Times New Roman, Helvetica, sans-serif;font-size:11px">Salary</td></tr>')

	document.write('<tr><td vAlign="top" height="22"> <input name="radioRecord" type="radio" value="2"></td>')
	document.write('<td style="font-family:Arial, Georgia, Times New Roman, Helvetica, sans-serif;font-size:11px">Opportunities for Advancement</td></tr>')

document.write('<tr><td vAlign="top" height="22"><input name="radioRecord" type="radio" value="3"></td>')
document.write('<td style="font-family:Arial, Georgia, Times New Roman, Helvetica, sans-serif;font-size:11px">Good Reputation</font></td></tr>')
	
	document.write('<tr><td vAlign="top" height="22"><input name="radioRecord" type="radio" value="4"></td>')
	document.write('<td><font face="Arial, Helvetica, sans-serif" size="1">Strong Corporate Culture</font></td></tr>')
	
		<!--document.write('<tr><td vAlign="top" height="22"><input name="radioRecord" type="radio" value="5"></td>')-->
	<!--document.write('<td><font face="Arial, Helvetica, sans-serif" size="1">Managing people well  </font></td></tr>')-->

document.write('</table>')
document.write('<table cellPadding="0" cellSpacing="0" width="100%" border=0>')


document.write('<tr><td colSpan="2">&nbsp;</td></tr>')
document.write('<tr><td colspan="2" align=center>')
document.write('<tr><td align="center"><a href="javascript:Vote(261)"><img src="http://content0.jobsdb.com/Content/CmsContent/SG/File/vote.gif" title="Vote Now!" border="0"></a></td>')
document.write('<td align="left"><a href="javascript:Result(261)"><img src="http://content0.jobsdb.com/Content/CmsContent/SG/File/results.gif" title="View Result" border="0"></a></td></tr>')
//document.write('<a href="javascript:PastSubjects()"><font face="Arial, Helvetica, sans-serif" size="1" color="#6B6B6B"><b>Previous Polls</b></font></a><br>')
document.write('</td></tr></table>')

document.write('</td></tr>')
document.write('</table></form>')

