//========================================================================================
// Form fix (Feb 10, 2005)
// closes any previously opened form tag.
//========================================================================================
document.write("</form>")
//========================================================================================
// Incialize necessary variables
//========================================================================================
    var strhidSection;
	var partnerID;
	var filter;
	var style;
	var qualifytitle;
	var bbnhome;
	var bbnbusiness;
	var bbnenterprise;
	var form;
	var shortform;
	var ipd;
	var logoHide;
	var logo;
	
//========================================================================================
// The following is used to parse the "src=" and grab params that need to be used for this funtion
//========================================================================================

	var scripts = document.getElementsByTagName('script');
	var myScript = scripts[ scripts.length - 1 ];
	
	var queryString = myScript.src.replace(/^[^\?]+\??/,'');
	queryString = queryString.replace(/\<span class\=/ig, '<span class||||');
	
	var params = parseQuery( queryString );
	
	function parseQuery ( query ) {
	   var Params = new Object ();
	   if ( ! query ) return Params; // return empty object
	   var Pairs = query.split(/[;&]/);
	   for ( var i = 0; i < Pairs.length; i++ ) {
		  var KeyVal = Pairs[i].split('=');
		  if ( ! KeyVal || KeyVal.length != 2 ) continue;
		  var key = unescape( KeyVal[0] );
		  var val = unescape( KeyVal[1] );
		  val = val.replace(/\+/g, ' ');
		  val = val.replace(/\<span class\|\|\|\|/ig, '<span class=');
		  Params[key] = val;
	   }
	   return Params;
	}

//========================================================================================
// Set Variables
//========================================================================================

	if (typeof(params['id']) != 'undefined' && params['id'] != '')	{ partnerID = params['id'].toLowerCase(); }
		else { partnerID = 'BBN'; }
		
	if (typeof(params['filter']) != 'undefined' && params['filter'] != '')	{ filter = params['filter']; }
		else { filter = ''; }
	
	if (typeof(params['rtext']) != 'undefined' && params['rtext'] != '')	{ rtext = params['rtext']; }
		else { rtext = 'Home'; }
	
	if (typeof(params['btext']) != 'undefined' && params['btext'] != '')	{ btext = params['btext']; }
		else { btext = 'Business'; }
	
	if (typeof(params['style']) != 'undefined' && params['style'] != '')	{ style = params['style']; }
		else { style = ''; }
	
	if (typeof(params['title']) != 'undefined' && params['title'] != '')	{ qualifytitle = params['title']; }
		else { qualifytitle = 'Get Real Time Quotes For Broadband'; }
	
	if (typeof(params['home']) != 'undefined' && params['home'] != '')	{ bbnhome = params['home']; }
		else { bbnhome = 'true'; }
	
	if (typeof(params['business']) != 'undefined' && params['business'] != '')	{ bbnbusiness = params['business']; }
		else { bbnbusiness = 'true'; }
	
	if (typeof(params['enterprise']) != 'undefined' && params['enterprise'] != '')	{ bbnenterprise = params['enterprise']; }
		else { bbnenterprise = 'true'; }
	
	if (typeof(params['form']) != 'undefined' && params['form'] != '')	{ form = params['form']; }
		else { form = ''; }
	
	if (typeof(params['NoPhone']) != 'undefined' && params['NoPhone'] != '')	{ bbnNoPhone = params['NoPhone']; }
		else { bbnNoPhone = 'false'; }

	bbnNoPhone = 'false';

	if (typeof(params['moved']) != 'undefined' && params['moved'] != '')	{ moved = params['moved']; }
		else { moved = 'true'; }

	if (typeof(params['test']) != 'undefined' && params['test'] != '')	{ test = params['test']; }
		else { test = 'www.broadbandnational.com'; }
	
	if (typeof(params['optin']) != 'undefined' && params['optin'] != '')	{ optin = params['optin']; }
		else { optin = 'true'; }

	if (typeof(params['optin_check']) != 'undefined' && params['optin_check'] != '')	{ optin_check = params['optin_check']; }
		else { optin_check = 'false'; }

	if (typeof(params['checktext']) != 'undefined' && params['checktext'] != '')	{ checktext = params['checktext']; }
		else { checktext = 'Yes, I\'d like to receive updates on special broadband offers or availability in my area.'; }
	
	if (typeof(params['shortform']) != 'undefined' && params['shortform'] != '')	{ shortform = params['shortform']; }
		else { shortform = 'false'; }
	
	if (typeof(params['extrafield']) != 'undefined' && params['extrafield'] != '')	{ extrafield = params['extrafield']; }
		else { extrafield = 'false'; }
	
	if (typeof(params['extrafieldtext']) != 'undefined' && params['extrafieldtext'] != '')	{ extrafieldtext = params['extrafieldtext']; }
		else { extrafieldtext = 'Extra Field:'; }
	
	if (typeof(params['extrafieldrequired']) != 'undefined' && params['extrafieldrequired'] != '')	{ extrafieldrequired = params['extrafieldrequired']; }
		else { extrafieldrequired = 'false'; }
	
	if (typeof(params['ipd']) != 'undefined' && params['ipd'] != '')	{ ipd = params['ipd']; }
		else { ipd = 'false'; }
	
	if (typeof(params['nocallback']) != 'undefined' && params['nocallback'] != '')	{ nocallback = params['nocallback']; }
		else { nocallback = 'false'; }
	
	if (typeof(params['nocallbackhome']) != 'undefined' && params['nocallbackhome'] != '')	{ nocallbackhome = params['nocallbackhome']; }
		else { nocallbackhome = 'false'; }
	
	if (typeof(params['nocallbackbusiness']) != 'undefined' && params['nocallbackbusiness'] != '')	{ nocallbackbusiness = params['nocallbackbusiness']; }
		else { nocallbackbusiness = 'false'; }
	
	if (typeof(params['call_back']) != 'undefined' && params['call_back'] != '')	{ call_back = params['call_back']; }
		else { call_back = 'false'; }
	
	if (typeof(params['call_back_text']) != 'undefined' && params['call_back_text'] != '')	{ call_back_text = params['call_back_text']; }
		else { call_back_text = 'I would like to have a Broadband consultant contact me back for further assistance.'; }
	
	if (typeof(params['call_back_checked']) != 'undefined' && params['call_back_checked'] != '')	
		{ 
			if (params['call_back_checked'].toLowerCase() == 'true')
			{
				call_back_checked = 'checked';
			}
			else
			{
				call_back_checked = '';
			}
		}
		else { call_back_checked = 'checked'; }
	

	 // ===============================
	 // Call Back Black List
	 // ===============================
			if((partnerID == "covad") || (partnerID == "fhtm") || (partnerID == "fionda")){
				call_back_checked = "";
			}
			if((partnerID == "comcast_cj")){
				call_back_checked = "checked";
			}
			
			if ( (partnerID.indexOf('covad-') != -1) || (partnerID.indexOf('1090-') != -1) || (partnerID.indexOf('5linx-') != -1) || (partnerID.indexOf('fionda-') != -1) || (partnerID.indexOf('elephant2-') != -1) || (partnerID.indexOf('elephant3-') != -1) || (partnerID.indexOf('fhtm-') != -1) )
			{
				call_back_checked = '';
			}
			

	// ================================
	
	if (typeof(params['openin']) != 'undefined' && params['openin'] != '')	{ openin = params['openin']; }
	else { openin = 'default'; }
	
	// =================================
	
	if (typeof(params['img']) != 'undefined' && params['img'] != '')	{ img = params['img']; }
	else { img = 'default'; }
	
	// =================================
	
	if (typeof(params['logoHide']) != 'undefined' && params['logoHide'] != '')	{ logoHide = params['logoHide']; }
	else { logoHide = 'false'; }
	
	// =================================
	
	if (partnerID.indexOf('mlm-') != -1)	{ mlm_code = partnerID.replace(/mlm-/, ''); }
	else { mlm_code = ''; }
	
	// === DEFAULT SERVICE ==============================
	
	if (typeof(params['DefaultServ']) != 'undefined' && params['DefaultServ'] != '')	{ DefaultServ = params['DefaultServ']; }
	else { DefaultServ = 'home'; }
	
	// === LOGO =======================================
	//   Changes the display of the provider logos on the results page
	//   Added on 4-18-2006
	
	if (typeof(params['logo']) != 'undefined' && params['logo'] != '')	{ logo = params['logo']; }
	else { logo = '1000'; }
	
	if (typeof(params['debug']) != 'undefined' && params['debug'] != '')	{ debug = params['debug']; }
	else { debug = 'false'; }
	
	// === Salesteam Additional Information Flag ========================
	//   Adds more information to the Results page so that salesteam agents obtain additional information regarding the qual
	//   Added on 6/20/2006
	
	if (typeof(params['salesteam']) != 'undefined' && params['salesteam'] != '')	{ salesteam = params['salesteam']; }
	else { salesteam = 'N'; }
	
	// === Customized Text for Qual Form ================================
	// Added July 14, 2006
	
	if (typeof(params['ServicePhoneText']) != 'undefined' && params['ServicePhoneText'] != '')	{ ServicePhoneText = params['ServicePhoneText']; }
	else { ServicePhoneText = 'Enter Service Phone:'; }
	
	if (typeof(params['ContactNumberText']) != 'undefined' && params['ContactNumberText'] != '')	{ ContactNumberText = params['ContactNumberText']; }
	else { ContactNumberText = 'Contact Number:'; }
	
	if (typeof(params['EnterEmailText']) != 'undefined' && params['EnterEmailText'] != '')	{ EnterEmailText = params['EnterEmailText']; }
	else { EnterEmailText = 'Enter Your Email:'; }
	
	if (typeof(params['ContactNameText']) != 'undefined' && params['ContactNameText'] != '')	{ ContactNameText = params['ContactNameText']; }
	else { ContactNameText = 'Contact Name:'; }
	
// === Load Powered by IBIS or BBN =======================================================
//  Updated: July  17, 2006
	
	if (typeof(params['PoweredBy']) != 'undefined' && params['PoweredBy'] != '')	{ PoweredBy = params['PoweredBy']; }
	else { PoweredBy = 'http://www.broadbandnational.com/images/bbn88x31powered.gif'; }
		

//========================================================================================
// qualification form functions
//========================================================================================

////// Targus.asp?ContactName=test&ServicePhone=1234567890&Email=test@test.com&ContactPhone=1234567890&Type=home&referring_partner=dslcity 
///// General Note 
///// 1. The controls in input.asp  and HomePage.asp are with same name hence 
/////    a single function in validation.js  "checkHomePageInputValues()" is used

// Function Name  : CallTargus  
// Description    : This function constructs a url for redirection with relevent form values after checking the validations
// Author          : S.M.P.Gokulnath
// Created Date    :  Sep -09- 2004
// Last modified  : June 30, 2005 by David Rodriguez

// Required Variables:
//      	partnerID    - Afiliate Identification
//      	filter       - code to filter service providers in results page

// This function determines how to return the results page after a qualification.
//    Self and Defualt  - returns results on the same page
//    Parent            - returns results on a parent page (such as the top level of a frame or iframe page)
//    New               - returns results in a pop or new winodw.
// Created by David Rodriguez
// Last Modified: June 30, 2005
function RedirectPage(strlocation) {
	switch (openin) {
	case 'self': location.href = strlocation; break;
	case 'parent': parent.location.href=strlocation; break;
	case 'new': window.open(strlocation); break;
	default: location.href = strlocation;
	}
}

function GetAddress(strlocation) {
	strRedirURL = "http://www.broadbandnational.com/business/targus.asp?location=" + strlocation + "&ServicePhone=" + document.IndexForm.DSLPhoneAreaCode.value + document.IndexForm.DSLPhoneFirst.value +document.IndexForm.DSLPhoneLast.value;
	RedirectPage(strRedirURL);
}

//This function will check if particular object is defined or available or not, if available
//return true and if not available return false
function isDefined(uObject)
{
	return typeof(uObject) == "undefined" ? false:true;	
}

// This function allows the value of the extrafield input box to append to the partnerID var 
function updatePartnerID()
{
	if (isDefined(document.IndexForm.extrafield) == true)	{
		if (document.IndexForm.extrafield.value != "") {
			if (partnerID.indexOf("-") != -1)	{
				partnerID = partnerID + ":" + document.IndexForm.extrafield.value;
			} else {
			partnerID = partnerID + "-" + document.IndexForm.extrafield.value;
			}
		}
	}
}

function CallTargus()
{
	// appends extrafiled value (if it exists) to the partnerID variable
	updatePartnerID();
	
	var str_call_back;
	str_call_back="N";
	
	if (isDefined(document.IndexForm.call_back) == true)
	{
		if (document.IndexForm.call_back.checked == true)
		{
			str_call_back = "Y";
		}
		else
		{
			str_call_back = "N";
		}
	}
	else
	{
		str_call_back = "Y";
	}
	if (document.IndexForm.rbhome.checked==false &&  document.IndexForm.rbbusiness.checked==false)
	{
		alert("Please Select  'Qualify Service for'  ");
		document.IndexForm.rbhome.focus();
		return;
	}
	var strhidSection;
		if (document.IndexForm.rbhome.checked==true)
		{
			strhidSection = "home"
		}
		else
		{
			strhidSection = "business"
		}
	if(document.IndexForm.RecentMove.checked==true)
	{
		var sFullName="";
		var sFirstName="";
		var sLastName="";
		var ss="";
		sFullName= document.IndexForm.name.value
		if(sFullName.length>0)
		{
			sFullName=sFullName.replace(/^\s*(.*)/, "$1");
			sFullName=sFullName.replace(/(.*?)\s*$/, "$1");
			arr1=sFullName.split(" ");
			count=1;
			sFirstName=arr1[0];	 
			while(count < arr1.length)
			{
				ss+= " " + arr1[count];
				count = count+1;
			}
			 sLastName=ss;
		}

			if (strhidSection.toLowerCase()=="home")
			{
			strRedirURL="http://" + test + "/index.asp?section=home&layout=long&file=homeindex"		
	 		strRedirURL+= "&YourName=" + document.IndexForm.name.value
			strRedirURL+= "&ServicePhone=" + document.IndexForm.DSLPhoneAreaCode.value + document.IndexForm.DSLPhoneFirst.value +document.IndexForm.DSLPhoneLast.value

			strRedirURL+= "&Email=" + document.IndexForm.shopper_email.value
			strRedirURL+= "&ContactPhone=" + document.IndexForm.DSLPhoneAreaCode2.value + document.IndexForm.DSLPhoneFirst2.value +document.IndexForm.DSLPhoneLast2.value

			if (nocallback == "true"){
            	if (nocallbackhome == "true"){
                        strRedirURL = strRedirURL+"&call_back=N";}
            else {
					strRedirURL = strRedirURL+"&call_back=Y";}	}
			
			if (nocallback == "false"){
			strRedirURL+="&call_back=" + str_call_back;
		}


			strRedirURL+= "&RecentMove=yes" 
			strRedirURL+= "&fname=" +sFirstName
	 		strRedirURL+= "&lname=" + sLastName
			strRedirURL+= "&Type=" + strhidSection
			strRedirURL+= "&referring_partner=" +partnerID
			strRedirURL+="&targusflag=no"
			strRedirURL+="&autophoneflag=no"
		    strRedirURL+="&FilterOnly=" + filter
		    strRedirURL+="&logo=" + logo
		    strRedirURL+="&salesteam=" + salesteam

				
				RedirectPage(strRedirURL);
		
			}
			if (strhidSection.toLowerCase()=="business")
			{	 
			strRedirURL="http://" + test + "/index.asp?section=business&layout=long&file=businessindex"		
	 		strRedirURL+= "&YourName=" + document.IndexForm.name.value
			strRedirURL+= "&ServicePhone=" + document.IndexForm.DSLPhoneAreaCode.value + document.IndexForm.DSLPhoneFirst.value +document.IndexForm.DSLPhoneLast.value

			strRedirURL+= "&Email=" + document.IndexForm.shopper_email.value
			strRedirURL+= "&ContactPhone=" + document.IndexForm.DSLPhoneAreaCode2.value + document.IndexForm.DSLPhoneFirst2.value +document.IndexForm.DSLPhoneLast2.value

			strRedirURL+= "&RecentMove=yes" 
			strRedirURL+= "&fname=" +sFirstName
	 		strRedirURL+= "&lname=" + sLastName
			if (document.IndexForm.rbhome.checked==true && document.IndexForm.rbbusiness.checked==true)
			{
				strRedirURL+= "&Type=" + "Business"
			}
			else
			{
				if (document.IndexForm.rbhome.checked==true)
				{
					strRedirURL+= "&Type=" + "Home"
				}
				if (document.IndexForm.rbbusiness.checked==true)
				{
					strRedirURL+= "&Type=" + "Business"
				}
			}
			strRedirURL+= "&referring_partner="+partnerID
			strRedirURL+="&targusflag=no"
			strRedirURL+="&autophoneflag=no"
		    strRedirURL+="&FilterOnly=" + filter
			
			if (nocallback == "true"){
				if (nocallbackbusiness == "true"){
					strRedirURL = strRedirURL+"&call_back=N";}
	            else {
					strRedirURL = strRedirURL+"&call_back=Y";}	}
					
			if (nocallback == "false"){
			strRedirURL+="&call_back=" + str_call_back;
		}
		    strRedirURL+="&logo=" + logo
		    strRedirURL+="&salesteam=" + salesteam


				RedirectPage(strRedirURL);
			}
	}
	else
	{	
//  checkHomePageInputValues validation function is called 	from validation.js  file //////////  
	  if(checkHomePageInputValues(strhidSection))
	 {
 		var sFullName="";
		var sFirstName="";
		var sLastName="";
		var ss="";
		sFullName= document.IndexForm.name.value
		if(sFullName.length>0)
		{
			sFullName=sFullName.replace(/^\s*(.*)/, "$1");
			sFullName=sFullName.replace(/(.*?)\s*$/, "$1");
			arr1=sFullName.split(" ");
			count=1;
			sFirstName=arr1[0];	 
			while(count < arr1.length)
			{
				ss=ss + " " + arr1[count];
				count = count+1;
			}
			 sLastName=ss;
		}


	 	strRedirURL="targus.asp"
	 	strRedirURL+= "&yourname=" + document.IndexForm.name.value
		strRedirURL+= "&fname=" +sFirstName
 		strRedirURL+= "&lname=" + sLastName
		strRedirURL+= "&ServicePhone=" + document.IndexForm.DSLPhoneAreaCode.value + document.IndexForm.DSLPhoneFirst.value +document.IndexForm.DSLPhoneLast.value

		strRedirURL+= "&Email=" + document.IndexForm.shopper_email.value

		strRedirURL+= "&ContactPhone=" + document.IndexForm.DSLPhoneAreaCode2.value + document.IndexForm.DSLPhoneFirst2.value +document.IndexForm.DSLPhoneLast2.value
		
		strRedirURL+= "&RecentMove=" + document.IndexForm.RecentMove.value
		if (document.IndexForm.rbhome.checked==true)
		{
			strRedirURL+= "&Type=" + "Home"
				if (nocallback == "true"){
            		if (nocallbackhome == "true"){
                        strRedirURL = strRedirURL+"&call_back=N";}
           			 else {
						strRedirURL = strRedirURL+"&call_back=Y";}	}

		
		}
		if (document.IndexForm.rbbusiness.checked==true)
		{
			strRedirURL+= "&Type=" + "Business"
			
			if (nocallback == "true"){
				if (nocallbackbusiness == "true"){
					strRedirURL = strRedirURL+"&call_back=N";}
	            else {
					strRedirURL = strRedirURL+"&call_back=Y";}	}

		}
		strRedirURL+= "&referring_partner=" +partnerID
		strRedirURL+= "&id=" +partnerID
		strRedirURL+="&targusflag=yes"
		strRedirURL+="&autophoneflag=no"
		strRedirURL+="&FilterOnly=" + filter
		
		if (nocallback == "false"){
			strRedirURL+="&call_back=" + str_call_back;
		}
		    strRedirURL+="&logo=" + logo
		    strRedirURL+="&salesteam=" + salesteam
		

				
// function called to show popup window 
	  // TimedPopup("winpopup.asp",400,300,10);
 RedirectPage("http://" + test + "/winpopup.asp?Redirfile="+strRedirURL);		 
	  }
	} //else
 }
 
 function NoServicePhone()
{
	var str_call_back;
	str_call_back="N";
	
	if (isDefined(document.IndexForm.call_back) == true)
	{
		if (document.IndexForm.call_back.checked == true)
		{
			str_call_back = "Y";
		}
		else
		{
			str_call_back = "N";
		}
	}
	
	if (document.IndexForm.rbhome.checked==false &&  document.IndexForm.rbbusiness.checked==false)
	{
		alert("Please Select  'Qualify Service for'  ");
		document.IndexForm.rbhome.focus();
		return;
	}
	if (document.IndexForm.rbhome.checked==true)
	{
		strRedirURL="http://" + test + "/index.asp?section=home&layout=long&file=homeindex&hideflag=yes"		
		strRedirURL+= "&Type=Home"
	}
	if(document.IndexForm.rbbusiness.checked==true)
	{
		strRedirURL="http://" + test + "/index.asp?section=business&layout=long&file=businessindex&hideflag=yes"
		strRedirURL+= "&Type=Business"
	}
		var sFullName="";
		var sFirstName="";
		var sLastName="";
		var ss="";
		sFullName= document.IndexForm.name.value
		if(sFullName.length>0)
		{
			sFullName=sFullName.replace(/^\s*(.*)/, "$1");
			sFullName=sFullName.replace(/(.*?)\s*$/, "$1");
			arr1=sFullName.split(" ");
			count=1;
			sFirstName=arr1[0];	 
			while(count < arr1.length)
			{
				ss+= " " + arr1[count];
				count = count+1;
			}
			 sLastName=ss;
		}


	 		strRedirURL+= "&yourname=" + document.IndexForm.name.value
			strRedirURL+= "&ServicePhone=" + document.IndexForm.DSLPhoneAreaCode.value + document.IndexForm.DSLPhoneFirst.value +document.IndexForm.DSLPhoneLast.value

			strRedirURL+= "&Email=" + document.IndexForm.shopper_email.value
			strRedirURL+= "&ContactPhone=" + document.IndexForm.DSLPhoneAreaCode2.value + document.IndexForm.DSLPhoneFirst2.value +document.IndexForm.DSLPhoneLast2.value

			strRedirURL+= "&RecentMove=yes" 
			strRedirURL+= "&fname=" +sFirstName
	 		strRedirURL+= "&lname=" + sLastName
			strRedirURL+= "&referring_partner=" +partnerID
			strRedirURL+="&targusflag=no"
			strRedirURL+="&autophoneflag=no"
		    strRedirURL+="&FilterOnly=" + filter
			strRedirURL+="&call_back=" + str_call_back
		    strRedirURL+="&logo=" + logo
		    strRedirURL+="&salesteam=" + salesteam

				RedirectPage(strRedirURL);
		
}

// Function Name  : checkradioHome  
// Description    : This function makes radio button home appear as checked  and makes radio button business unchecked
//Author          : S.M.P.Gokulnath
//Created Date    :  Sep -09- 2004
function checkradioHome()
{
document.IndexForm.rbhome.checked=true
document.IndexForm.rbbusiness.checked=false
document.IndexForm.rbmulti.checked=false

}

// Function Name  : checkradioBusiness
// Description    : This function makes radio button business appear as checked  and makes radio button home unchecked
//Author          : S.M.P.Gokulnath
//Created Date    :  Sep -09- 2004
function checkradioBusiness()
{
document.IndexForm.rbhome.checked=false
document.IndexForm.rbbusiness.checked=true
document.IndexForm.rbmulti.checked=false
}

function multiinput()
{
    document.IndexForm.rbhome.checked=false
    document.IndexForm.rbbusiness.checked=false
    document.IndexForm.rbmulti.checked=true
    RedirectPage("http://" + test + "/multi_body.asp" + "?referring_partner=" +partnerID + "&id=" +partnerID +"&FilterOnly=" + filter);
}



//========================================================================================
// Validation Script
//========================================================================================

////**********************************************************************************************************
////* Author		 :	S.M.P.Gokulnath
////* Start Date	 :	September ,9, 2004
////* Last Modified  :	 
////* Project Name	 :	BBN
////* File Name	     :	validation.js
////* LOC			 :	
////* Version No.	 :	1.0.0	
////* Developed By   :	S.M.P.Gokulnath
////* purpose / Functionality       : This File contains general common functions 
////    1. TimedPopup 		- To show a popup window for specified number of seconds
////    2. IsNumeric(sText) - Checks whether passed value is Numeric - returns true if all are numeric and false if any character is found in 					 
////						  passed parameter

var TimeOut = 1;    // Initial time to Close window after __ number of seconds?
var TimeRemain = 0;  // Remaining time to Close window after __ number of seconds?
var RefreshRate = 0; // Check to close window every __ number of seconds?
var ChildWin = null;
// function  TimedPopup takes 4 parameter
/// 1. url = physical files to be displayed in the popup window /  constructed html string content can also be passed that is to be displayed 
/// 2. w   = width of popup window
/// 3. h   = height of popup window 
/// 4.intsec = number of secs the window needs to be displayed 
//// Note : Though the window is displayed excatly for number of secs specified , the processing time for the page which shows results is
////        dynamic hence in body on unload of the calling page the opened popup window is made to close 
//Description     : displays popup window for specified number of secs
//Author          : S.M.P.Gokulnath
//Created Date    :  Sep -09- 2004   

function TimedPopup(url,w,h,intsec)
{ 
TimeOut = intsec
//var winl = (screen.width)/4;
//var wint = (screen.height)/4;
var winl = 200;
var wint = 200;
var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+winl+',';
      settings +='left='+wint+',';
      settings +='scrollbars=No,resizable=No,toolbar=no, location=no, directories=no';

 windowprops = settings; // May be adjusted according to your needs
 if (ChildWin)
     return false;
 ChildWin = window.open(url, "ChildWin", windowprops);
  if(parseInt(navigator.appVersion) >= 4){ChildWin.window.focus();}
 ResetTimer();
 if (TimeOut && RefreshRate)
    setTimeout("CheckClose();",RefreshRate * 1);
}
function ResetTimer()
{
 TimeRemain = TimeOut;
}
function CheckClose()
{
 TimeRemain -= (RefreshRate);
 if (TimeRemain > 0)
    {
    if (ChildWin && ChildWin.closed)
       {
 
	ChildWin = null;
       }
    else
    if (ChildWin)
       { 
	setTimeout("CheckClose();",RefreshRate * 1);
       }
    }
 else
 if (ChildWin)
    {
 
     if (ChildWin.closed)
	 ChildWin = null;
     else
	{
         ChildWin.close();
	 ChildWin = null;
        }
    }
}

// function  IsNumeric takes 1 parameter
/// 1. sText = value that is to be checked whether it contains all numeriuc characters
//Description     : returns true if valid numeric values are entered and false if wrong values are entered
//Author          : S.M.P.Gokulnath
//Created Date    :  Sep -09- 2004   
 function IsNumeric(sText)
{
   var ValidChars = "0123456789.-";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;   
   }
   
   // function  IsAlphabets takes 1 parameter
/// 1. sText = value that is to be checked whether it contains only Characters
//Description     : returns true if valid Characters are entered and false if wrong values are entered
//Author          : S.M.P.Gokulnath
//Created Date    :  Jan-11-2005 
 function IsAlphabets(sText)
{
   var ValidChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ";
   var IsAlpha=true;
   var Char;
   sText=sText.replace(/^\s*(.*)/, "$1");
   sText=sText.replace(/(.*?)\s*$/, "$1");
	if (sText.length==0 )
	{
	IsAlpha = false;
	}
	else
	{
  	 for (i = 0; i < sText.length && IsAlpha == true; i++) 
      { 
    	  Char = sText.charAt(i); 
	      if (ValidChars.indexOf(Char) == -1) 
    	     {
        	 IsAlpha = false;
	         }
      }
	}
   return IsAlpha;   
  }
  
 // Function Name  : checkNumbersonly
// Description    : This function checks whether numbers alone is entered into service and contact phone numbers
//Author          : S.M.P.Gokulnath
//Created Date    :  Jan-11-2004
function checkNumbersonly(thob)

{
	if (IsNumeric(thob.value)==false)
	{
	alert('Please enter numeric value');
	thob.value="";
	thob.focus();
	}
}
 // allow ONLY alphanumeric keys, no symbols or punctuation
// this can be altered for any "checkOK" string you desire
function isValidName(str)
{	
   var ValidChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ ";
   var Isok=true;
   var Char;
	str=str.replace(/^\s*(.*)/, "$1");
	str=str.replace(/(.*?)\s*$/, "$1");
	if (str.length==0 )
	{
	Isok = false;
	}
	else
	{
	   for (i = 0; i < str.length && Isok == true; i++) 
    	  { 
	      Char = str.charAt(i); 
    	  if (ValidChars.indexOf(Char) == -1) 
        	 {
	         Isok = false;
    	     }
	      }
	}
   return Isok;   
   }

// allow ONLY alphanumeric keys, no symbols or punctuation
// this can be altered for any "checkOK" string you desire
function isValidEmailChar(str)
{	
   var ValidChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@_.- ";
   var Isok=true;
   var Char;
	str=str.replace(/^\s*(.*)/, "$1");
	str=str.replace(/(.*?)\s*$/, "$1");
	if (str.length==0 )
	{
	Isok = false;
	}
	else
	{
	   for (i = 0; i < str.length && Isok == true; i++) 
    	  { 
	      Char = str.charAt(i); 
    	  if (ValidChars.indexOf(Char) == -1) 
        	 {
	         Isok = false;
    	     }
	      }
	}
   return Isok;   
   }

// allow ONLY alphanumeric keys, no symbols or punctuation
// this can be altered for any "checkOK" string you desire
function isValidServiceAddress(str)
{	
   var ValidChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_., ";
   var Isok=true;
   var Char;
	str=str.replace(/^\s*(.*)/, "$1");
	str=str.replace(/(.*?)\s*$/, "$1");
	if (str.length==0 )
	{
	Isok = false;
	}
	else
	{
	   for (i = 0; i < str.length && Isok == true; i++) 
    	  { 
	      Char = str.charAt(i); 
    	  if (ValidChars.indexOf(Char) == -1) 
        	 {
	         Isok = false;
    	     }
	      }
	}
   return Isok;   
   }
// function  isValidEmail takes 1 parameter
/// 1. str = value that is to be checked for email address
//Description     : returns true if valid email values is enteres and false if wrong values are entered
function isValidEmail(emailAddress)
{
   /* Check for empty address or invalid characters */
   if (hasInvalidChar(emailAddress))//emailAddress == "" ||
   {
      return false;
   }
   /* Check for invalid characters */
   if (isValidEmailChar(emailAddress)==false)//emailAddress == "" ||
   {
      return false;
   }

   /* check for presence of the @ character */
   var atPos = emailAddress.indexOf("@", 1)
   if (atPos == -1)
   {
      return false;
   }

   /* Check that there are no more @ characters */
   if (emailAddress.indexOf("@", atPos + 1) > -1)
   {
      return false;
   }

   /* Check for the presence of a dot somewhere after @ */
   var dotPos = emailAddress.indexOf(".", atPos + 1);
   if (dotPos == -1)
   {
      return false;
   }

   /* Check for presence of two or more characters after last dot */
   var lastDotPos = emailAddress.lastIndexOf(".");
   if (lastDotPos + 3 >  emailAddress.length)
   {
      return false;
   }

   return true;
}

// function  isValidEmailAddress takes 1 parameter
/// 1. str = value that is to be checked for email address
//Description     : returns true if valid email values is enteres and false if wrong values are entered
function isValidEmailAddress(emailAddress)
{
   /* Check for empty address or invalid characters */
   if (hasInvalidChar(emailAddress))//emailAddress == "" ||
   {
      return false;
   }
   /* Check for invalid characters */
   if (isValidEmailChar(emailAddress)==false)//emailAddress == "" ||
   {
      return false;
   }

   /* check for presence of the @ character */
   var atPos = emailAddress.indexOf("@", 1)
   if (atPos == -1)
   {
      return false;
   }

   /* Check that there are no more @ characters */
   if (emailAddress.indexOf("@", atPos + 1) > -1)
   {
      return false;
   }

   /* Check for the presence of a dot somewhere after @ */
   var dotPos = emailAddress.indexOf(".", atPos + 1);
   if (dotPos == -1)
   {
      return false;
   }

   /* Check for presence of two or more characters after last dot */
   var lastDotPos = emailAddress.lastIndexOf(".");
   if (lastDotPos + 3 >  emailAddress.length)
   {
      return false;
   }

   return true;
}

/*
   Return true if the given email address has an invalid character
   in it, else return false.
*/
function hasInvalidChar(emailAddress)
{
   var invalidChars = "/;:,"; // this list is not complete
   for (var k = 0; k < invalidChars.length; k++)
   {
      var ch = invalidChars.charAt(k);
      if (emailAddress.indexOf(ch) > -1)
      {
         return true;
      }
   }
   return false;
}

	



// function  checkHomePageInputValues  
///  Note : This Function is called from two pages
///           1. homepage.asp
///           2. input.asp
///      since the control name and validation are same
/// this is done to avoid code repetation and for ease of maintanence      
// Description    : This function checks whether the form values entered are proper 
//					and gives appropriate error message if any value is found invalid or left blank
//                  The function returns true if all values are found correct and false if any value is found invalid or left blank
//Author          : S.M.P.Gokulnath
//Created Date    :  Sep -09- 2004   
function checkHomePageInputValues(strSec)
{
	/////// ///   Extra Field   ////////////////////////
	
	if (extrafieldrequired != "false") {
		if ((isDefined(document.IndexForm.extrafield) == true) && ((document.IndexForm.extrafield.value==""))) {
			alert('Information missing. Please enter all required information.');
			document.IndexForm.extrafield.focus();
			return false;
		}
	}
 
	/////// ///   Name   ////////////////////////
	if((strSec.toLowerCase()=="home"))
	{
		if(document.IndexForm.name.value!='')
		{
				if(isValidName(document.IndexForm.name.value)==false)
				{
					alert('Please do not enter special characters with your name');
					document.IndexForm.name.focus();
					return false;
				}
		}
			
	}
	else
	{
		if(document.IndexForm.name.value=='')
		{
			alert('Please enter your Full Name ');
			document.IndexForm.name.focus();
			return false;
		}
				  
		if(isValidName(document.IndexForm.name.value)==false)
		{
			alert('Please do not enter special characters with your name');
			document.IndexForm.name.focus();
			return false;
		}	
	} 

	/// ///   Service Phone    ////////////////////////
	if (document.IndexForm.DSLPhoneAreaCode.value=='')  
	{
		alert('Please enter your Service telephone number');
		document.IndexForm.DSLPhoneAreaCode.focus();
		return false;
	}
	var num1,newTerm1
	if (parseInt(document.IndexForm.DSLPhoneAreaCode.value) != document.IndexForm.DSLPhoneAreaCode.value) 
	{
            num1 = document.IndexForm.DSLPhoneAreaCode.value;
            while (num1.charAt(0) == "0") 
	    {
	    	newTerm1 = num1.substring(1, num1.length);
		    num1 = newTerm1;
	    }
	    if (parseInt(num1) != num1)
	    {
		alert('Please enter a Service telephone number, numbers only');
		document.IndexForm.DSLPhoneAreaCode.focus();
		return false;
            }
	}

	if (document.IndexForm.DSLPhoneAreaCode.value.length < 3 || document.IndexForm.DSLPhoneAreaCode.value.length > 3 )  
	{
		alert('Please enter your Service telephone Area Code  3 digits number Eg(123) ');
		document.IndexForm.DSLPhoneAreaCode.focus();
		return false;
	}
	
	if  (document.IndexForm.DSLPhoneFirst.value=='')  
	{
		alert('Please enter your Service telephone number');
		document.IndexForm.DSLPhoneFirst.focus();
		return false;
	}
	var num2,newTerm2
	if (parseInt(document.IndexForm.DSLPhoneFirst.value) != document.IndexForm.DSLPhoneFirst.value)
	{
            num2 = document.IndexForm.DSLPhoneFirst.value;
            while (num2.charAt(0) == "0") 
	    {
	    	newTerm2 = num2.substring(1, num2.length);
		num2 = newTerm2;
	    }
	    if (parseInt(num2) != num2) 
	    {
		alert('Please enter a Service telephone number, numbers only');
		document.IndexForm.DSLPhoneFirst.focus();
		return false;
	    }
	}

	if (document.IndexForm.DSLPhoneFirst.value.length < 3 || document.IndexForm.DSLPhoneFirst.value.length > 3 )
	{
		alert('Please enter your Service telephone first 3 digits number Eg(123) ');
		document.IndexForm.DSLPhoneFirst.focus();
		return false;
	}
	
	if (document.IndexForm.DSLPhoneLast.value=='') 
	{
		alert('Please enter your Service telephone number');
		document.IndexForm.DSLPhoneLast.focus();
		return false;
	}
 
 	var num3,newTerm3
	if (parseInt(document.IndexForm.DSLPhoneLast.value) != document.IndexForm.DSLPhoneLast.value) 
	{
            num3 = document.IndexForm.DSLPhoneLast.value;
            while (num3.charAt(0) == "0") 
	    {
	    	newTerm3 = num3.substring(1, num3.length);
 	    	num3 = newTerm3;
	    }
	    if (parseInt(num3) != num3) 
	    {
		alert('Please enter a Service telephone number, numbers only');
		document.IndexForm.DSLPhoneLast.focus();
		return false;
	    }									
	}
			
	if (document.IndexForm.DSLPhoneLast.value.length < 4 || document.IndexForm.DSLPhoneLast.value.length > 4 )
	{
		alert('Please enter your Service telephone last 4 digits number Eg(1234) ');
		document.IndexForm.DSLPhoneLast.focus();
		return false;
	}
 
	/// ///   Mail Check Code ////////////////////////
	if (document.IndexForm.shopper_email.value=='' ||  (! isValidEmailAddress(document.IndexForm.shopper_email.value) ) ) {
		alert('Please enter a valid e-mail address so you will receive confirmation of your registration.  E-Mail addresses must be in a valid e-mail format (e.g. yourname@domain.com)');
		document.IndexForm.shopper_email.focus();
		return false;
	}
	 
	if((strSec.toLowerCase()=="home"))
	{
	}
	else
	{
		/// ///   Contact Phone  ////////////////////////
		if(document.IndexForm.DSLPhoneAreaCode2.value=='') 
		{
			alert('Please enter your Contact telephone number');
			document.IndexForm.DSLPhoneAreaCode2.focus();
			return false;
		}
		
		var num1,newTerm1
		if (parseInt(document.IndexForm.DSLPhoneAreaCode2.value) != document.IndexForm.DSLPhoneAreaCode2.value) 
		{
            num1 = document.IndexForm.DSLPhoneAreaCode2.value;
            while (num1.charAt(0) == "0") 
		    {
		    	newTerm1 = num1.substring(1, num1.length);
			    num1 = newTerm1;
	    	}
		    if (parseInt(num1) != num1)
		    {
				alert('Please enter a Contact telephone number, numbers only');
				document.IndexForm.DSLPhoneAreaCode2.focus();
				return false;
	       }
		}

		if(document.IndexForm.DSLPhoneAreaCode2.value.length < 3 || document.IndexForm.DSLPhoneAreaCode2.value.length > 3 ) 
		{
		alert('Please enter your Contact telephone Area Code  3 digits number Eg(123) ');
			document.IndexForm.DSLPhoneAreaCode2.focus();
			return false;
		}


		if (document.IndexForm.DSLPhoneFirst2.value=='') 
		{
			alert('Please enter your Contact telephone number');
			document.IndexForm.DSLPhoneFirst2.focus();
			return false;
		}

		var num2,newTerm2
		if (parseInt(document.IndexForm.DSLPhoneFirst2.value) != document.IndexForm.DSLPhoneFirst2.value)
		{
            num2 = document.IndexForm.DSLPhoneFirst2.value;
            while (num2.charAt(0) == "0") 
		    {
		    	newTerm2 = num2.substring(1, num2.length);
				num2 = newTerm2;
		    }
		    if (parseInt(num2) != num2) 
		    {
			alert('Please enter a Contact  telephone number, numbers only');
			document.IndexForm.DSLPhoneFirst2.focus();
			return false;
		    }
		}

		if (document.IndexForm.DSLPhoneFirst2.value.length < 3 || document.IndexForm.DSLPhoneFirst2.value.length > 3 ) 
		{
		alert('Please enter your Contact telephone First 3 digits number Eg(123) ');
			document.IndexForm.DSLPhoneFirst2.focus();
			return false;
		}
		
		if (document.IndexForm.DSLPhoneLast2.value=='')  
		{
			alert('Please enter your Contact telephone number');
			document.IndexForm.DSLPhoneLast2.focus();
			return false;
		}

		var num3,newTerm3
		if (parseInt(document.IndexForm.DSLPhoneLast2.value) != document.IndexForm.DSLPhoneLast2.value) 
		{
	        num3 = document.IndexForm.DSLPhoneLast2.value;
	        while (num3.charAt(0) == "0") 
		    {
		    	newTerm3 = num3.substring(1, num3.length);
	 	    	num3 = newTerm3;
		    }
		    if (parseInt(num3) != num3) 
		    {
			alert('Please enter a Contact telephone number, numbers only');
			document.IndexForm.DSLPhoneLast2.focus();
			return false;
		    }									
		}
		if (document.IndexForm.DSLPhoneLast2.value.length < 4 || document.IndexForm.DSLPhoneLast2.value.length > 4 )  
		{
		alert('Please enter your Contact telephone Last 4 digits number Eg(1234) ');
			document.IndexForm.DSLPhoneLast2.focus();
			return false;
		}
		
		
	}
	return true;
}
// This is part of code for auto tab in phone number fields
var isNN = (navigator.appName.indexOf("Netscape")!=-1);
function autoTab(input,len, e) {
var keyCode = (isNN) ? e.which : e.keyCode; 
var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
if(input.value.length >= len && !containsElement(filter,keyCode)) {
input.value = input.value.slice(0, len);
	try {
		input.form[(getIndex(input)+1) % input.form.length].focus();
	}
	catch(er){
		
	}
}
function containsElement(arr, ele) {
var found = false, index = 0;
while(!found && index < arr.length)
if(arr[index] == ele)
found = true;
else
index++;
return found;
}
function getIndex(input) {
var index = -1, i = 0, found = false;
while (i < input.form.length && index == -1)
if (input.form[i] == input)index = i;
else i++;
return index;
}
return true;
}

//========================================================================================
// Configure Style
//========================================================================================


switch(style) 
{
case(style="1"): 
  document.write("<style type='text/css'>")
  document.write("<!--")
  document.write(".bbnQualifyTable {}")
  document.write(".bbnQualifyTRHeader {font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 11px; font-weight: bold; background-color: #D6D6F3; color: #14143F;}")
  document.write(".bbnQualifyTROdd {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F0F0FB; font-weight: bold;}")
  document.write(".bbnQualifyTREven {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F0F0FB; font-weight: bold;}")
  document.write(".bbnQualifyEmail {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F0F0FB; font-weight: none;}")
  document.write(".input_field {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 11px; color: #14143F;}")
  document.write(".input_phone {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 11px; color: #14143F;}")
  document.write(".bbnQualifyButton {font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	font-weight: bold;}")
  document.write("-->")
  document.write("</style>")
break
case(style="2"): 
  document.write("<style type='text/css'>")
  document.write("<!--")
  document.write(".bbnQualifyTable {}")
  document.write(".bbnQualifyTRHeader {font-family: Arial, Helvetica, sans-serif;	font-size: 11px; background-color: #F7F7F7;}")
  document.write(".bbnQualifyTROdd {	font-family: Arial, Helvetica, sans-serif;	font-size: 11px;	background-color: #FCFCFC; }")
  document.write(".bbnQualifyTREven {	font-family: Arial, Helvetica, sans-serif;	font-size: 11px;	background-color: #FCFCFC; }")
  document.write(".bbnQualifyEmail {	font-family: Arial, Helvetica, sans-serif;	font-size: 11px;	background-color: #FCFCFC; font-weight: none;}")
  document.write(".input_field {	font-family: Arial, Helvetica, sans-serif;	font-size: 11px;}")
  document.write(".input_phone {	font-family: Arial, Helvetica, sans-serif;	font-size: 11px;}")
  document.write(".bbnQualifyButton {font-family: Arial, Helvetica, sans-serif;	font-size: 11px;}")
  document.write("-->")
  document.write("</style>")
break
case(style="3"): 
  document.write("<style type='text/css'>")
  document.write("<!--")
  document.write(".bbnQualifyTable {}")
  document.write(".bbnQualifyTRHeader {font-family: Arial, Helvetica, sans-serif;	font-size: 11px; }")
  document.write(".bbnQualifyTROdd {	font-family: Arial, Helvetica, sans-serif;	font-size: 11px;	}")
  document.write(".bbnQualifyTREven {	font-family: Arial, Helvetica, sans-serif;	font-size: 11px;	}")
  document.write(".bbnQualifyEmail {	font-family: Arial, Helvetica, sans-serif;	font-size: 11px; font-weight: none;}")
  document.write(".input_field {	font-family: Arial, Helvetica, sans-serif;	font-size: 11px;}")
  document.write(".input_phone {	font-family: Arial, Helvetica, sans-serif;	font-size: 11px;}")
  document.write(".bbnQualifyButton {background-color: #3399FF; border-color: #0033FF; border-style: solid; color: #FFFFFF; font-size: 10pt; font-family: arial; font-weight: bold;}")
  document.write("-->")
  document.write("</style>")
break
case(style="4"): 
  document.write("<style type='text/css'>")
  document.write("<!--")
  document.write(".bbnQualifyTable {font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F9F9F9; font-weight: bold;}")
  document.write(".bbnQualifyTRHeader {font-family: Arial, Verdana, Helvetica, sans-serif;	font-size: 16px; font-weight: bold; background-color: #CC0000; color: #ffffff;}")
  document.write(".bbnQualifyTROdd {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F0F0FB; font-weight: bold;}")
  document.write(".bbnQualifyTREven {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F9F9F9; font-weight: bold;}")
  document.write(".bbnQualifyEmail {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F0F0FB; font-weight: none;}")
  document.write(".input_field {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 11px; color: #14143F;}")
  document.write(".input_phone {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 11px; color: #14143F;}")
  document.write(".bbnQualifyButton {font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	font-weight: bold;}")
  document.write(".bbnQualifyFooter {font-family: Arial, Verdana, Helvetica, sans-serif;	font-size: 12px; font-weight: bold; background-color: #999999; color: #000000;}")
  document.write("-->")
  document.write("</style>")
break
case(style="5"): 
  document.write("<style type='text/css'>")
  document.write("<!--")
  document.write(".bbnQualifyTable {font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F9F9F9; font-weight: bold;}")
  document.write(".bbnQualifyTRHeader {font-family: Arial, Verdana, Helvetica, sans-serif;	font-size: 16px; font-weight: bold; background-color: #C0C8C0; color: #000000;}")
  document.write(".bbnQualifyTROdd {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F0F0FB; font-weight: bold;}")
  document.write(".bbnQualifyTREven {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F9F9F9; font-weight: bold;}")
  document.write(".bbnQualifyEmail {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F0F0FB; font-weight: none;}")
  document.write(".input_field {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 11px; color: #14143F;}")
  document.write(".input_phone {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 11px; color: #14143F;}")
  document.write(".bbnQualifyButton {font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	font-weight: bold;}")
  document.write(".bbnQualifyFooter {font-family: Arial, Verdana, Helvetica, sans-serif;	font-size: 12px; font-weight: bold; background-color: #CC0000; color: #000000;}")
  document.write("-->")
  document.write("</style>")
break
case(style="6"): 
  document.write("<style type='text/css'>")
  document.write("<!--")
  document.write(".bbnQualifyTable {font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F9F9F9; font-weight: bold;}")
  document.write(".bbnQualifyTRHeader {font-family: Arial, Verdana, Helvetica, sans-serif;	font-size: 24; font-weight: bold; color: #990000;}")
  document.write(".bbnQualifyTROdd {	font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	font-weight: bold;}")
  document.write(".bbnQualifyTREven {	font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	font-weight: bold;}")
  document.write(".bbnQualifyEmail {	font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	font-weight: none;}")
  document.write(".input_field {	font-family: Arial, Helvetica, sans-serif;	font-size: 10px; color: #14143F; width: 100px}")
  document.write(".input_phone {	font-family: Arial, Helvetica, sans-serif;	font-size: 10px; color: #14143F; width: 30px}")
  document.write(".bbnQualifyButton {font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	font-weight: bold;}")
  document.write(".bbnQualifyFooter {font-family: Arial, Verdana, Helvetica, sans-serif;	font-size: 16px; font-weight: bold; background-color: #990000; color: #000000;}")
  document.write("-->")
  document.write("</style>")
break
case(style="7"): 
  document.write("<style type='text/css'>")
  document.write("<!--")
  document.write(".bbnQualifyTable {font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F9F9F9; font-weight: bold;}")
  document.write(".bbnQualifyTRHeader {background-color: #E9E9E9; color:#990000; font-family: Arial, Helvetica, sans-serif;	font-size: 18px; font-weight: bold;}")
  document.write(".bbnQualifyTROdd {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F0F0FB; font-weight: bold;}")
  document.write(".bbnQualifyTREven {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F9F9F9; font-weight: bold;}")
  document.write(".bbnQualifyEmail {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F0F0FB; font-weight: none;}")
  document.write(".input_field {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 11px; color: #14143F;}")
  document.write(".input_phone {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 11px; color: #14143F;}")
  document.write(".bbnQualifyButton {font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	font-weight: bold;}")
  document.write(".bbnQualifyFooter {font-family: Arial, Verdana, Helvetica, sans-serif;	font-size: 12px; font-weight: bold; background-color: #5d7aa6; color: #000000;}")
  document.write("-->")
  document.write("</style>")
break
case(style="8"): 
  document.write("<style type='text/css'>")
  document.write("<!--")
  document.write(".bbnQualifyTable {font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F9F9F9; font-weight: bold;}")
  document.write(".bbnQualifyTRHeader {font-family: Arial, Verdana, Helvetica, sans-serif;	font-size: 24; font-weight: bold; color: #4275A5;}")
  document.write(".bbnQualifyTROdd {	font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	font-weight: bold;}")
  document.write(".bbnQualifyTREven {	font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	font-weight: bold;}")
  document.write(".bbnQualifyEmail {	font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	font-weight: none;}")
  document.write(".input_field {	font-family: Arial, Helvetica, sans-serif;	font-size: 10px; color: #14143F; width: 100px}")
  document.write(".input_phone {	font-family: Arial, Helvetica, sans-serif;	font-size: 10px; color: #14143F; width: 30px}")
  document.write(".bbnQualifyButton {font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	font-weight: bold;}")
  document.write(".bbnQualifyFooter {font-family: Arial, Verdana, Helvetica, sans-serif;	font-size: 16px; font-weight: bold; background-color: #4275A5; color: #000000;}")
  document.write("-->")
  document.write("</style>")
break
case(style="9"):
document.write("<style type='text/css'>")
  document.write("<!--")
  document.write(".bbnQualifyTable {color:black; width:100%; background-color: #E4EBF5; border-color:#B64700}")
  document.write(".bbnQualifyTRHeader {background-color: #D4DEC5; color:#B64700; font-family: Arial, Helvetica, sans-serif;	font-size: 18px; font-weight: bold;}")
  document.write(".bbnQualifyTROdd {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #B64700; font-weight: bold;}")
  document.write(".bbnQualifyTREven {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #B64700; font-weight: bold;}")
  document.write(".input_field {	font-family: Arial, Helvetica, sans-serif;	font-size: 12px;	color: #000000;}")
  document.write(".input_phone {	font-family: Arial, Helvetica, sans-serif;	font-size: 12px;	color: #000000;}")
  document.write(".bbnQualifyButton {color:black;}")
  document.write(".bbnQualifyFooter {background-color:#5d7aa6;")
  document.write("-->")
  document.write("</style>")
break
case(style="10"): 
  document.write("<style type='text/css'>")
  document.write("<!--")
  document.write(".bbnQualifyTable {font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F9F9F9; font-weight: bold;}")
  document.write(".bbnQualifyTRHeader {font-family: Arial, Verdana, Helvetica, sans-serif;	font-size: 16px; font-weight: bold; background-color: #C0C8C0; color: #000000;}")
  document.write(".bbnQualifyTROdd {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F0F0FB; font-weight: bold;}")
  document.write(".bbnQualifyTREven {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F9F9F9; font-weight: bold;}")
  document.write(".bbnQualifyEmail {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F0F0FB; font-weight: none;}")
  document.write(".input_field {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 11px; color: #14143F;}")
  document.write(".input_phone {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 11px; color: #14143F;}")
  document.write(".bbnQualifyButton {font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	font-weight: bold;}")
  document.write(".bbnQualifyFooter {font-family: Arial, Verdana, Helvetica, sans-serif;	font-size: 12px; font-weight: bold; background-color: #31319C; color: #000000;}")
  document.write("-->")
  document.write("</style>")
break
case(style="11"): 
  document.write("<style type='text/css'>")
  document.write("<!--")
  document.write(".bbnQualifyTable {font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F9F9F9; font-weight: bold;}")
  document.write(".bbnQualifyTRHeader {font-family: Arial, Verdana, Helvetica, sans-serif;	font-size: 16px; font-weight: bold; background-color: #C0C8C0; color: #000000;}")
  document.write(".bbnQualifyTROdd {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F0F0FB; font-weight: bold;}")
  document.write(".bbnQualifyTREven {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F9F9F9; font-weight: bold;}")
  document.write(".bbnQualifyEmail {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F0F0FB; font-weight: none;}")
  document.write(".input_field {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 11px; color: #14143F;}")
  document.write(".input_phone {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 11px; color: #14143F;}")
  document.write(".bbnQualifyButton {font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	font-weight: bold;}")
  document.write(".bbnQualifyFooter {font-family: Arial, Verdana, Helvetica, sans-serif;	font-size: 12px; font-weight: bold; background-color: #F68B19; color: #000000;}")
  document.write("-->")
  document.write("</style>")
break
case(style="12"): 
  document.write("<style type='text/css'>")
  document.write("<!--")
  document.write(".bbnQualifyTable {font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F9F9F9; font-weight: bold;}")
  document.write(".bbnQualifyTRHeader {font-family: Arial, Verdana, Helvetica, sans-serif;	font-size: 16px; font-weight: bold; background-color: #9DC9F1; color: #007DC3;}")
  document.write(".bbnQualifyTROdd {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F0F0FB; font-weight: bold;}")
  document.write(".bbnQualifyTREven {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F9F9F9; font-weight: bold;}")
  document.write(".bbnQualifyEmail {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	background-color: #F0F0FB; font-weight: none;}")
  document.write(".input_field {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 11px; color: #14143F;}")
  document.write(".input_phone {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 11px; color: #14143F;}")
  document.write(".bbnQualifyButton {font-family: Arial, Helvetica, sans-serif;	font-size: 10px;	font-weight: bold;}")
  document.write(".bbnQualifyFooter {font-family: Arial, Verdana, Helvetica, sans-serif;	font-size: 12px; font-weight: bold; background-color: #9DC9F1; color: #007DC3;}")
  document.write("-->")
  document.write("</style>")
break
case(style="none"):

break
default:
  document.write("<style type='text/css'>")
  document.write("<!--")
  document.write(".bbnQualifyTable {color:black; width:100%; background-color:#F9F9FA;}")
  document.write(".bbnQualifyTRHeader {background-color: #E9E9E9; color:#990000; font-family: Arial, Helvetica, sans-serif;	font-size: 18px; font-weight: bold;}")
  document.write(".input_field {	font-family: Arial, Helvetica, sans-serif;	font-size: 12px;	color: #000000;}")
  document.write(".input_phone {	font-family: Arial, Helvetica, sans-serif;	font-size: 12px;	color: #000000;}")
  document.write(".bbnQualifyButton {color:black;}")
  document.write(".bbnQualifyFooter {background-color:#5d7aa6;")
  document.write("-->")
  document.write("</style>")
break
}

//========================================================================================
// Hide Show Function
//========================================================================================

document.write("\
<script type='text/javascript'>\
function doHide()\
	{\
		document.getElementById('business_phone_label').style.display = 'none';\
		document.getElementById('business_phone').style.display = 'none';\
		document.getElementById('business_contact_label').style.display = 'none';\
		document.getElementById('business_contact').style.display = 'none';\
	}\
function doShow()\
	{\
		document.getElementById('business_phone_label').style.display = '';\
		document.getElementById('business_phone').style.display = '';\
		document.getElementById('business_contact_label').style.display = '';\
		document.getElementById('business_contact').style.display = '';\
	}\
</script>")

//========================================================================================
// Display form
//========================================================================================

flaghome = false;
flagbusiness = false;

document.write("<form name='IndexForm'>")

document.write("<input type='hidden' name='hidSection' value=''>")
if (bbnbusiness == "false") {
   document.write("<input type='hidden' name='name' size='20' maxlength='75' class='input_field'>")
   document.write("<input type='hidden' name='DSLPhoneAreaCode2' size='3' maxlength='3' onKeyUp='return autoTab(this, 3, event);' class='input_field'>")
   document.write("<input type='hidden' name='DSLPhoneFirst2' size='3' maxlength='3' onKeyUp='return autoTab(this, 3, event);' class='input_field'>")
   document.write("<input type='hidden' name='DSLPhoneLast2' size='4' maxlength='4' onKeyUp='return autoTab(this, 4, event);' class='input_field'>")
}
document.write("<table class='bbnQualifyTable' width='100%' border='0' cellpadding='0' cellspacing='0'>")
document.write("  <tr>")
document.write("    <td>")

document.write("<table width='100%' border='0' cellpadding='6' cellspacing='0'>")
document.write("  <tr class='bbnQualifyTRHeader'>")
document.write("    <td colspan='5'><a name='qualify'></a>" + qualifytitle + "</td>")
document.write("    <td colspan='2'>")
if (moved == "true") {
   document.write("      <input value='1' type='checkbox' name='RecentMove'><font size='1' class='input_field'>Moved in last 3 months?</font>")
} else {
   document.write("      <input value='1' type='hidden' name='RecentMove'>")
}
document.write("    </td></tr>")
document.write("  <tr>")
document.write("    <td><img src='http://www.broadbandnational.com/images/step_1.gif' width='36' height='68'></td>")
document.write("    <td><table width='100%' border='0' cellpadding='1'>")
document.write("      <tr>")
document.write("        <td colspan='2' align='center' valign='middle' class='input_field'><div align='left'><strong><font color='#000000' size='2' face='Arial, Helvetica, sans-serif'>Qualify")
document.write("                Service for</font></strong></div>")
document.write("        </td>")
document.write("      </tr>")
document.write("      <tr "); if (bbnhome == 'false') {document.write("style='display: none'")}; document.write(">")
document.write("        <td width='7' rowspan='2' align='center' valign='top' class='S'>&nbsp;</td>")
document.write("        <td align='center' valign='bottom' class='S'><div align='left'><input name='rbhome' type='radio' value='radiobutton' onClick='javascript:checkradioHome();javascript:doHide();' "); if (bbnbusiness == "false") {document.write(" checked")}; document.write("><font color='#000000' size='2' face='Arial, Helvetica, sans-serif'>" + rtext + "</font></div>")
//} else {
//   flaghome = true;
//}
document.write("        </td>")
document.write("      </tr>")
document.write("      <tr "); if (bbnbusiness == 'false') {document.write("style='display: none;'")}; document.write(">")
document.write("        <td align='center' valign='top' class='S'><div align='left'> <font color='#000000' face='Arial, Helvetica, sans-serif'><input type='radio' name='rbbusiness' value='radiobutton' onClick='javascript:checkradioBusiness();javascript:doShow();' "); if (bbnhome == "false"){document.write(" checked")}; document.write("><font size='2'>" + btext + "</font></font></div>")
//} else {
//   flagbusiness = true;
//}
document.write("        </td>")
document.write("      </tr>")
document.write("    </table></td>")
document.write("    <td><img src='http://www.broadbandnational.com/images/step_2.gif' width='45' height='68'></td>")
document.write("    <td><table width='100%' border='0' cellpadding='1'>")
document.write("      <tr>")
document.write("        <td colspan='2' align='center' valign='middle' class='S'><div align='left'><strong><font color='#000000' size='2' face='Arial, Helvetica, sans-serif'>" + ServicePhoneText + "</font></strong></div>")
document.write("        </td>")
document.write("      </tr>")
document.write("      <tr>")
document.write("        <td align='center' valign='top' class='S'>&nbsp;</td>")
document.write("        <td align='left' valign='bottom'>            <input type='text' name='DSLPhoneAreaCode' size='2' maxlength='3' onKeyUp='return autoTab(this, 3, event);' class='input_phone'>")
document.write("  -")
document.write("  <input type='text' name='DSLPhoneFirst' size='2' maxlength='3' onKeyUp='return autoTab(this, 3, event);' class='input_phone'>")
document.write("  -")
document.write("  <input type='text' name='DSLPhoneLast' size='3' maxlength='4' onKeyUp='return autoTab(this, 4, event);' class='input_phone'>")
document.write("          </td>")
document.write("      </tr>")

//document.write("        <td align='center' valign='top' class='S'>&nbsp;</td>")
if (bbnNoPhone == "true") {
   document.write("      <tr>")
   document.write("        <td colspan='2' align='center' valign='middle' class='S'><font color='#000000' size='1' face='Arial, Helvetica, sans-serif'><a href='javascript:NoServicePhone()'>No Phone? Click Here</a></font></td>")
   document.write("      </tr>")
}

if (bbnbusiness == "true") {
   document.write("      <tr id='business_phone_label'")
      if (shortform != "false") {
		  document.write("style='display:none;' ")
	  }
   document.write(" align='left'>")
   document.write("        <td colspan='2' valign='top' class='S'><font color='#000000' size='2' face='Arial, Helvetica, sans-serif'><strong>" + ContactNumberText + "</strong></font></td>")
   document.write("        </tr>")
   document.write("      <tr id='business_phone'")
      if (shortform != "false") {
		  document.write("style='display:none;' ")
	  }
   document.write(" >")
   document.write("        <td align='center' valign='top' class='S'>&nbsp;</td>")
   document.write("        <td align='left' valign='middle' class='S'><font color='#000000' size='1' face='Arial, Helvetica, sans-serif'>")
   document.write("          <input type='text' name='DSLPhoneAreaCode2' size='2' maxlength='3' onKeyUp='return autoTab(this, 3, event);' class='input_phone' ")
      if (shortform != "false") {
		  document.write("value='111' ")
	  }
   document.write(" >           -             <input type='text' name='DSLPhoneFirst2' size='2' maxlength='3' onKeyUp='return autoTab(this, 3, event);' class='input_phone' ")
      if (shortform != "false") {
		  document.write("value='111' ")
	  }
   document.write(" >             -             <input type='text' name='DSLPhoneLast2' size='3' maxlength='4' onKeyUp='return autoTab(this, 4, event);' class='input_phone' ")
      if (shortform != "false") {
		  document.write("value='1111' ")
	  }
   document.write(" >")
   document.write("</font></td>")
   document.write("      </tr>")
}
document.write("    </table>")
document.write("    </td>")
document.write("    <td><img src='http://www.broadbandnational.com/images/step_3.gif' width='45' height='68'></td>")
document.write("    <td ")
      if (shortform != "false") {
		  document.write("style='display:none;' ")
	  }
   document.write(" align='left' valign='middle'><table width='100%' border='0' cellpadding='1'>")
document.write("      <tr>")
document.write("        <td colspan='2' align='center' valign='middle' class='S'><div align='left'><strong><font color='#000000' size='2' face='Arial, Helvetica, sans-serif'>" + EnterEmailText + "</font></strong></div>")
document.write("        </td>")
document.write("      </tr>")
document.write("      <tr>")
document.write("        <td align='center' valign='top' class='S'>&nbsp;</td>")
document.write("        <td align='center' valign='bottom' class='S'><div align='left'>")
document.write("          <input type='text' name='shopper_email' size='15' maxlength='75' class='input_field' ")
      if (shortform != "false") {
		  document.write("value='your_email@your_ISP.com' ")
	  }
   document.write(" >")
document.write("              </div>")
document.write("        </td>")
document.write("      </tr>")
if (bbnbusiness == "true") {
   document.write("      <tr id='business_contact_label'")
      if (shortform != "false") {
		  document.write("style='display:none;' ")
	  }
   document.write(" align='left' valign='top'>")
   document.write("        <td colspan='2' class='S'><strong><font color='#000000' size='2' face='Arial, Helvetica, sans-serif'>" + ContactNameText + "</font></strong></td>")
   document.write("        </tr>")
   document.write("      <tr id='business_contact'")
      if (shortform != "false") {
		  document.write("style='display:none;' ")
	  }
   document.write(" >")
   document.write("        <td align='center' valign='top' class='S'>&nbsp;</td>")
   document.write("        <td align='left' valign='bottom' class='S'><input type='text' name='name' size='15' maxlength='75' class='input_field' ")
      if (shortform != "false") {
		  document.write("value='Enter Name Here' ")
	  }
   document.write("></td>")
   document.write("      </tr>")
}

if (bbnNoPhone == "true") {
document.write("      <tr>")
document.write("        <td align='center' valign='top' class='S'>&nbsp;</td>")
document.write("        <td align='center' valign='bottom' class='S'>&nbsp;</td>")
document.write("      </tr>")
}
document.write("    </table>")
document.write("    </td>")
document.write("    <td><img src='http://www.broadbandnational.com/images/go.gif' width='36' height='68' onClick='javascript:CallTargus();'></td>")
document.write("  </tr>")
document.write("</table>")

document.write("	</td>")
document.write("  </tr>")
document.write("  <tr>")
document.write("	<td>")

document.write("<table width='100%' height='1' border='0' cellpadding='0' cellspacing='0' bgcolor='#999999'>")
document.write("  <tr>")
document.write("    <td><img src='http://dsl.broadbandnational.com/images/spacer.gif' width='1' height='1'></td>")
document.write("  </tr>")
document.write("</table>")

document.write("<table width='100%' border='0' cellspacing='0' cellpadding='2'>")
if (optin == "true" || extrafield == "true" || call_back == "true") {
   document.write("  <tr>")
   if (optin == "true") {
      document.write("    <TD height=9 align='"); if (extrafield == "true" || call_back == "true") {document.write("left")} else {document.write("center")}; document.write("'><font size='2' face='Arial, Helvetica, sans-serif'>")
      document.write("      <input name='OptIn' type='checkbox' id='OptIn' value='checkbox'")
         if (optin_check == "true") {
		     document.write(" checked")
	     }
      document.write(">")
      document.write(checktext + "</font></TD>")
   }
   if (call_back == "true") {
		document.write("<td align='"); if (extrafield == "true" || optin == "true") {document.write("left")} else {document.write("center")}; document.write("'><input name='call_back' type='checkbox' id='call_back' value='checkbox' " + call_back_checked + ">" + call_back_text + "</td>")
		temp = "<td align='"; if (extrafield == "true" || optin == "true") {temp = temp + "left"} else {temp = temp + "center"}; temp = temp + "'><input name='call_back' type='checkbox' id='call_back' value='checkbox' " + call_back_checked + ">" + call_back_text + "</td>";
		//alert(temp);
   }
   if (extrafield == "true") {
      document.write("<td height=9 align='right'><font size='2' face='Arial, Helvetica, sans-serif'>" + extrafieldtext + " <input type='text' name='extrafield' class='input_field'></td>")
   }
   document.write("  </tr>")
}
document.write("</table>")

document.write("<table width='100%' border='0' cellspacing='0' cellpadding='2'>")
document.write("  <tr class='bbnQualifyFooter'>")
document.write("    <TD>")
if (bbnenterprise == "true") {
   document.write("          <a href='http://www.broadbandnational.com/multi_body.asp?id=" + partnerID + "&FilterOnly=" + filter + "'><font color='#FFFFFF'>&nbsp;&nbsp;&nbsp;&gt;&gt; For Business service in multiple locations, click here!</font></a>")

}
//if (flaghome == true) {
//   document.write("      <input name='rbhome' type='hidden'>")
//}
//if (flagbusiness == true) {
//   document.write("      <input name='rbbusiness' type='hidden'>")
//}
if (optin != "true") {
   document.write("<div id='the_4' style='display: none;'>")
   document.write("<input name='OptIn' type='checkbox' id='OptIn' value='checkbox'>")
   document.write("</div>")
}
if (call_back != "true") {
   document.write("<input style='display: none;' name='call_back' type='checkbox' id='call_back' value='checkbox' " + call_back_checked + ">")
}
document.write("    </TD>")
document.write("    <TD align='right'>")
if (logoHide == "false"){	
	if ((partnerID == "amazon") || (partnerID == "compusa2") || (partnerID == "compusabiz") || (partnerID == "1090")){			document.write("<p align='right'><img 		src='http://www.broadbandnational.com/images/poweredbybbn.gif' width='88' height='31' border='0'></p>")} 
	else {document.write("<p align='right'><img src='" + PoweredBy + "' width='88' height='31'></p>")};
}
document.write("    </TD>")
document.write("  </tr>")
document.write("</table>   ")

document.write("	</td>")
document.write("  </tr>")
document.write("</table>")
document.write("<input type='radio' name='rbmulti' style='display:none;'>")

document.write("</form>")
document.write("\
			   <table width='100%' cellpadding='0' cellspacing='0'><tr><td align='right'>\
			   		<span align='right' style='font:Arial, Helvetica, sans-serif;font-size:10px;'>\
						<a href='//www.broadbandnational.com/index.asp?section=general&file=privacy&id=" + partnerID + "'>\
							View Privacy Policy\
						</a>\
					</span>\
				</td></tr></table>")
