<HTML>
<HEAD>
<SCRIPT TYPE="text/javascript">
<!--
var year, month, date, rNumber, i, r;
var times = 50;
img = new Image;
function display_image(){
c = document.cookie;
if(navigator.appVersion.charAt(0)>=3){
if(c == ""){
Randoms(times);
getDays();
document.cookie = "card="+rNumber+";expires="+Xday;
}
else{ rNumber = getCookie("card"); }
if(rNumber < 5){ i = 1; }
else if (rNumber < 20){ i = 2; }
else if (rNumber < 40){ i = 3; }
else if (rNumber < 48){ i = 4; }
else if (rNumber < 51){ i = 5; }
img.src = "image/huda"+i+".gif"
}
document.Img.src = img.src;
}
function getCookie(key){
tmp = document.cookie+";";
tmp1 = tmp.indexOf(key,0);
if(tmp1 != -1){
tmp = tmp.substring(tmp1,tmp.length);
start = tmp.indexOf("=",0) + 1;
end = tmp.indexOf(";",start);
return(unescape(tmp.substring(start,end)));
}
return("");
}
function getDays(){
var day = new Date();
if(day.getYear() >= 2000){ year = day.getYear(); }
else{ year = day.getYear() + 1900; }
month = day.getMonth() + 1;
date = day.getDate();
date++;
if(month == 12 && date > 31){ date = 1; month = 1; year++; }
else if (month == 2 && year % 4 == 0){
if(date > 29){ date = 1; month = 3; } }
else if (month == 2 && date > 28){ date = 1; month = 3; }
else if (month == 4 || month == 6 || month == 9 || month == 11){
if(date > 30){ date = 1; month++; } }
else if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10){
if(date > 31){ date = 1; month++; } }
month--;
Xday = new Date(year,month,date);
Xday.setTime(Xday.getTime());
}
function Randoms(r){
iValue = Math.random() * r;
rNumber = Math.ceil(iValue);
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0"> <TR> <TD COLSPAN="5" ALIGN="CENTER">
<IMG SRC="image/huda0.gif" WIDTH="32" HEIGHT="60" NAME="Img" VSPACE="20" ALT="card"></TD> </TR> <TR ALIGN="CENTER"> <TD COLSPAN="5"> <INPUT TYPE="BUTTON" NAME="button" VALUE="FORTUNE CARD" onClick="display_image()"> </TD> </TR> </TABLE>
</BODY>
</HTML>
|