var gimg;
gimg=0;


var tip=new Array
	tip[0]='Specify the date that you want DSL service<br> to stop working at your current location.'
	tip[1]='Schedule your local telephone service to be<br> active at least 14 days before you want DSL<br> service to start (DSL service cannot start until<br> after compatible local telephone service <br>has been activated).'
   	tip[2]='DSL service at your new location can be<br>scheduled to start as soon as possible after<br>your current DSL stops.'
     	tip[3]='You can request DSL service to start at your new <br>location before service stops at your current location.<br>This will result in overlapping charges for monthly service.<br><br> You can also request DSL service to start at your<br>new location up to 30 days after DSL service stops<br>at your current location.'


function validform1(myform)
{
  var TotalError;
  var Errormsg;
  TotalError=0;
  Errormsg=" ";

   if (myform.First_Name.value == "")
      {
        Errormsg += "First Name" + ", ";
        TotalError = 1;
      }
   if (myform.Last_Name.value == "" )
      {
        Errormsg+= "Last Name" + ", ";
        TotalError = 1;
      }
 
 if (myform.Phone.value == "" || myform.Phone.value.length < 10)
      {
        Errormsg+= "Phone" + ", ";
        TotalError = 1; 
      }
  if (myform.Email.value == "" )
      {
        Errormsg+= "Email" + ", ";
        TotalError = 1; 
      }
        
  if (myform.Address.value == "" )
      {
        Errormsg+= "Address" + ", ";
        TotalError = 1; 
      }
  if (myform.City.value == "" )
      {
        Errormsg+= "City" + ", ";
        TotalError = 1; 
      }
  if (myform.State.value == "" )
      {
        Errormsg+= "State" + ", ";
        TotalError = 1; 
      }
  if (myform.Zip.value == "" || myform.Zip.value.length < 5)
      {
        Errormsg+= "Zip" + "";
        TotalError = 1; 
      }

   if (TotalError != 0)
      {
       alert("Please Enter Valid " + Errormsg);
       return false;
      }
   else
     { 
      return (validEmail(myform.Email.value,'your'))
      //return true;
     }
}


function  checkdslavailability(myform)
{
  var TotalError;
  var Errormsg;
  TotalError=0;
  Errormsg=" ";


   if (myform.Client_First_Name.value == "")
      {
        Errormsg += "First Name" + ", ";
        TotalError = 1;
      }
   if (myform.Client_Last_Name.value == "" )
      {
        Errormsg+= "Last Name" + ", ";
        TotalError = 1;
      }
 
  if (myform.Client_Email.value == "" )
      {
        Errormsg+= "Email" + ", ";
        TotalError = 1; 
      }


   if (TotalError != 0)
      {
       alert("Please Enter Valid " + Errormsg);
       return false;
      }
   else
     { 
      return (validEmail(myform.Client_Email.value,'your'))
      //return true;
     }
}


function msf0(tdthis,imgname)
{ 
 tdthis.bgColor='#FFFFCC';

}

function msf0b(tdthis,imgname)
{ 
 tdthis.bgColor='';

}

function msf1(tdthis,imgname)
{ 
 imgname.src="../images/SnappyDSL_RightArrow_Orange_1.gif";
  tdthis.bgColor='#FFFFCC'; 
}


function msf1b(tdthis,imgname)
{
 imgname.src="../images/Spacer.gif";
  tdthis.bgColor=''; 
}



function msf2(tdthis,imgname)
{ 
  tdthis.bgColor='#FFFFCC';
  imgname.src="../images/SnappyDSL_RightArrow_Orange_1.gif";
 
}
function msf2b(tdthis,imgname)
{

 imgname.src="../images/SnappyDSL_RightArrow_Orange_2.gif";

 tdthis.bgColor='';

}



function goback()
{
 window.history.go(-1);
}


function gofoward()
{
 window.history.go(1);
}

  function pwind()
 { 
  window.print();
 }




// -----------------------------  Valdate -------------------

function vfc(myform)
{
  var TotalError;
  var Errormsg;
  TotalError=0;
  Errormsg=" ";
   //return true;
   if (myform.Contact_FirstName.value == "")
      {
        Errormsg = "First Name" + ", ";
        TotalError = 1;
      }
   if (myform.Contact_LastName.value == "" )
      {
        Errormsg+= "Last Name" + ", ";
        TotalError = 1;
     }
  if (myform.Contact_Phone.value == "" || myform.Contact_Phone.value.length < 10)
      {
        Errormsg+= "Phone" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_Email.value == "" )
      {
        Errormsg+= "Email" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_StreetAddress.value == "" )
      {
        Errormsg+= "Address" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_City.value == "" ) 
      {
        Errormsg+= "City" + ", "; 
        TotalError = 1; 
      }
  if (myform.Contact_State.value == "" )
      {
        Errormsg+= "State" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_ZipCode.value == "" || myform.Contact_ZipCode.value.length < 5)
      {
        Errormsg+= "Zip" + "";
        TotalError = 1; 
      }

   if (TotalError != 0)
      {
       alert("Please Enter Valid " + Errormsg);
       return false;
      }
   else
     { 
      return (validEmail(myform.Contact_Email.value,'your'))
      //return true;
     }
}




function vfc2(myform)
{
  var TotalError;
  var Errormsg;
  TotalError=0;
  Errormsg=" ";
   //return true;


   if (myform.Domain_Name.value == "")
      {
        Errormsg = "Domain Name" + ", ";
        TotalError = 1;
      }
   if (myform.Contact_FirstName.value == "")
      {
        Errormsg += "First Name" + ", ";
        TotalError = 1;
      }
   if (myform.Contact_LastName.value == "" )
      {
        Errormsg+= "Last Name" + ", ";
        TotalError = 1;
     }
  if (myform.Contact_Phone.value == "" || myform.Contact_Phone.value.length < 10)
      {
        Errormsg+= "Phone" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_Email.value == "" )
      {
        Errormsg+= "Email" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_StreetAddress.value == "" )
      {
        Errormsg+= "Address" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_City.value == "" )
      {
        Errormsg+= "City" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_State.value == "" )
      {
        Errormsg+= "State" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_ZipCode.value == "" || myform.Contact_ZipCode.value.length < 5)
      {
        Errormsg+= "Zip" + "";
        TotalError = 1; 
      }

  if (myform.Domain_Reg_Period.value == ""  || isNaN(myform.Domain_Reg_Period.value) )
      {
        Errormsg+= " Domain Reg Period" + "";
        TotalError = 1; 
      }
        
   if (TotalError != 0)
      {
       alert("Please Enter Valid " + Errormsg);
       return false;
      }
   else
     { 
      return (validEmail(myform.Contact_Email.value,'your'))
      //return true;
     }
}


function vfc3(myform)
{
  var TotalError;
  var Errormsg;
  TotalError=0;
  Errormsg=" ";
   //return true;


   if (myform.Account_Name.value == "")
      {
        Errormsg = "Account Name" + ", ";
        TotalError = 1;
      }
   if (myform.Req_IP.value == ""  || isNaN(myform.Req_IP.value)      )
      {
        Errormsg += "How many IP" + ", ";
        TotalError = 1;
      }
   if (myform.IP_Purpose.value == "" )
      {
        Errormsg += "New IP Purpose" + ", ";
        TotalError = 1;
      }
   if (myform.Contact_FirstName.value == "")
      {
        Errormsg += "First Name" + ", ";
        TotalError = 1;
      }
   if (myform.Contact_LastName.value == "" )
      {
        Errormsg+= "Last Name" + ", ";
        TotalError = 1;
     }
  if (myform.Contact_Phone.value == "" || myform.Contact_Phone.value.length < 10)
      {
        Errormsg+= "Phone" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_Email.value == "" )
      {
        Errormsg+= "Email" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_StreetAddress.value == "" )
      {
        Errormsg+= "Address" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_City.value == "" )
      {
        Errormsg+= "City" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_State.value == "" )
      {
        Errormsg+= "State" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_ZipCode.value == "" || myform.Contact_ZipCode.value.length < 5)
      {
        Errormsg+= "Zip" + "";
        TotalError = 1; 
      }
        
   if (TotalError != 0)
      {
       alert("Please Enter Valid " + Errormsg);
       return false;
      }
   else
     { 
      return (validEmail(myform.Contact_Email.value,'your'))
      //return true;
     }
}


function vfc4(myform)
{
  var TotalError;
  var Errormsg;
  TotalError=0;
  Errormsg=" ";
   //return true;


   if (myform.Contact_FirstName.value == "")
      { 
        Errormsg += "First Name" + ", ";
        TotalError = 1;
      }
   if (myform.Contact_LastName.value == "" )
      {
        Errormsg+= "Last Name" + ", ";
        TotalError = 1;
     }
  if (myform.Contact_Phone.value == "" || myform.Contact_Phone.value.length < 10)
      {
        Errormsg+= "Phone" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_Email.value == "" )
      {
        Errormsg+= "Email" + ", ";
        TotalError = 1; 
      }
        

   if (TotalError != 0)
      {
       alert("Please Enter Valid " + Errormsg);
       return false;
      }
   else
     { 
      return (validEmail(myform.Contact_Email.value,'your'))
      //return true;
     }
}




function vfc5(myform)
{
  var TotalError;
  var Errormsg;
  TotalError=0;
  Errormsg=" ";
   //return true;


   if (myform.Account_Name.value == "")
      {
        Errormsg = "Account Name" + ", ";
        TotalError = 1;
      }

   if (myform.Contact_FirstName.value == "")
      {
        Errormsg += "First Name" + ", ";
        TotalError = 1;
      }
   if (myform.Contact_LastName.value == "" )
      {
        Errormsg+= "Last Name" + ", ";
        TotalError = 1;
     }
  if (myform.Contact_Phone.value == "" || myform.Contact_Phone.value.length < 10)
      {
        Errormsg+= "Phone" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_Email.value == "" )
      {
        Errormsg+= "Email" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_StreetAddress.value == "" )
      {
        Errormsg+= "Address" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_City.value == "" )
      {
        Errormsg+= "City" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_State.value == "" )
      {
        Errormsg+= "State" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_ZipCode.value == "" || myform.Contact_ZipCode.value.length < 5)
      {
        Errormsg+= "Zip" + "";
        TotalError = 1; 
      }
        
   if (TotalError != 0)
      {
       alert("Please Enter Valid " + Errormsg);
       return false;
      }
   else
     { 
      return (validEmail(myform.Contact_Email.value,'your'))
      //return true;
     }
}






function vfc6(myform)
{
  var TotalError;
  var Errormsg;
  TotalError=0;
  Errormsg=" ";
   //return true;

  if (myform.Domain_Name.value == "")
      {
        Errormsg = "Domain Name" + ", ";
        TotalError = 1;
      }

   if (myform.Contact_FirstName.value == "")
      {
        Errormsg += "First Name" + ", ";
        TotalError = 1;
      }
   if (myform.Contact_LastName.value == "" )
      {
        Errormsg+= "Last Name" + ", ";
        TotalError = 1;
     }
  if (myform.Contact_Phone.value == "" || myform.Contact_Phone.value.length < 10)
      {
        Errormsg+= "Phone" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_Email.value == "" )
      {
        Errormsg+= "Email" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_StreetAddress.value == "" )
      {
        Errormsg+= "Address" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_City.value == "," )
      {
        Errormsg+= "City" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_State.value == "" )
      {
        Errormsg+= "State" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_ZipCode.value == "" || myform.Contact_ZipCode.value.length < 5)
      {
        Errormsg+= "Zip" + "";
        TotalError = 1; 
      }
        
   if (TotalError != 0)
      {
       alert("Please Enter Valid " + Errormsg);
       return false;
      }
   else
     { 
      return (validEmail(myform.Contact_Email.value,'your'))
      //return true;
     }
}



function valFormoky(uEmail)
{  
   if (validEmail(Contact_Email,'your') == false) { return false; }
}


function validEmail(vEmail,vName)
{
	var i=0;
	var inC = "/:,;,#,~$,%,^,&,*,+,|,[,],{,},`,;,:,(,)";
	var atPos = vEmail.indexOf("@",1);
	var pPos = vEmail.indexOf(".",atPos);
	for (i=0; i<inC.length; i++)
	{ badChar = inC.charAt(i)
		if (vEmail.indexOf(badChar,0) > -1)
		{ alert ("Please enter a valid "+vName+"'s email address.");return false; }
	}
	if (atPos == -1) { alert("Please enter a valid "+vName+"'s email address. (including '@')");return false; }
	if (vEmail.indexOf("@",atPos+1) > -1) { alert("Please enter a valid "+vName+"'s email address (including '@').");return false; }
	if (pPos == -1) { alert("Please enter a valid "+vName+"'s email address. (including '.')");return false; }
	if (pPos+3 > vEmail.length) { alert("Please enter a valid "+vName+"'s email address.('.com', '.net', etc.)");return false; }
}




function vfc7(myform)
{
  var TotalError;
  var Errormsg;
  TotalError=0;
  Errormsg=" ";
   //return true;



   if (myform.Contact_FirstName.value == "")
      {
        Errormsg += "Full Name" + ", ";
        TotalError = 1;
      }
  if (myform.Contact_Phone.value == "" || myform.Contact_Phone.value.length < 10)
      {
        Errormsg+= "Phone" + ", ";
        TotalError = 1; 
      }
  if (myform.Contact_Email.value == "" )
      {
        Errormsg+= "Email" + ", ";
        TotalError = 1; 
      }
       
  if (myform.O_DSL_Phone.value == "" )
      {
        Errormsg+= "Current DSL Phone" + ", ";
        TotalError = 1; 
      }
  if (myform.O_Contact_StreetAddress.value == "" )
      {
        Errormsg+= "Current Contact Street Address" + ", ";
        TotalError = 1; 
      }


  if (myform.O_Contact_City.value == "" )
      {
        Errormsg+= "Current Contact City" + ", ";
        TotalError = 1; 
      }

  if (myform.O_Contact_State.value == "" )
      {
        Errormsg+= "Current Contact State" + ", ";
        TotalError = 1; 
      }
  if (myform.O_Contact_ZipCode.value == "" )
      {
        Errormsg+= "Current Contact Zip" + ", ";
        TotalError = 1; 
      }
//** new DSL Ph V
  if (myform.N_DSL_Phone.value == "" )
      {
        Errormsg+= "New DSL Phone" + ", ";
        TotalError = 1; 
      }
  if (myform.N_Contact_StreetAddress.value == "" )
      {
        Errormsg+= "New Contact Street Address" + ", ";
        TotalError = 1; 
      }


  if (myform.N_Contact_City.value == "" )
      {
        Errormsg+= "New Contact City" + ", ";
        TotalError = 1; 
      }

  if (myform.N_Contact_State.value == "" )
      {
        Errormsg+= "New Contact State" + ", ";
        TotalError = 1; 
      }
  if (myform.N_Contact_ZipCode.value == "" )
      {
        Errormsg+= "New Contact Zip" + ", ";
        TotalError = 1; 
      }




   if (TotalError != 0)
      {
       alert("Please Enter Valid " + Errormsg);
       return false;
      }
   else
     { 
        return ValidateForm(myform.Cancel_Date)
       //return (validEmail(myform.Contact_Email.value,'your'))	
      //return true;
     }

}








// ----------------------  date    ------------------

var dtCh= "/";
var minYear=00;
var maxYear=99;

function isInteger(s){
	var i;
    for (i = 0; i < s.length; i++){   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag){
	var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++){   
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function daysInFebruary (year){
	// February has 29 days in any year evenly divisible by four,
    // EXCEPT for centurial years which are not also divisible by 400.
    return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );
}
function DaysArray(n) {
	for (var i = 1; i <= n; i++) {
		this[i] = 31
		if (i==4 || i==6 || i==9 || i==11) {this[i] = 30}
		if (i==2) {this[i] = 29}
   } 
   return this
}

function isDate(dtStr){
	var daysInMonth = DaysArray(12)
	var pos1=dtStr.indexOf(dtCh)
	var pos2=dtStr.indexOf(dtCh,pos1+1)
	var strMonth=dtStr.substring(0,pos1)
	var strDay=dtStr.substring(pos1+1,pos2)
	var strYear=dtStr.substring(pos2+1)
	strYr=strYear
	if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1)
	if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1)
	for (var i = 1; i <= 3; i++) {
		if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1)
	}
	month=parseInt(strMonth)
	day=parseInt(strDay)
	year=parseInt(strYr)
	if (pos1==-1 || pos2==-1){
		alert("The date format should be : mm/dd/yy for 'Stop Date'")
		return false
	}
	if (strMonth.length<1 || month<1 || month>12){
		alert("Please enter a valid month for 'Stop Date'")
		return false
	}
	if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
		alert("Please enter a valid day for 'Stop Date'")
		return false
	}
	if (strYear.length != 2 || year==0 || year<minYear || year>maxYear){
		alert("Please enter a valid 2 digit year between "+minYear+" and "+maxYear+" for Stop Date")
		return false
	}
	if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
		alert("Please enter a valid date for 'Stop Date'")
		return false
	}
return true
}

function ValidateForm(dt){
	// var dt=document.frmSample.txtDate
	if (isDate(dt.value)==false){
		//document.dt.focus()
		return false
	}
    return true
 }


// ---------------------  date end ----------------













































function tech_dsl_downloadcenter(x)
{

if (x ==  1 )
   {
	windowlink = "ftp://ftp.snappydsl.net/ADSL/"
   }
if (x ==  2 )
   {
	windowlink = "http://www.microsoft.com/windows95/downloads/contents/WURecommended/S_WUNetworking/dunwinsky2k/Default.asp"
   }
if (x ==  3 )
   {
	windowlink = "http://microsoft.com/windows/ie/default.htm"
   }
if (x ==  4 )
   {
	windowlink = "http://home.netscape.com/download/"
   }
if (x ==  5 )
   {
	windowlink = "http://www.pcworld.com/downloads/file_description/0,fid,5431,00.asp"
   }
if (x ==  6 )
   {
	windowlink = "http://www.netswitcher.com/"
   }
if (x ==  7 )
   {
	windowlink = "http://www.ipswitch.com/downloads/index.html"
   }


	var w1 = window.open(windowlink, "w1", "width=640,height=480,scrollbars=yes,toolbar=yes");
	w1.focus();

}






function openwind(x)
{
// alert(x);
if (x ==  0 )
   {
	 var winmail = window.open("http://mail.cofs.net", "winmail", "width=700, height=500, scrollbars=yes, menubar=yes, toolbar=yes,location=yes, resizable=yes");
   	 winmail.focus();
   }
if (x ==  1 )
   {
	 var winelearning = window.open("http://link.mindleaders.com/e-learn/default.asp?associd=COMPUT053", "winelearning", "width=750, height=500, scrollbars=yes, resizable=yes,toolbar,menubar=yes,resizable=yes");
   	 winelearning.focus();
   }
if (x ==  2 )
   {
	 var contactus = window.open("/SnappyDSL_contactus2.asp", "contactus", "width=700, height=500, scrollbars=yes, toolbar=no,location=no, resizable=yes");
   	 contactus.focus();
   }


if (x ==  3 )
   {
	 var sp = window.open("/services_DSL_Special1_Form.asp", "sp", "width=720, height=550, status=yes, scrollbars=yes, menubar=yes, toolbar=yes,location=yes, resizable=yes");
   	 sp.focus();
   }


}




function help(x)
{

if (x ==  0 )
   {
	movedslhelp = "/htms/Movedslhelp.htm#canceldsl"
   }
if (x ==  2 )
   {
	movedslhelp = ""
   }
	var movedslhelp = window.open(movedslhelp, "movedslhelp", "width=400,height=350,scrollbars=yes,toolbar=yes");
	movedslhelp.focus();
}




function helpplan(x)
{

if (x ==  0 )
   {
	helpplan = "/htms/helpplan.htm"
   }
if (x ==  1 )
   {
	helpplan = "/htms/helpplan.htm#1"
   }
if (x ==  2 )
   {
	helpplan = "/htms/helpplan.htm#2"
   }
if (x ==  3 )
   {
	helpplan = "/htms/helpplan.htm#3"
   }
if (x ==  4 )
   {
	helpplan = "/htms/helpplan.htm#4"
   }
if (x ==  5 )
   {
	helpplan = "/htms/helpplan.htm#5"
   }
if (x ==  6 )
   {
	helpplan = "/htms/helpplan.htm#6"
   }
if (x ==  7 )
   {
	helpplan = "/htms/helpplan.htm#7"
   }

	var helpplan = window.open(helpplan, "helpplan", "width=400,height=350,scrollbars=yes,toolbar=no");
	helpplan.focus();
}





    function showtipold(current,e,num)
        {
         if (document.layers) 
            {
             theString="<DIV CLASS='ttip'>"+tip[num]+"</DIV>"
             document.tooltip.document.write(theString)
             document.tooltip.document.close()
             document.tooltip.left=e.pageX+14
             document.tooltip.top=e.pageY+2
             document.tooltip.visibility="show"
            }
         else
           {
            if(document.getElementById) 
              {
               elm=document.getElementById("tooltip")
               elml=current
               elm.innerHTML=tip[num]
               elm.style.height=elml.style.height
             if(navigator.appName == "Netscape")
              {
               elm.style.top=parseInt(elml.offsetTop+elml.offsetHeight)
               elm.style.left=parseInt(elml.offsetLeft+elml.offsetWidth+10)
              }
             if (document.all)  
              { elm.style.pixelLeft=event.clientX+document.body.scrollLeft+10
			   elm.style.pixelTop=event.clientY+document.body.scrollTop+10
			  }
               elm.style.visibility = "visible"
              }
           }
        }





   function showtip(current,e,num)
        {
         if (document.layers) 
            {
             theString="<DIV CLASS='ttip'>"+tip[num]+"</DIV>"
             document.tooltip.document.write(theString)
             document.tooltip.document.close()
             document.tooltip.left=e.pageX+14
             document.tooltip.top=e.pageY+2
             document.tooltip.visibility="show"
            }
         else
           {
            if(document.getElementById) 
              {
               elm=document.getElementById("tooltip")
               elml=current
               elm.innerHTML=tip[num]
               elm.style.height=elml.style.height
             	if(navigator.appName == "Netscape")
              	   {

               		 elm.style.top=parseInt(elml.offsetTop+elml.offsetHeight)
               		 elm.style.left=parseInt(elml.offsetLeft+elml.offsetWidth+10)
              	   }    
             	if (document.all)  
              	  { 
			document.all.tooltip.style.pixelLeft=event.clientX+document.body.scrollLeft+10
			document.all.tooltip.style.pixelTop=event.clientY+document.body.scrollTop+10
			document.all.tooltip.style.visibility = "visible"
		  }
               elm.style.visibility = "visible"
              }
           }
        }






function hidetip(){
if (document.layers) 
   {
    document.tooltip.visibility="hidden"
   }
else
  {
   if(document.getElementById)      {
      elm.style.visibility="hidden"
     }
  } 
}

function rtf(x)
  {
	if (x==0)
	    return false
	if (x==1)
	    return true
  }



function VerifyDSLNo(myform)
    { 
	var totalerror;
	totalerror=0
      if(myform.DSL_NO.value.length != 3 )
        {alert("Please Enter Valid Ph no ");
	 document.forms.DSL_NO.focus();
	 totalerror++;
	}

      if(myform.DSL_NO1.value.length != 3 )
        {alert("Please Enter Valid Ph no ");
	 document.forms.DSL_NO1.focus();
	 totalerror++;
	}
      if(myform.DSL_NO2.value.length != 4 )
        {alert("Please Enter Valid Ph no ");
	 document.forms.DSL_NO2.focus();
	 totalerror++;
	}
   if(totalerror != 0)
	return false;
   else
	{myform.submit();
	return true;}


 }


function atab(x, y, xs)
  {
    if (x.value.length == xs)
    y.focus();
  }

function atab2(x, y, xs)
  {
    if (x.value.length == xs)
    y.focus();
  }


function dslchecksubmit(myform)

{
var totalerror;
	totalerror=0
      if(myform.DSL_NO.value.length != 3)
	 totalerror++;
      if(myform.DSL_NO1.value.length != 3 )
	 totalerror++;
      if(myform.DSL_NO2.value.length != 4 )
	 totalerror++;	

   if(totalerror != 0)
	alert("Please Enter Valid Phone No ");

   if(totalerror == 0)
        dslcheck_openwind(1) 
	
}


function dslcheck_openwind(x)
{
   
if (x == 1)
   {
    var wn;
	wn= "/dslcheck.asp?";
	wn+= "DSL_NO="  + document.dslcheck.DSL_NO.value;
	wn+= "&DSL_NO1="+ document.dslcheck.DSL_NO1.value;
	wn+= "&DSL_NO2="+ document.dslcheck.DSL_NO2.value;
	wn+= "&Go=Go";

    var dslcheckwin = window.open(wn, "dslcheckwin", "width=750, height=500, scrollbars=yes, resizable=yes");
    dslcheckwin.focus();
	
   }
}





function dslchecksubmit2(myform)

{
var totalerror;
	totalerror=0
      if(myform.DSL_NO.value.length != 3)
	 totalerror++;
      if(myform.DSL_NO1.value.length != 3 )
	 totalerror++;
      if(myform.DSL_NO2.value.length != 4 )
	 totalerror++;	

   if(totalerror != 0)
	alert("Please Enter Valid Phone No ");

   if(totalerror == 0)
        dslcheck_openwind2(1) 
	
}


function dslcheck_openwind2(x)
{
   
if (x == 1)
   {
    var wn;
	wn= "/dslcheck.asp?";
	wn+= "DSL_NO="  + document.dslcheck2.DSL_NO.value;
	wn+= "&DSL_NO1="+ document.dslcheck2.DSL_NO1.value;
	wn+= "&DSL_NO2="+ document.dslcheck2.DSL_NO2.value;
	wn+= "&Go=Go";

    var dslcheckwin = window.open(wn, "dslcheckwin", "width=750, height=500, scrollbars=yes, resizable=yes");
    dslcheckwin.focus();
	
   }
}


function dtv(myform)
{

/* alert(document.forms[0].Modem_Need[0].checked)

*/


 if(document.forms[0].Modem_Need.checked)
   {
     document.forms[0].Promotion.value="$159.00"
     document.forms[0].Total_One_Time_Charge.value = "$0.00"
     document.forms[0].Modem.value = "$0.00"
     
   }
 if(document.forms[0].Modem_Need2.checked)
   {
     document.forms[0].Promotion.value="$309.00"
     document.forms[0].Total_One_Time_Charge.value = "$58.95"
     document.forms[0].Modem.value = "$208.95"
     
   }
  
document.forms[0].Activation.value = "$159.00"

}



function dtv31(myform)
{

/* alert(document.forms[0].Modem_Need[0].checked)

*/


 if(document.forms[0].Modem_Need.checked)
   {
     document.forms[0].Promotion.value="$100.00"
     document.forms[0].Total_One_Time_Charge.value = "$59.00"
     document.forms[0].Modem.value = "$0.00"
     
   }
 if(document.forms[0].Modem_Need2.checked)
   {
     document.forms[0].Promotion.value="$200.00"
     document.forms[0].Total_One_Time_Charge.value = "$167.95"
     document.forms[0].Modem.value = "$208.95"
     
   }
  
document.forms[0].Activation.value = "$159.00"

}







function dtvcheck()
{
   if (document.forms[0].Modem_Need.checked)
	document.forms[0].Modem_Need2.checked=false

   if (!document.forms[0].Modem_Need.checked)
	document.forms[0].Modem_Need2.checked=true

   
}

function dtvcheck2()
{
   if (document.forms[0].Modem_Need2.checked)
	document.forms[0].Modem_Need.checked=false

   if (!document.forms[0].Modem_Need2.checked)
	document.forms[0].Modem_Need.checked=true
}


function dtvplan()
{
   if (document.forms[0].Plan.checked)
	document.forms[0].Plan2.checked=false

   if (!document.forms[0].Plan.checked)
	document.forms[0].Plan2.checked=true
   
}

function dtvplan2()
{
   if (document.forms[0].Plan2.checked)
	document.forms[0].Plan.checked=false

   if (!document.forms[0].Plan2.checked)
	document.forms[0].Plan.checked=true
}





function dtvvalid()
{
  var TotalError;
  var Errormsg;
  TotalError=0;
  Errormsg=" ";

  if( document.forms[0].First_Last_Name.value == "")
      {
        Errormsg += "Full Name" + ", ";
        TotalError++;
      }
  if( document.forms[0].Title.value == "None")
      {
        Errormsg += "Title" + ", ";
        TotalError++;
      }

  if( document.forms[0].Day_Ph.value == "")
      {
        Errormsg += "Day Time Ph#" + ", ";
        TotalError++;
      }
  if( document.forms[0].Address.value == "")
      {
        Errormsg += "Address" + ", ";
        TotalError++;
      }

  if( document.forms[0].City.value == "")
      {
        Errormsg += "City" + ", ";
        TotalError++;
      }
  if( document.forms[0].Zip.value == "")
      {
        Errormsg += "Zip" + ", ";
        TotalError++;
      }
  if( document.forms[0].DSL_Phone.value == "")
      {
        Errormsg += "DsL Phone#" + ", ";
        TotalError++;
      }

/*  if(! (document.forms[0].Payment_Method.checked || document.forms[0].Payment_Method1.checked || document.forms[0].Payment_Method2.checked) )
      {
        Errormsg += "Payment Method" + ", ";
        TotalError++;
      }

*/
  if( document.forms[0].Address.value == "")
      {
        Errormsg += "Card Address" + ", ";
        TotalError++;
      }

  if( document.forms[0].Card_No.value == "")
      {
        Errormsg += "Card No" + ", ";
        TotalError++;
      }

  if( document.forms[0].Card_Exp_Date.value == "")
      {
        Errormsg += "Card Exp DAte" + ", ";
        TotalError++;
      }


  if( document.forms[0].Card_Holder.value == "")
      {
        Errormsg += "Card Holder" + ", ";
        TotalError++;
      }

  if( document.forms[0].Card_CvvNo.value == "")
      {
        Errormsg += "Card CVV No" + ", ";
        TotalError++;
      }

  if( document.forms[0].Card_City.value == "")
      {
        Errormsg += "Card City" + ", ";
        TotalError++;
      }
  if( document.forms[0].Card_Zip.value == "")
      {
        Errormsg += "Card Zip" + ", ";
        TotalError++;
      }


  if(TotalError !== 0)
    {
     alert("Please Enter Valid " + Errormsg)
    }
  if(TotalError == 0)
    {
     pwind();
    }
 
}


