﻿
var ERROR_DISPLAY = 'ALERT';
var PARTNER = '';
var DOMAIN_ID = ''; //(5083612 - relocation)  (5082489 - vanlins)
var INITIAL_SERVICE = '1001';
var SCRIPTS_URL = 'http://www.vanlines.com/JSForm/Zips/';
var REDIRECT_URL = 'http://www.vanlines.com/RemoteTracking.aspx';
	
var Type = '';
var Service = '';
var FromPostal = '';
var FromCountry = '1';
var ToCountry = '1';
var ToState = '';
var ToCity = '';
var Size = '';
var MovingDate = '';
var FirstName = '';
var LastName = '';
var Email = '';
var DayTel = '';
var EveningTel = '';
var VehicleType = '';
var VehicleMake = '';
var VehicleModel = '';
var VehicleYear = '';
var VehicleCondition = '';

function Init()
{
    var ddl = document.getElementById('ddlMovingType');
    if( ddl != null ) 
    {
        ddl.value = INITIAL_SERVICE;
        MovingTypeChange(ddl);
	    InitilizeDdlState('ddlMovingToState'); 
	    InitilizeDdlState('ddlAutoToState');
    }
    
    var oBody = document.getElementsByTagName('body').item(0);
    if (oBody != null) {
        var oScript = document.createElement("script");
        oScript.type = "text/javascript";
        oScript.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js";
        oBody.appendChild(oScript);
    }
}

function AddJS(state) {
    var src = SCRIPTS_URL + state + '.js';

    $.ajax({
        type: "GET",
        url: src,
        dataType: "script"
    });
}

function GetMovingService(ddl) {
    var script = document.getElementById('zipjs');

    ddl = document.getElementById(ddl);

    if (ddl != null) {
        var val = ddl.value;
        if (val != '1013' && val != '1000') {

            var txt = document.getElementById('txtMovingZipCode');
            var ddlTo = document.getElementById('ddlMovingToState');

            var i = 0;
            while (typeof (z) == 'undefined') {
                setTimeout('', 1000);
                i++;
                if( i > 5 )
                {
                    return '1001';
                }
            }

            if (z != null && txt != null) {
                val = z[parseInt(txt.value, 10)] == ddlTo.value ? '1012' : '1001';
            }
        }

        return val;
    }

    return '1001';
}

function SHElement(el, dis) {
    el = document.getElementById(el);
    if (el != null) {
        el.style.display = dis;
    }
}

function GetValue(el) {
    el = document.getElementById(el);
    if (el != null
        && !(el.type == 'select-one' && el.selectedIndex == 0)) {
        return el.value;
    }

    return '';
}

function GetText(el) {
    el = document.getElementById(el);
    if (el != null && el.options != null && el.options.length > 0 && el.selectedIndex != 0) {
        return el.options[el.selectedIndex].innerHTML;
    }

    return '';
}

function MovingTypeChange(ddl) 
{
    if( ddl != null ) 
    {
        Service = ddl.value;
	    switch (ddl.value) {
		    case ('1001'):
		    case ('1013'):
		        SHElement('trMovingZipCode', 'block');
		        SHElement('trMovingToState', 'block');
		        SHElement('trMovingSize', 'block');
		        SHElement('trAutoZipCode', 'none');
		        SHElement('trAutoToState', 'none');
		        SHElement('trCarInfo', 'none');
			    break;
		    case ('1002'):
		        SHElement('trMovingZipCode', 'none');
		        SHElement('trMovingToState', 'none');
		        SHElement('trMovingSize', 'none');
		        SHElement('trAutoZipCode', 'block');
		        SHElement('trAutoToState', 'block');
		        SHElement('trCarInfo', 'block');
			    break;			
	    }
	    SetFormTitle();
	}
}

function SetFormTitle()
{
    var ddl = document.getElementById('ddlMovingType');
    var spn = document.getElementById('spnTitle');
    
    if( ddl != null && spn != null ) 
    {
        switch( ddl.value ) 
        {
           case('1002'):
            SHElement('divUloadWarning', 'none');
			spn.innerHTML = "<div class='h1_'>Get Free Auto Transport Quotes</div>";
			break;
		case('1001'):
		    SHElement('divUloadWarning', 'none');
			spn.innerHTML = "<div class='h1_'>Get Free Moving Quotes</div>";
			break;
		case('1013'):
			SHElement('divUloadWarning', 'block');
			spn.innerHTML = "<div class='h1_'>Get Free Self Service Moving Quotes</div>";
			break; 
        }
    }
}

function ValidateFields(el, val, err) {
    el = document.getElementById(el);

    if (el != null && el.value == val) {
        return err;
    }

    return '';
}

function ValidateZipCode(el, err)
{
    el = document.getElementById(el);
    if( el != null && el.value.length > 0 && el.value.match(/^\d{5}$/) == null)
    {      
        return err;
    }
    
    return '';
}

function ValidateVehicleYear(vehicleYear)
{
	if (vehicleYear > 1900)
		return true;
	else
		return false;
}

function ValidateDate( el, req, valid, format ) 
{
    el = document.getElementById(el);
    if( el != null ) 
    {
        if( el.length <= 0 ) 
        {
            return req;
        }
        else if( el.value.match(/^\d{1,2}\/\d{1,2}\/\d{2,4}$/) == null)
        {
            return format;
        }
        else
        {
            var myArray = el.value.split("/");
	        var day = myArray[1];
	        var month = myArray[0];
	        var year = myArray[2];
	        
	        if (year < 2000) 
	        {
	            year = '20' + year;
	        }
	        
	        var myDate = new Date();
	        var today = new Date();
	        myDate.setFullYear(year,month - 1, day);
	        
	        if( myDate < today ) 
	        {
	            return valid;
	        }
	        
	        if( myDate > today.setDate(parseInt(today.getDate()) + 180)) 
	        {
	            return 'Date cannot be more than 180 days in the future.\n\r';
	        }
        }
    }
    return '';
}

function ValidateEmail( el, req, valid ) 
{
    el = document.getElementById(el);
    if( el != null ) 
    {
        if( el.value.length <= 0 )
        {
            return req;
        }
        else if( el.value.match(/\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,6}/) == null )
        {
            return valid;
        }
    }
    
    return '';
}

function ValidatePhone( day, night, req, daye, nighte )
{
    day = document.getElementById( day );
    night = document.getElementById( night );
    
    if( day != null && night != null )
    {
        if( day.value.length + night.value.length <= 0 ) 
        {
            return req;
        }
        else
        {
            var err = '';
            if( day.value.length > 0 && !ValidateTelephone(day.value)) 
            {
                err += daye;
            }
            
            if( night.value.length > 0 && !ValidateTelephone(night.value))
            {
                err += nighte;
            }
            
            return err;
        }
    }
}

function ValidateTelephone(telephone)
{
	telephone = replaceIt(telephone, ' ', ''); 
	telephone = replaceIt(telephone, '.', '');
	telephone = replaceIt(telephone, '(', '');
	telephone = replaceIt(telephone, ')', '');
	telephone = replaceIt(telephone, '-', '');


	if (telephone.match(/^1? ?-?\(?\d{3}\)?.?-? ?\d{3}-?.? ?\d{4}$/) == null) 
	{
		return false;
	}
	else
	{
		if (telephone.length != 10)
			return false;
		else
			return true;
	}
}		

function replaceIt(sString, sReplaceThis, sWithThis) 
{ 
	if (sReplaceThis != "" && sReplaceThis != sWithThis) 
	{ 
		var index = 0;
		var counter = 0; 
		var start = 0; 
		var before = ""; 
		var after = ""; 
		while (counter<sString.length) 
		{ 
			index++;
			start = sString.indexOf(sReplaceThis, counter); 
			if (start == -1) 
			{ 
				break; 
			} 
			else 
			{ 
				before = sString.substr(0, start); 
				after = sString.substr(start + sReplaceThis.length, sString.length); 
				sString = before + sWithThis + after; 
				counter = before.length + sWithThis.length;
				sString = sString.replace('##REPLACEID##',index); 
			} 
		} 
	} 
	return sString; 
} 

function ValidateZipState(zip, to, err) {
    var txt = document.getElementById(zip);
    var ddlTo = document.getElementById(to);

    var i = 0;
    while (typeof (z) == 'undefined') {
        setTimeout('', 1000);
        i++;
        if( i > 5 )
        {
            return '';
        }
    }
    
    if (z != null && txt != null && ddlTo != null && z[parseInt(txt.value, 10)] == ddlTo.value) {
        return err;
    }

    return '';
}

function Validate()
{
    var ddl = document.getElementById('ddlMovingType');
	var Errors = '';
	
	if( ddl != null ) 
	{
	    switch(ddl.value)
	    {
		    case('1001'):
		    case('1013'):
		        if( ddl.value == 1013 )
                {
                    Errors += ValidateZipState( 'txtMovingZipCode', 'ddlMovingToState', 'U-Load is not available within the same state\n\r');
                }
                
		        Errors += ValidateFields( 'txtMovingZipCode', '', 'From ZipCode - Required\n\r' );
                Errors += ValidateZipCode( 'txtMovingZipCode', 'From ZipCode - Invalid\n\r' );
                Errors += ValidateFields( 'txtMovingToCity', '', 'To City - Required\n\r' );
                Errors += ValidateFields( 'ddlMovingToState', '-1', 'To State - Required\n\r' );
                Errors += ValidateFields( 'ddlMovingSize', '0000', 'Moving Size - Required\n\r' );              
                
			    break;
		    case('1002'):
		        Errors += ValidateZipState('txtAutoZipCode', 'ddlAutoToState', 'Moving a Car is not available within the same state\n\r');
		        Errors += ValidateFields( 'txtAutoZipCode', '', 'From ZipCode - Required\n\r' );
                Errors += ValidateZipCode( 'txtMovingZipCode', 'From ZipCode - Invalid\n\r' );
                Errors += ValidateFields( 'txtAutoToCity', '', 'To City - Required\n\r' );
                Errors += ValidateFields( 'ddlAutoToState', '-1', 'To State - Required\n\r' );
                Errors += ValidateFields( 'ddlVehicleType', '', 'Vehicle Type - Required\n\r' );
                Errors += ValidateFields( 'txtVehicleMake', '', 'Vehicle Make - Required\n\r' );
                Errors += ValidateFields( 'txtVehicleModel', '', 'Vehicle Model - Required\n\r' );
                Errors += ValidateFields( 'txtVehicleYear', '', 'Vehicle Year - Required\n\r' );            
                
                var year = document.getElementById('txtVehicleYear');
                if( year != null && year.value < 1900) 
                {
                    Errors += 'Vehicle Year - Invalid\n\r';
                }
                
                Errors += ValidateFields( 'ddlVehicleCondition', '', 'Vehicle Condition - Required\n\r' );                            
	    }
	}
	
	Errors += ValidateDate( 'txtMovingDate', 'Moving Date - Required\n\r', 'Invalid Date - Must be a future date\n\r', 'Invalid Date Format mm/dd/yy\n\r' );
	Errors += ValidateFields( 'txtFirstName', '', 'First Name - Required\n\r' );
	Errors += ValidateFields( 'txtLastName', '', 'Last Name - Required\n\r' );
	Errors += ValidateEmail( 'txtEmail', 'Email - Required\n\r', 'Email - Invalid\n\r' );
	Errors += ValidatePhone( 'txtDayPhone', 'txtEveningPhone', 'Atleast one telephone is required\n\r', 'Day Phone - invalid\n\r', 'Evening Phone - invalid\n\r' );
	
	if (Errors != '')
	{
		if (ERROR_DISPLAY == 'ALERT')
		{
			alert(Errors);
		}
			
		return false;
	}
	else
	{
		return true;
	}
}

function SubmitForm() 
{
    var queryString = '?Type=movingquote';
    queryString += '&ToCountry=1';
    queryString += '&FromCountry=1';
    queryString += GetValue('txtMovingDate') != '' ? "&MovingDate=" + GetValue('txtMovingDate') : '';
    queryString += GetValue('txtFirstName') != '' ? "&FirstName=" + GetValue('txtFirstName') : ''; 
    queryString += GetValue('txtLastName') != '' ? "&LastName=" + GetValue('txtLastName') : ''; 
    queryString += GetValue('txtEmail') != '' ? "&Email=" + GetValue('txtEmail') : ''; 
    queryString += GetValue('txtDayPhone') != '' ? "&DayTel=" + GetValue('txtDayPhone') : ''; 
    queryString += GetValue('txtEveningPhone') != '' ? "&EveningTel=" + GetValue('txtEveningPhone') : ''; 
    queryString += PARTNER != '' ? "&Partner=" + PARTNER : '';
	queryString += DOMAIN_ID != '' ? "&Domain_ID=" + DOMAIN_ID : '';
	queryString += "&IP=JSWidget";
		        		        
    if (Validate())
	{
	    switch(Service)
	    {
		    case('1002'):
		        queryString += '&Service=1002';
		        queryString += GetValue('txtAutoZipCode') != '' ? "&FromPostal=" + GetValue('txtAutoZipCode') : '';       
		        queryString += GetValue('txtAutoToCity') != '' ? "&ToCity=" + GetValue('txtAutoToCity') : '';
		        queryString += GetValue('ddlAutoToState') != '' ? "&ToState=" + GetValue('ddlAutoToState') : '';       
		        
		        queryString += GetValue('ddlVehicleType') != '' ? "&VehicleType=" + GetValue('ddlVehicleType') : ''; 
		        queryString += GetValue('txtVehicleMake') != '' ? "&VehicleMake=" + GetValue('txtVehicleMake') : ''; 
		        queryString += GetValue('txtVehicleModel') != '' ? "&VehicleModel=" + GetValue('txtVehicleModel') : '';
		        queryString += GetValue('txtVehicleYear') != '' ? "&VehicleYear=" + GetValue('txtVehicleYear') : '';
		        queryString += GetValue('ddlVehicleCondition') != '' ? "&VehicleCondition=" + GetValue('ddlVehicleCondition') : '';
		        		
			    break;
		    case('1001'):
		    case('1013'):
		    
		        var ms = GetMovingService('ddlMovingType');
                if (ms == '') {
                    ms = '1001';
                }
		        
		        queryString += '&Service=' + ms;
		        queryString += GetValue('txtMovingZipCode') != '' ? "&FromPostal=" + GetValue('txtMovingZipCode') : '';       
		        queryString += GetValue('txtMovingToCity') != '' ? "&ToCity=" + GetValue('txtMovingToCity') : '';
		        queryString += GetValue('ddlMovingToState') != '' ? "&ToState=" + GetValue('ddlMovingToState') : '';
		        queryString += GetValue('ddlMovingSize') != '' ? "&Size=" + GetValue('ddlMovingSize') : '';
		        		
			    break;		
	    }
	    
	    pic1 = new Image(1, 1);
        pic1.src = REDIRECT_URL + queryString;
        
        SHElement( 'dvForm', 'none' );
        SHElement( 'dvThankYou', 'block' );
	    
	}
}

var stateIdArray = new Array(-1,4,3,6,5,7,8,9,11,10,12,13,14,15,17,18,19,16,20,21,22,25,24,23,26,27,29,28,30,33,37,34,35,36,38,31,32,39,40,41,42,43,44,45,46,47,48,49,52,51,50,53,55,54,56);
var stateNameArray = new Array("Select a state","Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","District of Columbia","Florida","Georgia","Guam","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Puerto Rico","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virgin Islands","Virginia","Washington","West Virginia","Wisconsin","Wyoming");
function InitilizeDdlState(objId)
{
	document.getElementById(objId).options.length = 0;
	for(var i=0; i< stateIdArray.length; i++) 
	{	
	    var anOptionA = new Option(stateNameArray[i],stateIdArray[i]);
	    document.getElementById(objId).options.add(anOptionA);
	}
}

function CreateForm()
{

var html = '';
html += "<link href='http://www.vanlines.com/css/QuoteForm_v1001.css' rel='stylesheet' type='text/css' />";
html += "<div class='fullform'>";
html += "	<div class='divtop'><!-- --></div>";
html += "	<div class='ff_wrap'>";
html += "		<div id='divUloadWarning'></div>";
html += "		<span id='spnTitle'><div class='h1_'>Get Free Moving Quotes</div></span>";
html += "		<div id='dvForm'>";
html += "			<div class='ff_head'>";
html += "				<div class='desc_'>Please choose any of the services below to get a quick quote for your upcoming move.</div>";
html += "				<div id='div1' style='display:none'>";
html += "					* Please note:<br />";
html += "					This service is for out-of-state moves only. If you need help moving within the same state, please select 'Full Service Movers' from the list below.";
html += "				</div>";
html += "			</div>";
html += "			<div class='ff_body'>";
html += "				<div class='ff_segment'>";
html += "					<div class='headset'><div class='h2_'>Services:</div></div>";
html += "					<div class='segment_wrap'>";
html += "						<div class='sf_tt_height'><!-- --></div>";
html += "						<div class='segment_fields'>";
html += "							<div class='sf_field'>Service Needed:</div>";
html += "							<div class='sf_value'>";
html += "								<select id='ddlMovingType' onchange='MovingTypeChange(this)' onkeyup='MovingTypeChange(this)'>";
html += "									<option value='1001'>Full Service Movers</option>";
html += "									<option value='1002'>Moving a Car</option>";
html += "									<option value='1013'>U-Load They'll Drive</option>";
html += "								</select>";
html += "							</div>";
html += "						</div>";
html += "						<div class='sf_ff_height'><!-- --></div>";
html += "					</div>";
html += "					<div class='segment_footer'><!-- --></div>";
html += "				</div>";
html += "				<div class='ff_segment'>";
html += "					<div class='headset'><div class='h2_'>Moving From:</div></div>";
html += "					<div class='segment_wrap'>";
html += "						<div class='sf_tt_height'><!-- --></div>";
html += "						<div class='segment_fields' id='trAutoZipCode' style='display:none'>";
html += "							<div class='sf_field'>Shipping Zip Code:</div>";
html += "							<div class='sf_value'>";
html += "								<input type='text' maxlength='5' id='txtAutoZipCode' />";
html += "							</div>";
html += "						</div>";
html += "						<div class='segment_fields' id='trMovingZipCode' style='display:block'>";
html += "							<div class='sf_field'>Moving From Zip Code:</div>";
html += "							<div class='sf_value'>";
html += "								<input type='text' class='sf_zip' maxlength='5' id='txtMovingZipCode' />";
html += "							</div>";
html += "						</div>";
html += "						<div class='sf_ff_height'><!-- --></div>";
html += "					</div>";
html += "					<div class='segment_footer'><!-- --></div>";
html += "				</div>";
html += "				<div class='ff_segment'>";
html += "					<div class='headset'><div class='h2_'>Moving To:</div></div>";
html += "					<div class='segment_wrap' id='trAutoToState' style='display:none'>";
html += "						<div class='sf_tt_height'><!-- --></div>";
html += "						<div class='segment_fields'> ";
html += "							<div class='sf_field'>City:</div>";
html += "							<div class='sf_value'>";
html += "								<input type='text' id='txtAutoToCity' />";
html += "							</div>";
html += "						</div>";
html += "						<div class='sf_ff_height'><!-- --></div>";
html += "						<div class='segment_fields'> ";
html += "							<div class='sf_field'>State Shipping To:</div>";
html += "							<div class='sf_value'>";
html += "								<select id='ddlAutoToState' onchange=\"AddJS(this.value);setTimeout('', 2000);\"></select>";
html += "							</div>";
html += "						</div>";
html += "						<div class='sf_ff_height'><!-- --></div>";
html += "					</div>";
html += "					<div class='segment_wrap' id='trMovingToState' style='display:block'>";
html += "						<div class='sf_tt_height'><!-- --></div>";
html += "						<div class='segment_fields'>";
html += "							<div class='sf_field'>City:</div>";
html += "							<div class='sf_value'>";
html += "								<input type='text' id='txtMovingToCity' />";
html += "							</div>";
html += "						</div>";
html += "						<div class='sf_ff_height'><!-- --></div>";
html += "						<div class='segment_fields'>";
html += "							<div class='sf_field'>I am Moving To:</div>";
html += "							<div class='sf_value'>";
html += "								<select id='ddlMovingToState' onchange=\"AddJS(this.value);setTimeout('', 2000);\" ></select>";
html += "							</div>";
html += "						</div>";
html += "						<div class='sf_ff_height'><!-- --></div>";
html += "					</div>";
html += "					<div class='segment_footer'><!-- --></div>";
html += "				</div>";
html += "				<div class='ff_segment'>";
html += "					<div class='headset'><div class='h2_'>Moving Info:</div></div>";
html += "					<div class='segment_wrap'>";
html += "						<div class='segment_fields' id='trMovingSize' style='display:block'>";
html += "							<div class='sf_field'>Size Of Move:</div>";
html += "							<div class='sf_value'>";
html += "								<select id='ddlMovingSize'>";
html += "									<option value='0000'>Select Weight</option>";
html += "									<option value='0602'>Studio 1500 lbs</option>";
html += "									<option value='0604'>1 BR Small 3000 lbs</option>";
html += "									<option value='0605'>1 BR Large 4000 lbs</option>";
html += "									<option value='0606'>2 BR Small 4500 lbs</option>";
html += "									<option value='0607'>2 BR Large 6500 lbs</option>";
html += "									<option value='0608'>3 BR Small 8000 lbs</option>";
html += "									<option value='0609'>3 BR Large 9000 lbs</option>";
html += "									<option value='0610'>4 BR Small 10000 lbs</option>";
html += "									<option value='0612'>4 BR Large 12000 lbs</option>";
html += "									<option value='0611'>Over 12000 lbs</option>";
html += "								</select>";
html += "							</div>";
html += "						</div>";
html += "						<div class='sf_ff_height'><!-- --></div>";
html += "						<div class='segment_fields'>";
html += "							<div class='sf_field'>Date of Move:</div>";
html += "							<div class='sf_value'>";
html += "								<input type='text' class='sf_date' id='txtMovingDate' value='mm/dd/yy' onfocus=\"if(this.value=='mm/dd/yy') {this.value='';}\" onblur=\"if(this.value=='') {this.value='mm/dd/yy';}\" />";
html += "							</div>";
html += "						</div>";
html += "						<div class='sf_ff_height'><!-- --></div>";
html += "					</div>";
html += "					<div class='segment_footer'><!-- --></div>";
html += "				</div>";
html += "				<div class='ff_segment' id='trCarInfo' style='display:none'>";
html += "					<div class='headset'><div class='h2_'>Vehicle Information:</div></div>";
html += "					<div class='segment_wrap'>";
html += "						<div class='segment_fields'>";
html += "							<div class='car_wrap'>";
html += "								<div class='car_field'>";
html += "									Vehicle Type<br />";
html += "									<select id='ddlVehicleType'>";
html += "										<option value='0ZC'>Car</option>";
html += "										<option value='0ZM'>Motorcycle</option>";
html += "										<option value='0ZU'>SUV</option>";
html += "										<option value='0ZT'>Truck</option>";
html += "										<option value='0ZV'>Van</option>";
html += "										<option value='0ZOT'>Other</option>";
html += "									</select>";
html += "								</div>";
html += "								<div class='car_field'>";
html += "									Running?<br />";
html += "									<select id='ddlVehicleCondition'>";
html += "										<option value='0U01'>Yes</option>";
html += "										<option value='0U00'>No</option>";
html += "									</select>";
html += "								</div>";
html += "							</div>";
html += "							<div class='car_wrap'>";
html += "								<div class='car_field'>";
html += "									Make<br />";
html += "									<input type='text' id='txtVehicleMake' />";
html += "								</div>";
html += "								<div class='car_field'>";
html += "									Model<br />";
html += "									<input type='text' id='txtVehicleModel' />";
html += "								</div>";
html += "								<div class='car_field'>";
html += "									Year<br />";
html += "									<input type='text' id='txtVehicleYear' />";
html += "								</div>";
html += "							</div>";
html += "						</div>";
html += "						<div class='sf_ff_height'><!-- --></div>";
html += "					</div>";
html += "					<div class='segment_footer'><!-- --></div>";
html += "				</div>";
html += "				<div class='ff_segment'>";
html += "					<div class='headset'>";
html += "						<div class='h2_'>Contact Information:</div>";
html += "					</div>";
html += "					<div class='segment_wrap'>";
html += "						<div class='sf_tt_height'><!-- --></div>";
html += "						<div class='segment_fields'>";
html += "							<div class='sf_field'>First Name:</div>";
html += "							<div class='sf_value'>";
html += "								<input type='text' id='txtFirstName' />";
html += "							</div>";
html += "						</div>";
html += "						<div class='sf_ff_height'><!-- --></div>";
html += "						<div class='segment_fields'>";
html += "							<div class='sf_field'>Last Name:</div>";
html += "							<div class='sf_value'>";
html += "								<input type='text' id='txtLastName' />";
html += "							</div>";
html += "						</div>";
html += "						<div class='sf_ff_height'><!-- --></div>";
html += "						<div class='segment_fields'>";
html += "							<div class='sf_field'>Email:</div>";
html += "							<div class='sf_value'>";
html += "								<input type='text' id='txtEmail' />";
html += "							</div>";
html += "						</div>";
html += "						<div class='sf_ff_height'><!-- --></div>";
html += "						<div class='segment_fields'>";
html += "							<div class='sf_field'>Day Phone:</div>";
html += "							<div class='sf_value'>";
html += "								<input type='text' id='txtDayPhone' />";
html += "							</div>";
html += "						</div>";
html += "						<div class='sf_ff_height'><!-- --></div>";
html += "						<div class='segment_fields'>";
html += "							<div class='sf_field'>Evening Phone:</div>";
html += "							<div class='sf_value'>";
html += "								<input type='text' id='txtEveningPhone' />";
html += "							</div>";
html += "						</div>";
html += "						<div class='sf_ff_height'><!-- --></div>";
html += "					</div>";
html += "					<div class='segment_footer'><!-- --></div>";
html += "				</div>";
html += "				<div class='ff_segment'>";
html += "					<div class='sf_button'><input type='button' value='Done' onclick='SubmitForm()'/></div>";
html += "				</div>";
html += "			</div>";
html += "		</div>";
html += "		<div id='dvThankYou' style='display:none'>";
html += "			<b>Thank You</b><br />";
html += "			You will be contacted shortly.";
html += "		</div>";
html += "	</div>";
html += "	<div class='divbot'><!-- --></div>";
html += "</div>";

	
	document.write(html);
    
	setTimeout("Init();", 1500);
}

//setTimeout("Init();", 1500);
