
function pop()
{
var newWin;

	newWin =window.open("Subscribers.asp","kidWin",'resizable=no,scrollbars=no,width=10,height=10,toolbar=no')
}

//  Function to validate Emails
function CheckEmail (fieldName,emailStr) {
var emailPat=/^(.+)@(.+)$/
var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
var validChars="\[^\\s" + specialChars + "\]"
var quotedUser="(\"[^\"]*\")"
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
var atom=validChars + '+'
var word="(" + atom + "|" + quotedUser + ")"
var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
var matchArray=emailStr.match(emailPat)

/**This won't work, don't know why
var emailVal = fieldName.value.length
if (emailVal==0) { 
	alert("Email address can not be empty")
   	//fieldName.select();
	fieldName.focus();
	return false
}
**/
if (matchArray==null) {
	alert("Email address seems incorrect (check @ and .'s)")
	//alert(emailVal)
   	fieldName.select();
	fieldName.focus();
	return false
}
var user=matchArray[1]
var domain=matchArray[2]

if (user.match(userPat)==null) {
    alert("The username doesn't seem to be valid.")
    fieldName.select();
    fieldName.focus();
    return false
}
var IPArray=domain.match(ipDomainPat)
if (IPArray!=null) {
	  for (var i=1;i<=4;i++) {
	    if (IPArray[i]>255) {
	        alert("Destination IP address is invalid!")
		fieldName.select();
		fieldName.focus();
		return false
	    }
    }
    return true
}
var domainArray=domain.match(domainPat)
if (domainArray==null) {
	alert("The domain name doesn't seem to be valid.")
	 	fieldName.select();
	fieldName.focus();
    return false
}
var atomPat=new RegExp(atom,"g")
var domArr=domain.match(atomPat)
var len=domArr.length
if (domArr[domArr.length-1].length<2 || 
    domArr[domArr.length-1].length>3) {
   alert("The address must end in a three-letter domain, or two letter country.")
   fieldName.select();
   fieldName.focus();
   return false
}
if (len<2) {
   var errStr="This address is missing a hostname!"
   alert(errStr)
   fieldName.select();
   fieldName.focus();
   return false
}
return true;
}

theDate= new Date();
years = new Array();
months = new Array();
days = new Array();
years[90] ="year_09.gif"; //not to use this line
years[10] ="year_10.gif";
years[11] ="year_11.gif";
years[12] ="year_12.gif";
years[13] ="year_13.gif";
years[14] ="year_14.gif";
years[15] ="year_15.gif";
years[16] ="year_16.gif";
years[17] ="year_17.gif";
years[18] ="year_18.gif";
years[19] ="year_19.gif";
years[20] ="year_20.gif";
months[1] ="Jan.gif";
months[2] ="Feb.gif";
months[3] ="Mar.gif";
months[4] ="Apr.gif";
months[5] ="May.gif";
months[6] ="Jun.gif";
months[7] ="Jul.gif";
months[8] ="Aug.gif";
months[9] ="Sep.gif";
months[10] ="Oct.gif";
months[11] ="Nov.gif";
months[12] ="Dec.gif";
days[1] ="01.gif";
days[2] ="02.gif";
days[3] ="03.gif";
days[4] ="04.gif";
days[5] ="05.gif";
days[6] ="06.gif";
days[7] ="07.gif";
days[8] ="08.gif";
days[9] ="09.gif";
days[10] ="10.gif";
days[11] ="11.gif";
days[12] ="12.gif";
days[13] ="13.gif";
days[14] ="14.gif";
days[15] ="15.gif";
days[16] ="16.gif";
days[17] ="17.gif";
days[18] ="18.gif";
days[19] ="18.gif";
days[20] ="20.gif";
days[21] ="21.gif";
days[22] ="22.gif";
days[23] ="23.gif";
days[24] ="24.gif";
days[25] ="25.gif";
days[26] ="26.gif";
days[27] ="27.gif";
days[28] ="28.gif";
days[29] ="29.gif";
days[30] ="30.gif";
days[31] ="31.gif";
function printDate() {
document.write('<img src="images/quality_score_main/' + days[theDate.getDate()] + '">'); // day
}
function printMonth() {
document.write('<img src="images/quality_score_main/' + months[theDate.getMonth()+1] + '">'); // month
}

function printYear() {
var curYear = theDate.getFullYear();
curYear = curYear.toString().slice(2);
if (curYear == "09"){
document.write('<img src="images/quality_score_main/year_09.gif" WIDTH=23 HEIGHT=21>'); // year
} else {
document.write('<img src="images/quality_score_main/' + years[curYear] + '" WIDTH=23 HEIGHT=21>'); // year
}
}

function removeTexts(el)
{
	if(el.V) {
		if (el.value == el.V) {
		el.value = '';
		}
	} else {
	el.V = el.value;
	el.value = '';
	}
}