var ran_num = Math.random();
whichads="http://www.hostspeedy.com/images/banner1.gif";
whichurl="http://www.hostspeedy.com/cgi-bin/refer.cgi?id=HotCoolNet";
if (ran_num < 0.50) {
	whichads="http://www.hotcoolnet.com/ads/casino3.gif";
	whichurl="http://www.casinoglamour.com/~12dl/chinese";
}
if (ran_num < 0.25) {

	var ran_num9 = Math.random();
	whichads="/ads/zone1.gif";
	whichurl="/hotcoolfriends";
	if (ran_num9 < 0.75) {
		whichads="/ads/zone2.gif";
		whichurl="/hotcoolsite";
	}
	if (ran_num9 < 0.5) {
		whichads="/ads/zone5.gif";
		whichurl="/powerdict";
	}
	if (ran_num9 < 0.25) {
		whichads="/ads/zone6.gif";
		whichurl="/powernews";
	}

}


var browser_type=navigator.appName

// if (browser_type=="Netscape") {
// document.writeln("<ilayer src=\"/ads/ads_ns.shtml\" height=\"60\" width=\"470\" bgcolor=\"#3C8AC4\"></ilayer>");
// document.writeln("<br><center><font size=\"3\"> </font><font size=\"2\" color=\"gold\" style=\"font-size:9pt\">↑↑↑ HotCoolNet.com 全力推介 - 最佳網頁製作免費資源中心 ↑↑↑</font><font size=\"3\"> </font></center>"); }
// document.writeln("<br><a href=\"/advertise.html\" target=\"_top\"><img src=\"/ads/adhere.gif\" border=\"0\" width=\"470\" height=\"15\"></a>"); }
// else {
// document.writeln("<table width=\"470\" height=\"75\" cellpadding=\"0\" cellspacing=\"0\"><tr><td height=\"60\"><iframe width=\"470\" height=\"60\" NORESIZE SCROLLING=\"no\" FRAMEBORDER=\"0\" MARGINHEIGHT=\"0\" MARGINWIDTH=\"0\" src=\"/ads/ads.shtml\"></iframe></td></tr><tr><td height=\"15\">");
// document.writeln("<center><font size=\"3\"> </font><font size=\"2\" color=\"gold\" style=\"font-size:9pt\">↑↑↑ HotCoolNet.com 全力推介 - 最佳網頁製作免費資源中心 ↑↑↑</font><font size=\"3\"> </font></center></td></tr></table>"); }
// document.writeln("<a href=\"/advertise.html\" target=\"_top\"><img src=\"/ads/adhere.gif\" border=\"0\" width=\"470\" height=\"15\"></a></td></tr></table>"); }


document.write("<table width=\"470\" height=\"75\" cellpadding=\"0\" cellspacing=\"0\"><tr><td height=\"60\"><a href='");
document.write(whichurl);
document.write("' target='_blank'><img src='");
document.write(whichads);
document.writeln("' height='60' width='468' border='0'></a></td></tr><tr><td height=\"15\">");
document.writeln("<a href=\"/advertise.html\" target=\"_top\"><img src=\"/ads/adhere.gif\" border=\"0\" width=\"470\" height=\"15\"></a></td></tr></table>");


// value - value of the cookie
// [expires] - expiration date of the cookie (defaults to end of current session)
// [path] - path for which the cookie is valid (defaults to path of calling document)
// [domain] - domain for which the cookie is valid (defaults to domain of calling document)
// [secure] - Boolean value indicating if the cookie transmission requires a secure transmission
// * an argument defaults when it is assigned null as a placeholder
// * a null placeholder is not required for trailing omitted arguments
function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + "/" : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}
// name - name of the desired cookie
// * return string containing value of specified cookie or null if cookie does not exist
function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}
// name - name of the cookie
// [path] - path of the cookie (must be same as path used to create cookie)
// [domain] - domain of the cookie (must be same as domain used to create cookie)
// * path and domain default if assigned null or omitted if no explicit argument proceeds
function deleteCookie(name, path, domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" + 
    ((path) ? "; path=" + "/" : "") +
    ((domain) ? "; domain=" + domain : "") +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}
// date - any instance of the Date object
// * hand all instances of the Date object to this function for "repairs"
function fixDate(date) {
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0)
    date.setTime(date.getTime() - skew);
}

// create an instance of the Date object     
var now = new Date();     
// fix the bug in Navigator 2.0, Macintosh     
fixDate(now);     
// cookie expires in one year (actually, 365 days)     
// 365 days in a year     
// 24 hours in a day     
// 60 minutes in an hour     
// 60 seconds in a minute     
// 1000 milliseconds in a second     

var hkbn = getCookie("pop_hkbn");     
// if the cookie was not found, this is your first visit     
if (!hkbn) {     
  hkbn = 1; // the value for the new cookie     
  now.setTime(now.getTime() + (15 * 60 * 1000));     
  // set the new cookie     
  setCookie("pop_hkbn", hkbn, now);     
  // hkbn_window = window.open('/ads/hkbn_pop.html','hkbn_win', 'height=350,width=350,top=0,left=0,toolbar=no,scrollbars=no');
}

var icare = getCookie("pop_icare");     
// if the cookie was not found, this is your first visit     
if (!icare) {     
  icare = 1; // the value for the new cookie     
  now.setTime(now.getTime() + (15 * 60 * 1000));     
  // set the new cookie     
  setCookie("pop_icare", icare, now);     
  // icare_window = window.open('/ads/icare_pop.html','icare_win', 'height=300,width=315,top=0,left=0,toolbar=no,scrollbars=no');

// startDate=new Date();
// tmpWin=window.open("http://www.netsponsor.net/cgi-bin/affiliates/click.cgi?hotcool",startDate.getTime(),"left=0,top=0,toolbar=no,location=no,resizable=no,status=no,scrollbars=on,menubar=no,width=500,height=100");

}