// JavaScript Document
function OpenNewWindow(FileName,WindowName)
{
	WindowFeature="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"

	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 = "/PH/EN/navigation/poll/poll.asp?action=poll&intPollID="+iPollID;
OpenNewWindow(strURL,"poll")
}

function Vote(iPollID) {
var strURL = "/PH/EN/navigation/poll/poll.asp?action=vote&intPollID="+iPollID+"&intOptionID="+GetPollID();
	if (validate_selection() == true) {
		OpenNewWindow(strURL,"poll")
	}
}

function Result(iPollID) {
var strURL = "/PH/EN/navigation/poll/poll.asp?action=result&intPollID="+iPollID;
OpenNewWindow(strURL,"poll")
}

function PastSubjects() {
var strURL = "/PH/EN/navigation/poll/poll.asp?action=subjects";	
OpenNewWindow(strURL,"poll")
}
document.write('<table width="209" border="0" cellspacing="0" cellpadding="0" align="center"><form name="poll">')
document.write('<tr><td colspan="2"><span style="font-family: Arial; color:#333333; font-size:11px;">What prize would compel you to join an online promo? Choose one:</span></td></tr>')
document.write('<tr><td height="10></td></tr>')	
document.write('<tr><td height="5" colspan="2"></td></tr>')
document.write('<tr><td width="20" valign="top"><input name="radioRecord" type="radio" value="1" /></td><td width="200" valign="top"><span style="font-family:Arial; color:#333333; font-size:11px">iPhone or Blackberry</span></td></tr>')
document.write('<tr><td width="20" valign="top"><input name="radioRecord" type="radio" value="2" /></td><td width="200" valign="top"><span style="font-family:Arial; color:#333333; font-size:11px">Cellphone</span></td></tr>')
document.write('<tr><td width="20" valign="top"><input name="radioRecord" type="radio" value="3" /></td><td width="200" valign="top"><span style="font-family:Arial; color:#333333; font-size:11px">Digital Camera</span></td></tr>')
document.write('<tr><td width="20" valign="top"><input name="radioRecord" type="radio" value="4" /></td><td width="200" valign="top"><span style="font-family:Arial; color:#333333; font-size:11px">iPod</span></td></tr>')
document.write('<tr><td width="20" valign="top"><input name="radioRecord" type="radio" value="5" /></td><td width="200" valign="top"><span style="font-family:Arial; color:#333333; font-size:11px">Laptop/Notebook</span></td></tr>')
document.write('<tr><td width="20" valign="top"><input name="radioRecord" type="radio" value="6" /></td><td width="200" valign="top"><span style="font-family:Arial; color:#333333; font-size:11px">Trip for 2 to Boracay/Palawan/Cebu/Davao</span></td></tr>')
document.write('<tr><td width="20" valign="top"><input name="radioRecord" type="radio" value="7" /></td><td width="200" valign="top"><span style="font-family:Arial; color:#333333; font-size:11px">Weekend accommodations in a 5-star Manila Hotel</span></td></tr>')
document.write('<tr><td height="10" colspan="2"></td></tr>')
document.write('<tr><td align="center" width="50%" colspan="2"><a href="javascript:Vote(36)"><img src="http://www.jobsdb.com/PH/EN/V6HTML/Home/Poll/votebutton.gif" border="0" /></a>')
document.write('<a href="javascript:Result(36)"><img src="http://www.jobsdb.com/PH/EN/V6HTML/Home/Poll/resultbutton.gif" border="0" /></a>')
document.write('</form></table>')