<!-- includes  no Fastclick popup -->
	
<!-- begin
var expDays = 90;
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 = (argc > 2) ? argv[2] : null;  
	var path = (argc > 3) ? argv[3] : null;  
	var domain = (argc > 4) ? argv[4] : null;  
	var secure = (argc > 5) ? 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 DeleteCookie (name) {  
	var exp = new Date();  
	exp.setTime (exp.getTime() - 1);  
	var cval = GetCookie (name);  
	document.cookie = fs + "=" + cval + "; expires=" + exp.toGMTString();
}

var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

function amt(){
	var count = GetCookie('count')
	if(count == null) {
		SetCookie('count','1')
		return 1
	}
	else {
		var newcount = parseInt(count) + 1;
		DeleteCookie('count')
		SetCookie('count',newcount,exp)
		return count
	}
}

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


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


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 == 9)
 {  popup("/popup.htm");}
if (Ctr == 17)
  {popup("/popup.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
}
alert('NOTE: To activate your free subscription, you must respond to the email just sent you titled "[Surfing the Net with Kids] Your Reply Needed"  ')
}

function emailchecknoalert(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 -->

