function CheckSizeNPA(FormName)
{
	//alert (FormName.DSLPhoneAreaCode.value.length);
	if (FormName.DSLPhoneAreaCode.value.length==3)
	{
		//document.FormName.NXX.Focus();
		document.DSLForm.DSLPhoneFirst.focus();
	}
}
function CheckSizeNXX(FormName)
{
	//alert (FormName.NPA.value.length);
	if (FormName.DSLPhoneFirst.value.length==3)
	{
		//document.FormName.NXX.Focus();
		document.DSLForm.DSLPhoneLast.focus();
	}
}
function CheckSizeSuffix(FormName)
{
	//alert (FormName.NPA.value.length);
	if (FormName.DSLPhoneLast.value.length==4)
	{
		//document.FormName.NXX.Focus();
		document.DSLForm.shopper_email.focus();
	}
}

function validate(DSLForm) 
 {
	//DSLForm.submitButtonName.disabled=true;
		
	var strMsg = "";
	if (DSLForm.DSLPhoneAreaCode.value.length < 3)
	{
		strMsg = strMsg + "\n" + "A 3 digit Area Code is required!";
	}
	
	
	if (DSLForm.DSLPhoneFirst.value.length < 3)  
	{
		strMsg = strMsg + "\n" + "The Second Phone value must be 3 digits long!";
	}
	
	if (DSLForm.DSLPhoneLast.value.length < 4)  
	{
		strMsg = strMsg + "\n" + "The Third Phone value must be 4 digits long!";
	}
	

	if (DSLForm.shopper_email.value =="")  
	{
		strMsg = strMsg + "\n" + "An email address is required!";
	}
	
	/*
	if (DSLForm.shopper_email.value=="")
	{
		strMsg = strMsg + "\n" + "Missing required field (eMail).";
		//return false;
	}
	*/
	else
	{
		var sEmail=new String;
		sEmail=DSLForm.shopper_email.value
		sEmail.toLowerCase();
		if ((sEmail.search("@")==-1) || ((sEmail.search(".net")==-1) && (sEmail.search(".com")==-1) && (sEmail.search(".org")==-1)) )
		{
     		sEmail ="Invalid email address format. Do you want to submit your information with email address supplied?";
			if (window.confirm(sEmail))
			{
	
//window.showModelessDialog("pauseavailability.asp")
       			return true;
      		}
      		else
      		{
      			//DSLForm.submitButtonName.disabled=false;
       			return false;
			}
		}    
	}

	if (strMsg != "")
	{
		alert(strMsg);
		//DSLForm.submitButtonName.disabled=false;
		return false;
	}
	//window.showModelessDialog("pauseavailability.asp")
		
	//return true;
}
	
	function OpenPopUp(url,width,height)
	{
		//alert(url);
		var sFeatures="dialogHeight: " + height + "px;dialogWidth: " + width + "px;";
		window.showModalDialog(url,"",sFeatures);
		//window.showModalDialog(url,"High Speed Internet",'dialogHeight:' + height + 'px;dialogWidth:' + width + 'px;status:no;unadorned:no;help:no;edge:sunken;resizable:yes;scroll:yes;center:yes');
		return false;
	}
	function openpopup1(url)
	{
		var centerWidth=(screen.width/2)-(620/2);
		var centerHeight=(screen.height/2)-(600/2);
		window.open(url, "","height=600,width=620,top="+centerHeight+",left="+centerWidth+",location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=no,toolbar=no,directories=no");
	}
	function openpopup2(url)
	{
		var centerWidth=(screen.width/2)-(620/2);
		var centerHeight=(screen.height/2)-(600/2);
		window.open(url, "","height=600,width=620,top="+centerHeight+",left="+centerWidth+",location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,titlebar=yes,toolbar=yes,directories=yes");
	}
	

