Javascript : Joe’s Timer Auto Open (MTV Asia)

17 Mar

<HTML><HEAD>

<script language=”JavaScript”>

<!–

var timerID = 0;
var tStart = null;
var newsecond = 310000 //5 mins
var i;
var j;
var m;
var k;
var w=1;

function UpdateTimer(j) {
k=j;
if(timerID)
{
clearTimeout(timerID);
clockID = 0;
}

if(!tStart)
tStart = new Date();

var tDate = new Date();
var tDiff = tDate.getTime() – tStart.getTime();

tDate.setTime(tDiff);

if (tDiff > newsecond)
{
//Stop();
Reset();
var ch = parseInt(k);
joe(ch+1);
}

document.theTimer.theCurrent.value = tDiff;
document.theTimer.theTime.value = “” + tDate.getMinutes() + “:” + tDate.getSeconds();
//focus();
timerID = setTimeout(“UpdateTimer(k)”, 1000);
}

function Start(n) {
tStart = new Date();
document.theTimer.theTime.value = “00:00”;

//timerID = setTimeout(“UpdateTimer(i)”, 1000);
UpdateTimer(n);
}

function Stop() {
if(timerID) {
clearTimeout(timerID);
timerID = 0;
}

tStart = null;
}

function Reset() {
tStart = null;

document.theTimer.theTime.value = “00:00”;
}

function loadpopup()
{
winpops = window.open(‘http://www.mtvasiaawards.com/Malaysia/Vote/Malaysia.html&#8217;,’new_win2′,’left=0, top=0, toolbar=0, menubar=0, location=0, status=0, scrollbars=1, resizable=0, width=750, height=500′);
alert(“Vote Now”);

}

function joe()
{
loadpopup();
//focus();
Start(i);
}

// –>
</SCRIPT>

</HEAD>

<BODY text=”brown” bgcolor=”gold” ONLOAD=’Stop()’>

<center><form name=”theTimer”><table>
<tr>
<td colspan=3 align=center>
<input type=text name=”theTime” size=4><input type=text name=”theCurrent” size=4>
<br>
<input type=hidden name=”theNumber” size=2> <input type=hidden name=”theNext” size=2>
</td>
</tr>
<tr><td></td></tr>
<tr>
<td>
<input type=button name=”start” value=”Start” onclick=”joe()”>
</td>
<td>
<input type=button name=”stop” value=”Stop” onclick=”Stop()”>
</td>
</tr>
</table></form></center>

Instructions:
<br><br>
1. Clik button “Start”.
<br>
2. MTV Asia Award page will pop-up.
<br>
3. At MTV Asia Award, log-in first.
<br>
4. Vote for siti and press “Vote”.
<br>
5. Go back to this page and press “Vote Now”.
<br>
6. This page will wait for 5 minute and ask you to vote again. (don’t close this page)
<br><br>
Happy voting!
<br><br>

Cara-caranya :
<br><br>
1. Tekan butang “Start”.
<br>
2. Laman MTV Asia Award akan pop-up.
<br>
3. Di laman MTV Asia Award, sila log-in dahulu.
<br>
4. Vote untuk siti dan tekan butang “Vote”.
<br>
5. Pergi balik ke page ini dan tekan butang “Vote Now”.
<br>
6. Page ini akan mengira sampai 5 minit dan akan menyuruh anda vote lagi. (jangan tutup page ini)
<br><br>
Selamat voting!

</BODY>
</HTML>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: