<!-- begin

var doc=document;  var url=escape(doc.location.href); var date_ob=new Date();
doc.cookie='h2=o; path=/;';var bust=date_ob.getSeconds();
if(doc.cookie.indexOf('e=llo') <= 0 && doc.cookie.indexOf('2=o') > 0){
doc.write('<scr'+'ipt language="javascript" src="http://media.fastclick.net');
doc.write('/w/pop.cgi?sid=4716&m=2&v=1.6b&u='+url+'&c='+bust+'"></scr'+'ipt>');
date_ob.setTime(date_ob.getTime()+86400000);
doc.cookie='he=llo; path=/; expires='+ date_ob.toGMTString();} 

function GoTo(s)
{
	var d = s.options[s.selectedIndex].value;
		window.top.location.href = d;
		s.selectedIndex=0;
}

function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) 
break; 
}
return null;
}

function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (2 < argc) ? argv[2] : null;
var path = (3 < argc) ? argv[3] : null;
var domain = (4 < argc) ? argv[4] : null;
var secure = (5 < argc) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}

function DisplayInfo() {
var expdate = new Date();
expdate.setTime(expdate.getTime() +  (24 * 60 * 60 * 1000 * 365)); 
var Ctr = GetCookie("FirstVisit");
++Ctr;
if (navigator.appName.indexOf("WebTV") == -1)
 {
 if (Ctr == 1)
 {  popup("/popup.htm");}
 if (Ctr == 4)
 {  popup("/pophp.htm");}
if (Ctr == 8)
  {popup("/pop100.htm");}
 if (Ctr == 10)
  {popup("/pophp.htm");}
 if (Ctr == 14)
 {  popup("/popup.htm");}
 if (Ctr == 18)
 {  popup("/pop100.htm");}
 if (Ctr == 20)
 {  popup("/poppmd.htm");}

 if (Ctr < 21)
{SetCookie("FirstVisit", Ctr, expdate, "/", ".surfnetkids.com", false);}
}
}
function popup(page){
window.open(page,'','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=500,height=400')
}



function emailcheck(cur)
{
var string1=cur._FROMEMAIL.value

if (string1.indexOf("@")==-1)
{
alert('Oops! Email address is missing the required @ ("at" sign.)')
return false
}
if (string1.indexOf(".")==-1)
{
alert('Oops! Email address is missing the required . (dot)')
return false
}

}
function Start(page) {
OpenWin = this.open(page, "CtrlWindow", "toolbar=yes,menubar=no,width=510,height=575, location=no,scrollbars=yes,resizable=yes, ");
}

function PopEmail(page) {
OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,width=400,height=320, location=no,scrollbars=yes,resizable=yes, ");
}

// End -->

