Disp profile
Posted in Text, on January 13, 2012 at 15:33
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
<html>
<head>
<title>Update Tenant Profile</title>
<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js\"></script>
<!--#include file=\"pageLoadPub.inc\"-->
<!--#include file=\"appl_scope.inc\"-->
<link href=\"stylesheets/pvs_<%= style %>.css\" rel=\"stylesheet\" type=\"text/css\">		
<% 	
Dim given_states(55)

given_states(0) = \"AL\" 	
given_states(1) = \"DC\" 	
given_states(2) = \"KS\" 	
given_states(3) = \"MS\" 	
given_states(4) = \"NY\" 	
given_states(5) = \"SC\" 	
given_states(6) = \"WV\"
given_states(7) = \"AK\" 	
given_states(8) = \"FL\" 	
given_states(9) = \"KY\" 	
given_states(10) = \"MO\" 	
given_states(11) = \"NC\" 	
given_states(12) = \"SD\" 	
given_states(13) = \"WI\"
given_states(14) = \"AZ\" 	
given_states(15) = \"GA\" 	
given_states(16) = \"LA\" 	
given_states(17) = \"MT\" 	
given_states(18) = \"ND\" 	
given_states(19) = \"TN\" 	
given_states(20) = \"WY\"
given_states(21) = \"AR\" 	
given_states(22) = \"HI\" 	
given_states(23) = \"ME\" 	
given_states(24) = \"NE\" 	
given_states(25) = \"OH\" 	
given_states(26) = \"TX\" 	
given_states(27) = \"ALL USA\"
given_states(28) = \"CA\" 	
given_states(29) = \"ID\" 	
given_states(30) = \"MD\" 	
given_states(31) = \"NV\" 	
given_states(32) = \"OK\" 	
given_states(33) = \"UT\" 	
given_states(34) = \"Puerto Rico\"
given_states(35) = \"CO\" 	
given_states(36) = \"IL\" 	
given_states(37) = \"MA\" 	
given_states(38) = \"NH\" 	
given_states(39) = \"OR\" 	
given_states(40) = \"VT\" 	
given_states(41) = \"Virgin Islands\"
given_states(42) = \"CT\" 	
given_states(43) = \"IN\" 	
given_states(44) = \"MI\" 	
given_states(45) = \"NJ\" 	
given_states(46) = \"PA\" 	
given_states(47) = \"VA\" 	
given_states(48) = \"Canada\"
given_states(49) = \"DE\" 	
given_states(50) = \"IA\" 	
given_states(51) = \"MN\" 	
given_states(52) = \"NM\" 	
given_states(53) = \"RI\" 	
given_states(54) = \"WA\" 	
given_states(55) = \"Mexico\" 

function PhoneFormat(Phone)
  Dim AreaCode, Firstthree, Lastfour

	AreaCode = \"(\" & Left(Phone,3) & \") \"
	Firstthree = Mid(Phone,4,3) & \"-\"
	Lastfour = Right(Phone,4)
	PhoneFormat = AreaCode & Firstthree & Lastfour
end function 	

function ZipFormat
Dim Regular, Extended

	Regular = Left(Zip,5)
	Extended = \"-\" & Right(Zip,4)
	ZipFormat = Regular & Extended
end function 

function stateToStateId
  if state = \"Puerto Rico\" then 
    state_id = \"PR\"
  elseif state = \"Virgin Islands\" then 
    state_id = \"VI\"
  else 
    state_id = state
  end if  
  
  stateToStateId = state_id
end function 
%>
</head>
<body background=\"images/bg_low.gif\" topmargin=\"0\" leftmargin=\"0\" marginheight=\"0\" marginwidth=\"0\" bgcolor=\"#ffffff\">
<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"1020\">
  <tr>
    <td width=\"868\" bgcolor=\"#781B2C\"><img src=\"images/index/header.gif\" width=\"431\" height=\"95\" border=\"0\" alt=\"PlainVanillaShell\"></td>
    <td width=\"152\" align=\"right\" valign=\"top\" bgcolor=\"#781B2C\" class=\"hdrtext\"><% 
			thisPage = Server.URLEncode(Request.ServerVariables(\"SCRIPT_NAME\"))
			qstring = Server.URLEncode(Request.QueryString)
			Response.write \"You are signed in as  <br>\" & username & \"  <br><br>\"
			prevString = thispage & \"?\"
			if qstring <> \"\" then prevString = prevString & qstring & \"&\"
			if username <> \"guest\" then
				prevString = prevString & \"reason=wrong\"
				Response.write \"<a href=\'\" & rootPath & \"register.asp?prevfile=\" & prevString & \"\' class=\'smhdrlink\'>\"
				Response.write \"Not \" & username & \"?</a>  \"
		   	else
				prevString = prevString & \"reason=new\"
				Response.write \"<a href=\'\" & rootPath & \"register.asp?prevfile=\" & prevString & \"\' class=\'smhdrlink\'>\"
				Response.write \"Sign in now</a>  \"
		   	end if 
		%></td>
  </tr>
</table>
<img src=\"images/top_nav.gif\" alt=\"topnav\" width=\"1020\" height=\"20\" border=\"0\" align=\"top\" usemap=\"#top_nav_map\">
<MAP NAME=\"top_nav_map\">
  <area shape=\"RECT\" coords=\"3,2,69,18\" href=\"index.asp\" alt=\"Home\">
  <area shape=\"RECT\" coords=\"94,2,260,18\" href=\"research.asp\" alt=\"Tenant Research\">
  <area shape=\"RECT\" coords=\"284,2,421,18\" href=\"industry.asp\" alt=\"News Archive\">
  <area shape=\"RECT\" coords=\"441,2,548,18\" href=\"features.asp\" alt=\"Editorial Features\">
  <area shape=\"RECT\" coords=\"568,2,702,18\" href=\"marketplace.asp\" alt=\"Retail Real Estate Marketplace\">
  <area shape=\"RECT\" coords=\"730,2,839,18\" href=\"contact.asp\" alt=\"Contact Us\">
  <area shape=\"RECT\" coords=\"865,3,1010,18\" href=\"subscribe_info.asp\" alt=\"Subscription Info\">
</MAP>
<MAP NAME=\"top_nav_map\">
  <area shape=\"RECT\" coords=\"3,2,69,18\" href=\"index.asp\" alt=\"Home\">
  <area shape=\"RECT\" coords=\"94,2,260,18\" href=\"research.asp\" alt=\"Tenant Research\">
  <area shape=\"RECT\" coords=\"284,2,421,18\" href=\"industry.asp\" alt=\"News Archive\">
  <area shape=\"RECT\" coords=\"441,2,548,18\" href=\"features.asp\" alt=\"Editorial Features\">
  <area shape=\"RECT\" coords=\"568,2,702,18\" href=\"marketplace.asp\" alt=\"Retail Real Estate Marketplace\">
  <area shape=\"RECT\" coords=\"730,2,839,18\" href=\"contact.asp\" alt=\"Contact Us\">
  <area shape=\"RECT\" coords=\"865,3,1010,18\" href=\"subscribe_info.asp\" alt=\"Subscription Info\">
</MAP>
<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"1020\">
  <tr>
<td width=\"68\" valign=\"top\" nowrap bgcolor=\"#781B2C\"><img src=\"images/submission/header_left.gif\" width=\"68\" height=\"470\" border=\"0\" alt=\"About Us\"></td>
	<td width=\"22\" valign=\"top\" nowrap> </td>
	<td valign=\"top\" class=\"stdCopy\"><br>
	<p><img src=\"images/submission/header_body.gif\" width=\"400\" height=\"32\" border=\"0\" alt=\"\"></p>
<%
verification = Request.QueryString(\"verif\")
account = Request.QueryString(\"acct\")

if account = \"\" then
  verification = request.form(\"verification\")
  account = Request(\"ACCOUNT\")
end if
  
if verification = \"\" then
	call getVerification
else 
	Dim objConn, objrs, sqltxt
	Set objConn = Server.CreateObject(\"ADODB.Connection\")
	set objRS = Server.CreateObject(\"ADODB.Recordset\")       
	set dirdataRS = Server.CreateObject(\"ADODB.Recordset\")       
	objConn.Open \"Provider=SQLNCLI10;\" & \"DSN=\" & Application(\"DSNName\") & \";UID=\" & Application(\"dbUser\") &_
		\";Password=\" & Application(\"dbPW\")				     	\'Open Database Connection
	objRS.Open \"pvs_getRTDInfo \'\" & account & \"\', \'\" & verification &_
		\"\'\", objConn, adOpenForwardOnly, adCmdStoredProc 
	if objRS.BOF or objRS.EOF then
		message1 = \"The Verification Code you entered - \" & verification & \" does not match our records. \"
		message1 = message1 & \"Please check to be sure you have typed it correctly and try entering again. \"
		message1 = message1 & \"If you continue to experience problems, call us at 416-490-1090 for assistance.\"
		call getVerification
	Else
		contact = objRS(\"contact\")
		objRS.close
		Dim DispAccount, DirBaseQuery, DirBaseList, DirDataList
		Dim ExecQuery, ExecList, LeasingQuery, LeasingList
		dim strDescription, h, i, j

		h = 1
		i = 1
		j = 1

		DirBaseQuery = \"SELECT * FROM DIRBASE WHERE ACCOUNT = \'\" & account & \"\'\"

		ExecQuery = \"SELECT ACCOUNT, TITLE, NAME, EMAIL FROM direxec WHERE ACCOUNT = \'\" & account &_
				 \"\' AND EXECTYPE = \'E\' ORDER BY SORTSEQ\"

		NewsQuery = \"SELECT DIRMEMO.DATA FROM DIRMEMO WHERE ACCOUNT = \'\" & account & \"\'\"

		LeasingQuery = \"SELECT * FROM direxec WHERE ACCOUNT = \'\" & account & \"\'\" &_
				\"AND (EXECTYPE = \'C\' OR EXECTYPE = \'A\') ORDER BY SORTSEQ, EXECTYPE DESC\"

		objRS.Open NewsQuery, objConn, adOpenStatic, adLockReadOnly
		datarCnt = objRS.RecordCount
		Set DirBaseList = objConn.Execute(DirBaseQuery)
		Set ExecList = objConn.Execute(ExecQuery)
		Set LeasingList = Server.CreateObject(\"ADODB.Recordset\")
		LeasingList.Open LeasingQuery, objConn, adOpenStatic, adLockReadOnly
		leasingrCnt = LeasingList.RecordCount
%>

	<%	If MESSAGE <> \"\" Then %>	
			<CENTER>
			<b class=\"stdBold\"><%= MESSAGE %></b>
			</CENTER>	
	<% 	Else %>
			<p style=\"width: 80%;\">The information we currently have on file for your company appears below. Items that appear in <span class=\"stdBold\">bold face type</span> are required in order to include your company in the new edition. Please make any corrections and/or additions to the information in the boxes below, and then submit the form using the button at the bottom of this page. <span class=\"stdBold\">Even if you do not make any changes, please submit the form so that we know you\'ve checked it for accuracy.</span> Thank you for your assistance.  
      </p>
	<% 	End If %>
		<FORM id=new_prof name=new_prof action=send_profile_update.asp method=post>
		<input type=\"hidden\" name=\"account\" value=\"<%= account %>\">
		<BR>		 
		<TABLE width=\"600\">
		<tr>
			<td width=\"75\"></td>
			<td width=\"75\"></td>
			<td width=\"75\"></td>
			<td width=\"75\"></td>
			<td width=\"75\"></td>
			<td width=\"75\"></td>
			<td width=\"75\"></td>
			<td width=\"75\"></td>
		</tr>	
		<tr>
          	<td colspan=\"8\" class=\"lgBoldBlue\"><h2><%= DirBaseList(\"Company1\") %></h2></td>
		</tr>
        <tr>
          	<td width=\"300\" colspan=\"4\" class=\"stdBold\">Company Name</td>
          	<td width=\"300\" colspan=\"4\" class=\"stdCopy\"><input name=\"company\" size=\"40\" maxlength=\"60\" value=\"<%= DirBaseList(\"Company1\") %>\"></td>
		</tr>
		<!-- <tr>
          	<td colspan=\"4\" class=\"stdBold\">Store Operating Name(s)</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"opname\" size=\"30\" maxlength=\"60\" value=\"\"></td>
		</tr> -->
		<tr>
          	<td colspan=\"4\" class=\"stdBold\">Street Address</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"address\" size=\"40\" maxlength=\"60\" value=\"<%= DirBaseList(\"Address\") %>\"></td>
		</tr>
		<tr>
          	<td colspan=\"4\" class=\"stdBold\">City</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"city\" size=\"40\" maxlength=\"60\" value=\"<%= DirBaseList(\"City\") %>\"></td>
		</tr>
		<tr>
          	<td colspan=\"4\" class=\"stdBold\">State/Province</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"state\" size=\"10\" maxlength=\"60\" value=\"<%= DirBaseList(\"State\") %>\"></td>
		</tr>
		<% 	if not isnull(DirBaseList(\"Zip\")) then
				Zip = DirBaseList(\"Zip\")
				If Len(Zip) > 5 and IsNumeric(Zip) Then
					Zip = ZipFormat
				End If
			end if %>
		<tr>
          	<td colspan=\"4\" class=\"stdBold\">Zip or Postal Code</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"zip\" size=\"15\" maxlength=\"20\" value=\"<%= Zip %>\"></td>
		</tr>
		<tr>
          	<td colspan=\"4\" class=\"stdCopy\">Mailing Address (if different from above)</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"maddress\" size=\"40\" maxlength=\"60\" value=\"<%= DirBaseList(\"MLAddress\") %>\"></td>
		</tr>
		<tr>
          	<td colspan=\"4\" class=\"stdCopy\">Mailing City</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"mcity\" size=\"40\" maxlength=\"60\" value=\"<%= DirBaseList(\"MLCity\") %>\"></td>
		</tr>
		<tr>
          	<td colspan=\"4\" class=\"stdCopy\">Mailing State/Province</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"mstate\" size=\"10\" maxlength=\"60\" value=\"<%= DirBaseList(\"MLState\") %>\"></td>
		</tr>
		<% 	if not isnull(DirBaseList(\"MLZip\")) then
				Zip = DirBaseList(\"MLZip\")
				If Len(Zip) > 5 and IsNumeric(Zip) Then
					Zip = ZipFormat
				End If
			else
				Zip = \"\"
			end if %>
		<tr>
          	<td colspan=\"4\" class=\"stdCopy\">Mailing Zip or Postal Code</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"mzip\" size=\"15\" maxlength=\"20\" value=\"<%= Zip %>\"></td>
		</tr>
		<tr>
          	<td colspan=\"4\" class=\"stdBold\">Country</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"country\" size=\"15\" maxlength=\"20\" value=\"<%= DirBaseList(\"Country\") %>\"></td>
		</tr>
		<% if not isnull(DirBaseList(\"Phone\")) then
			Phone = DirBaseList(\"Phone\")
			Phone = PhoneFormat(Phone)
		end if %>
		<tr>
          	<td colspan=\"4\" class=\"stdBold\">Phone</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"phone\" size=\"15\" maxlength=\"20\" value=\"<%= phone %>\"></td>
		</tr>
		<% if not isnull(DirBaseList(\"Fax\")) then
			fax = DirBaseList(\"Fax\")
			fax = PhoneFormat(fax)
		end if %>
		<tr>
          	<td colspan=\"4\" class=\"stdCopy\">Fax</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"fax\" size=\"15\" maxlength=\"20\" value=\"<%= fax %>\"></td>
		</tr>

		<tr>
          	<td colspan=\"4\" class=\"stdCopy\">Website URL</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"curl\" size=\"40\" maxlength=\"80\" value=\"<%= DirBaseList(\"WWW\") %>\"></td>
		</tr>
		<% 	
    Dim online_sales
    
    sql_str =	\"SELECT CHRDATA1 FROM DIRDATA WHERE ACCOUNT = \'\" & account & \"\' AND Element_Tp = \'ONLSALES\'\"
    \' response.write \"<br />sql_str: \" & sql_str
    dirdataRS.Open sql_str,objConn,adOpenForwardOnly,adCmdStoredProc  
		if not dirdataRS.EOF then 
      if lcase(dirdataRS(\"CHRDATA1\")) = \"yes\" then
        online_sales = \"Yes\"
      elseif lcase(dirdataRS(\"CHRDATA1\")) = \"no\" then
        online_sales = \"No\"
      end if
    else  
      online_sales = \"N/A\"
    end if  
	  dirdataRS.Close 
   
		%>
		<tr>
      <td colspan=\"4\" class=\"stdCopy\">Can products be purchased online?</td>
		  <td colspan=\"4\" class=\"stdCopy\">
        Yes <input type=\'radio\' name=\'onlsales\' value=\'yes\'
           <% if online_sales = \"Yes\" then response.write \"checked\" %>
            >
            
        No <input type=\'radio\' name=\'onlsales\' value=\'no\' 
           <% if online_sales = \"No\" then response.write \"checked\" %>
        >
        </td>
		</tr>	
		<tr>
          	<td colspan=\"4\" class=\"stdCopy\">Corporate Email</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"corpemail\" size=\"40\" maxlength=\"60\" value=\"<%= DirBaseList(\"CORPEMAIL\") %>\"></td>
		</tr>
		<tr>
          	<td colspan=\"4\" class=\"stdCopy\">Parent Company</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"parent\" size=\"40\" maxlength=\"60\" value=\"<%= DirbaseList(\"PACompany\") %>\"></td>
		</tr>
		<tr>
          	<td colspan=\"4\" class=\"stdCopy\">Parent City</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"pcity\" size=\"40\" maxlength=\"60\" value=\"<%= DirBaseList(\"PACity\") %>\"></td>
		</tr>
		<tr>
          	<td colspan=\"4\" class=\"stdCopy\">Parent State</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"pstate\" size=\"10\" maxlength=\"60\" value=\"<%= DirbaseList(\"PAState\") %>\"></td>
		</tr>
		<tr>
          	<td colspan=\"4\" class=\"stdCopy\">Parent Country</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"pcountry\" size=\"15\" maxlength=\"60\" value=\"<%= DirbaseList(\"PACountry\") %>\"></td>
		</tr>
		<tr>
          	<td colspan=\"4\" class=\"stdBold\">Is this a public company?</td>
		  	<td colspan=\"4\" class=\"stdCopy\">Yes 
		  <%  if DirBaseList(\"PUBCOMP\") = \"Y\" then 
		  		response.write \"<input type=\'radio\' name=\'public\' value=\'yes\' checked>   \"
          response.write \"No <input type=\'radio\' name=\'public\' value=\'no\'>\"
			  else
			  	response.write \"<input type=\'radio\' name=\'public\' value=\'yes\'>   \"
          response.write \"No <input type=\'radio\' name=\'public\' value=\'no\' checked>\"
			  end if
		  %>
		  	</td>	  
		</tr>
		<tr>
          	<td colspan=\"4\" class=\"stdCopy\">    Market</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"market\" size=\"10\" maxlength=\"10\" value=\"<%= DirbaseList(\"STMARKET\") %>\"></td>
		</tr>
		<tr>
          	<td colspan=\"4\" class=\"stdCopy\">    Stock Ticker Symbol</td>
          	<td colspan=\"4\" class=\"stdCopy\"><input name=\"ticker\" size=\"10\" maxlength=\"10\" value=\"<%= DirbaseList(\"STSYMBOL\") %>\"></td>
		</tr>
</table>   

<br />

<table>    
		<tr>
          <td colspan=\"2\" class=\"lgBoldBlue\">FINANCIAL INFORMATION</td>
		</tr>
		<tr>
          <td colspan=\"2\" class=\"stdBold\">Annual Revenues</td>
		</tr>
		<tr>
		  <td align=\"left\" class=\"stdCopy\">Year-End Date: <input type=\"text\" name=\"findate\"  size=\"10\" maxlength=\"20\"></td>
      <td align=\"left\" class=\"stdCopy\">Amount: <input type=\"text\" name=\"finvalue\" size=\"20\" maxlength=\"30\"></td>	
		</tr>
	<% 	dirdataRS.Open \"pvs_getDirdataRows \'\" & account & \"\', \'FINANCE\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
		Do until dirdataRS.EOF %>
		<tr>
		  <td align=\"left\" class=\"stdCopy\">Year-End Date: <input type=\"text\" name=\"findate\" value=\"<%= dirdataRS(\"CHRDATA1\") %>\" size=\"10\" maxlength=\"20\"></td>
      <td align=\"left\" class=\"stdCopy\">Amount: <input type=\"text\" name=\"finvalue\" value=\"<%= formatcurrency(dirdataRS(\"NUMDATA1\"),0,,,-1) %>\" size=\"20\" maxlength=\"30\"></td>	
		</tr>
	<% 		dirdataRS.MoveNext
		Loop
		dirdataRS.Close %>
</table>		
    
<br />   
   
<table>    
		<tr>
          <td colspan=\"8\" class=\"lgBoldBlue\">OPERATING INFORMATION</td>
		</tr>
	<% 	dirdataRS.Open \"pvs_getDirdataRows \'\" & account & \"\', \'NUMOPER\'\", objConn, adOpenForwardOnly, adCmdStoredProc  %>
		<tr>
          <td colspan=\"2\" class=\"stdBold\">Current number of USA units open</td>
          <td colspan=\"4\" class=\"stdCopy\"><input name=\"unitsopen\" size=\"10\" maxlength=\"10\" value=\"<%= dirdataRS(\"NUMDATA1\") %>\"></td>
		</tr>
	<%  dirdataRS.Close 
		dirdataRS.Open \"pvs_getDirdataRows \'\" & account & \"\', \'PRODCAT\'\", objConn, adOpenForwardOnly, adCmdStoredProc 
		Do until dirdataRS.EOF
			if categories <> \"\" then categories = categories & \", \"
			categories = categories & dirdataRS(\"CHRDATA2\")
			dirdataRS.MoveNext
		Loop
		dirdataRS.Close %>
		<tr>
          <td colspan=\"2\" class=\"stdBold\">Retail Classification of Stores</td>
          <td colspan=\"4\" class=\"stdCopy\"><input name=\"rclass\" size=\"52\" maxlength=\"60\" value=\"<%= categories %>\"></td>
		</tr>
</table>    
    
<table width=\"520\" id=\"operating_names\">    
		<tr>
          <td colspan=\"1\" align=\"left\" class=\"stdBold\">Operating Name</td>
          <td colspan=\"1\" align=\"left\" class=\"stdBold\"># of Stores</td>
		  <td colspan=\"1\" align=\"left\" class=\"stdBold\">Store Size (GLA)</td>	
		  <td colspan=\"1\" align=\"left\" class=\"stdBold\">Avg # of <br />Employees</td>	
		</tr>
		
	<%  
    Dim operating_count
  
    dirdataRS.Open \"pvs_getOpNameData \'\" & account &_
		\"\'\", objConn, adOpenForwardOnly, adCmdStoredProc
    
    operating_count = 0 \' count number of operating names to know how many extra rows to add at the end
    while  not(dirdataRS.EOF)
  %>  
    
		<tr>
          <td colspan=\"1\" align=\"left\" class=\"stdBold\"><input type=\"text\" name=\"opname\" size=\"30\" maxlength=\"60\" value=\"<%= dirdataRS(\"CHRDATA1\") %>\"></td>
          <td colspan=\"1\" align=\"left\" class=\"stdBold\"><input type=\"text\" name=\"opnumber\" size=\"5\" maxlength=\"5\" value=\"<%= dirdataRS(\"NUMDATA1\") %>\"></td>
		  <% if not isNull(dirdataRS(\"NUMDATA2\")) then
				tempStr = CStr(formatnumber(dirdataRS(\"NUMDATA2\"),0,,,-1)) 
				if not isNull(dirdataRS(\"NUMDATA3\")) then
					if (CDbl(dirdataRS(\"NUMDATA2\")) <> CDbl(dirdataRS(\"NUMDATA3\"))) then
						tempStr = tempStr & \" - \" & CStr(formatnumber(dirdataRS(\"NUMDATA3\"),0,,,-1))
					end if
				end if 
			 else
			 	tempStr = \"\"
			 end if %>
		  <td colspan=\"1\" align=\"left\" class=\"stdBold\"><input type=\"text\" name=\"opgla\" size=\"12\" maxlength=\"20\" value=\"<%= tempStr %>\"></td>	
		  <td colspan=\"1\" align=\"left\" class=\"stdBold\"><input type=\"text\" name=\"op_avg_emps\" size=\"8\" maxlength=\"20\"></td>	
		</tr>
    
		<% 
		  dirdataRS.MoveNext
      operating_count = operating_count + 1
		wend 
		dirdataRS.Close 
    
    \' See how many additional rows to add at the end
    if operating_count < 3 then
      additional_rows = 3 - operating_count
    else
      additional_rows = 1
    end if 
    \'debug  response.write \"<br />operating_count: \"  & operating_count
    \'debug  response.write \"<br />additional_rows: \"  & additional_rows
    \'debug  response.end
    for i = 1 to additional_rows
		%>
		<tr>
		  <td><input type=\"text\" name=\"opname\" size=\"30\" maxlength=\"60\"></td>
      <td><input type=\"text\" name=\"opnumber\" size=\"5\" maxlength=\"5\"></td>
		  <td><input type=\"text\" name=\"opgla\" size=\"12\" maxlength=\"20\"></td>	
		  <td><input type=\"text\" name=\"op_avg_emps\" size=\"8\" maxlength=\"20\"></td>	
		</tr>
    <% next %>
    
</table>

<span title=\"add more rows\" id=\"add_operating_row\">+ Add Row</span>

<script type=\"text/javascript\">
  $(function()
  {
    // When user clicks on the + sign to add more rows for operating names, then add a new row to the table
    $(\"#add_operating_row\").click(function()
    {
      var markup ; 
      markup = \"<tr>\" ;
      markup += \" <td><input type=\\\"text\\\" name=\\\"opname\\\" size=\\\"30\\\" maxlength=\\\"60\\\"></td>\" ;
      markup += \" <td><input type=\\\"text\\\" name=\\\"opnumber\\\" size=\\\"5\\\" maxlength=\\\"5\\\"></td>\" ;
      markup += \" <td><input type=\\\"text\\\" name=\\\"opgla\\\" size=\\\"12\\\" maxlength=\\\"20\\\"></td>\"	;
      markup += \" <td><input type=\\\"text\\\" name=\\\"op_avg_emps\\\" size=\\\"8\\\" maxlength=\\\"20\\\"></td>\" ;	
      markup += \"</tr>\" ;
          
      $(\"#operating_names\").append(markup) ;          
      return false ;  
    }) ;
  }) ;
</script>
  
<style type=\"text/css\">
  #add_operating_row {font-size: 14px; font-weight: bold; cursor: pointer;}
</style>

<br /><br />
  
<table style=\"font-size: small;\"> 
    <%
    \'debug  response.write \"<br />account: \"  & account
    sql_str =	\"SELECT CHRDATA1 FROM DIRDATA WHERE ACCOUNT = \'\" & account & \"\' AND Element_Tp = \'PERCMALL\'\"
    dirdataRS.Open sql_str,objConn,adOpenForwardOnly,adCmdStoredProc  
		if not dirdataRS.EOF then percent = dirdataRS(\"CHRDATA1\") & \"%\" %>
		<tr>
          <td>What percentage of your stores are located in shopping centers/malls?</td><td><input type=\"text\" name=\"percmalls\" value=\"<%= percent %>\" size=\"10\" maxlength=\"25\"></td>	  
		</tr>
		<tr>
          <td>For mall locations, what is your minimum sales per sq. ft. requirement?</td><td><input type=\"text\" name=\"minsalessqft\" value=\"<%= minsalessqft %>\" size=\"10\" maxlength=\"25\"></td>	  
		</tr>
				
	<%  dirdataRS.Close
    Dim franchise_to, franchise_to_num
    
    sql_str =	\"SELECT CHRDATA1, NUMDATA1 FROM DIRDATA WHERE ACCOUNT = \'\" & account & \"\' AND Element_Tp = \'FRANCHISOR\'\"
    \' response.write \"<br />sql_str: \" & sql_str
    dirdataRS.Open sql_str,objConn,adOpenForwardOnly,adCmdStoredProc  
		if not dirdataRS.EOF then 
      if lcase(dirdataRS(\"CHRDATA1\")) = \"yes\" then
        franchise_to = \"Yes\"
        franchise_to_num = dirdataRS(\"NUMDATA1\")
      elseif lcase(dirdataRS(\"CHRDATA1\")) = \"no\" then
        franchise_to = \"No\"
        franchise_to_num = \"\"
      end if
    else  
      franchise_to = \"N/A\"
      franchise_to_num = \"\"
    end if  
	  dirdataRS.Close 
  %>
		<tr>
      <td>Do you franchise stores <b class=\"stdBoldItalic\">to</b> other companies?</td>
		  <td>
        Yes <input type=\'radio\' name=\'franto\' value=\'yes\'
        <% if franchise_to = \"Yes\" then response.write \"checked\" %>
        >
            No 
        <input type=\'radio\' name=\'franto\' value=\'no\' 
        <% if franchise_to = \"No\" then response.write \"checked\" %>
        >
      </td>
		</tr>
		<tr>
          <td>    
          If yes, how many stores are franchised to other companies?
          </td><td>
          <input type=\"text\" value=\"<%=franchise_to_num%>\" name=\"frantocnt\" size=\"10\" maxlength=\"10\">
          </td>	  
		</tr>		
	<%  
    Dim franchise_from
    
    sql_str =	\"SELECT CHRDATA1, NUMDATA1 FROM DIRDATA WHERE ACCOUNT = \'\" & account & \"\' AND Element_Tp = \'FRANFROM\'\"
    \' response.write \"<br />sql_str: \" & sql_str
    dirdataRS.Open sql_str,objConn,adOpenForwardOnly,adCmdStoredProc  
		if not dirdataRS.EOF then 
      franchise_from = \"Yes\"
      franchise_from_num = dirdataRS(\"NUMDATA1\")
    else  
      franchise_from = \"N/A\"
      franchise_from_num = \"\"
    end if  
	  dirdataRS.Close 
  %>
		<tr>
      <td>Do you franchise stores <b class=\"stdBoldItalic\">from</b> other companies?</td>
		  <td>
        Yes <input type=\'radio\' name=\'franfrom\' value=\'yes\'
        <% if franchise_from = \"Yes\" then response.write \"checked\" %>
        />
            
        No <input type=\'radio\' name=\'franfrom\' value=\'no\'
        <% if franchise_from = \"No\" then response.write \"checked\" %>
        />
      </td>
		</tr>
		<tr>
          <td>
              
          If yes, how many stores are franchised from other companies?
          </td>
          <td><input type=\"text\" value=\"<%=franchise_from_num%>\" name=\"franfromcnt\" size=\"10\" maxlength=\"10\"></td>	  
		</tr>		
	  	<tr>
          <td>Do you license your store name(s) to others?</td>
		  <td>
      Yes <input type=\'radio\' name=\'licenseto\' value=\'yes\'>
          
      No <input type=\'radio\' name=\'licenseto\' value=\'no\'>
      </td>
		</tr>
		<tr><td> </td></tr>
		<tr>
          <td colspan=\"8\" class=\"stdBold\">What states do you currently have stores? (Please indicate number of stores in each area.)</td>		  
		</tr>
</table>    
    
<table id=\"oper_current\">    
<%
Dim has_stores, num_stores

Response.Write(\"<tr>\") \' Open the row
counter = 1
For Each state In given_states
  state_id = stateToStateId
  
  \' Fetch the related record
  sql_str =	\"SELECT NUMDATA1 FROM DIRDATA WHERE ACCOUNT = \'\" & account & \"\' AND Element_Tp = \'OPSTATE\' AND ChrData1 = \'\" & state_id & \"\'\"
  \'response.write \"<br />sql_str: \"  & sql_str
  dirdataRS.Open sql_str,objConn,adOpenForwardOnly,adCmdStoredProc  
  \' dirdataRS.Open \"pvs_getDirdataRowCHR \'\" & account & \"\', \'OPSTATE\', \'\" & state & \"\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
	if not dirdataRS.eof then 
    has_stores = true \' For now we only if there is any store. The number of stores were not captured in the system before
    num_stores = dirdataRS(\"NUMDATA1\")
  else  
    has_stores = false
    num_stores = \"\"
	end if
  
  \' A new row every 7 column
  if counter <> 1 and counter mod 7 = 1 then
    Response.Write(\"</tr><tr>\")
  end if   
  
  Response.Write(\"<td class=\"\"stdCopy\"\">\") \' Open td
  response.write \"<input type=\"\"checkbox\"\" name=\"\"opst\"\" value=\"\"\" & state & \"\"\"\"
  \' Add the checkbox on the left
  if has_stores then
	 	response.write \"checked\"
  end if 
  response.write \" />\"
  
  \'Put the state in the middle
  Response.Write(state) 
  Response.Write \"</td>\" 
  
  \' Now put the input for number of stores
  response.write \"<td><input type=\"\"text\"\" name=\"\"opst_num_store_\" & state & \"\"\" class=\"\"op_num_stores num_stores\"\" state=\"\"\" & state  & \"\"\" maxlength=\"\"3\"\"\" 
	if num_stores <> \"\" then 
	 	response.write \"value=\"\"\" & num_stores & \"\"\"\"
	end if
  response.write \" /></td>\"
  
	dirdataRS.Close 
  counter = counter + 1
next
Response.Write(\"</tr>\") \'close the last row

%>    
</table>

<br /><br />

<table>    
		<tr>
          <td class=\"stdCopy\" width=\"300\">Do you operate stores outside North America?</td>
		  
      
	<%  
    Dim outside_na, outside_na_num \' Outside North America and number of stores
    
    sql_str =	\"SELECT CHRDATA1, NUMDATA1 FROM DIRDATA WHERE ACCOUNT = \'\" & account & \"\' AND Element_Tp = \'OPCNTRY\'\"
    \' response.write \"<br />sql_str: \" & sql_str
    dirdataRS.Open sql_str,objConn,adOpenForwardOnly,adCmdStoredProc  
		if not dirdataRS.EOF then 
      outside_na = \"Yes\"
      outside_na_num = dirdataRS(\"NUMDATA1\")
    else  
      outside_na = \"N/A\"
      outside_na_num = \"\"
    end if  
	  dirdataRS.Close 
  %>
      
      <td>
        Yes <input type=\'radio\' name=\'foreign\' value=\'yes\'
        <% if outside_na = \"Yes\" then response.write \"checked\" %>
        />
            
        No <input type=\'radio\' name=\'foreign\' value=\'no\'
        <% if outside_na = \"No\" then response.write \"checked\" %>
        />
      </td>
		</tr>
		<tr>
          <td class=\"stdCopy\">    If yes, how many?</td>
		  <td class=\"stdCopy\">
      <input type=\"text\" name=\"foreignnumber\" size=\"10\" maxlength=\"10\"
		  	value=\"<%=outside_na_num%>\" />
      </td>	  
		</tr>	
		<tr>
          <td class=\"stdCopy\">    If yes, please list countries below.</td>
		</tr>	
		<tr>
          <td colspan=\"2\" class=\"stdCopy\">    
          <% 
        dim text_area
      
        text_area = \"<textarea cols=\"\"60\"\" rows=\"\"8\"\" name=\"\"foreigndetail\"\" class=\"\"stdCopy\"\">\"
      
          \' Fetch the related record
          sql_str =	\"SELECT * FROM DIRDATA WHERE ACCOUNT = \'\" & account & \"\' AND Element_Tp = \'OPCNTRY\'\"
          \' response.write \"<br />sql_str: \"  & sql_str
          dirdataRS.Open sql_str,objConn,adOpenForwardOnly,adCmdStoredProc  
          
			 delimiter = \"\"
		  	 Do until dirdataRS.eof 
		  		\'if trim(dirdataRS(\"CHRDATA2\")) <> \"Africa\" and trim(dirdataRS(\"CHRDATA2\")) <> \"Asia\" and trim(dirdataRS(\"CHRDATA2\")) <> \"Europe\" and trim(dirdataRS(\"CHRDATA2\")) <> \"N. America (non U.S.)\" and trim(dirdataRS(\"CHRDATA2\")) <> \"Oceania\" and trim(dirdataRS(\"CHRDATA2\")) <> \"S. America\" then
		  		if trim(dirdataRS(\"CHRDATA1\")) <> \"Africa\" and trim(dirdataRS(\"CHRDATA1\")) <> \"Asia\" and trim(dirdataRS(\"CHRDATA1\")) <> \"Europe\" and trim(dirdataRS(\"CHRDATA1\")) <> \"N. America (non U.S.)\" and trim(dirdataRS(\"CHRDATA1\")) <> \"Oceania\" and trim(dirdataRS(\"CHRDATA1\")) <> \"S. America\" then
					 text_area = text_area & delimiter & trim(dirdataRS(\"CHRDATA1\")) 
					if not isNull(dirdataRS(\"NUMDATA1\")) then 
						text_area = text_area & \" \" & CStr(formatnumber(dirdataRS(\"NUMDATA1\"),0,,,-1))
					end if
					delimiter = vbCrLf 
				end if
			 	dirdataRS.MoveNext
			 Loop
		  	 dirdataRS.Close 
         
         text_area = text_area & \"</textarea>\"
         
         Response.write text_area
         %>
         </td>		  
		</tr>		
</table>

<br />

<table>    
		<tr>
          <td colspan=\"8\" class=\"lgBoldBlue\">SITE CRITERIA</td>
		</tr>
		<%   dirdataRS.Open \"pvs_getDirdataRows \'\" & account & \"\', \'PREFGLA\'\", objConn, adOpenForwardOnly, adCmdStoredProc 
			 tempStr = \"\" 
			 if not dirdataRS.EOF then
			  	if not isNull(dirdataRS(\"NUMDATA1\")) then
					tempStr = CStr(formatnumber(dirdataRS(\"NUMDATA1\"),0,,,-1)) 
					if not isNull(dirdataRS(\"NUMDATA2\")) then
						if (CDbl(dirdataRS(\"NUMDATA1\")) <> CDbl(dirdataRS(\"NUMDATA2\"))) then
							tempStr = tempStr & \" - \" & CStr(formatnumber(dirdataRS(\"NUMDATA2\"),0,,,-1))
						end if
					end if
				end if
			 end if 
			 dirdataRS.Close %>				
		<tr>
          <td colspan=\"4\" class=\"stdBold\">Preferred Store Size (GLA - sq. ft.)</td>
          <td colspan=\"4\" class=\"stdCopy\"><input name=\"sqft\" size=\"15\" maxlength=\"30\" value=\"<%= tempStr %>\"></td>
		</tr>
		<% dirdataRS.Open \"pvs_getDirdataRows \'\" & account & \"\', \'FRONTAGE\'\", objConn, adOpenForwardOnly, adCmdStoredProc %>
		<tr>
          <td colspan=\"4\" class=\"stdCopy\">Minimum frontage required (ft.)</td>
          <td colspan=\"4\" class=\"stdCopy\"><input name=\"frontage\" size=\"10\" maxlength=\"20\" 
		<% if not dirdataRS.EOF then %>
		  	value=\"<%= dirdataRS(\"NUMDATA1\") %>\"
		<% end if
		   dirdataRS.Close %>
		   ></td>
		</tr>
		<tr>
          <td colspan=\"4\" class=\"stdCopy\">Do you operate kiosks?</td>
		  <% 
    Dim oper_kiosk
    
    sql_str =	\"SELECT CHRDATA1 FROM DIRDATA WHERE ACCOUNT = \'\" & account & \"\' AND Element_Tp = \'KIOSKS\'\"
    \' response.write \"<br />sql_str: \" & sql_str
    dirdataRS.Open sql_str,objConn,adOpenForwardOnly,adCmdStoredProc  
		if not dirdataRS.EOF then 
      if lcase(dirdataRS(\"CHRDATA1\")) = \"yes\" then
        oper_kiosk = \"Yes\"
      elseif lcase(dirdataRS(\"CHRDATA1\")) = \"no\" then
        oper_kiosk = \"No\"
      end if
    else  
      oper_kiosk = \"N/A\"
    end if  
	  dirdataRS.Close 
  %>
		<td colspan=\"4\" class=\"stdCopy\">
      Yes <input type=\"radio\" name=\"kiosk\" value=\"yes\" 
      <% if oper_kiosk = \"Yes\" then response.write \"checked\" %>
      > 
      No <input type=\"radio\" name=\"kiosk\" value=\"no\"
      <% if oper_kiosk = \"No\" then response.write \"checked\" %>
      >
    </td>
    
		</tr>
		<tr><td colspan=\"8\"> </td></tr>
		<tr>
          <td colspan=\"8\" class=\"stdBold\">How many new U.S. units do you expect to open in...?</td>
		</tr>
		<tr>

    <%
\' *******************************************************************************************
\' Store remodel units, new units and international units in 3 arrays and later use them to display info
\' *******************************************************************************************    
Dim new_units(3), remodel_units(3), int_units(3) \' For each we need to show 4 next years
dim start_year, max_years, cur_year, array_idx

start_year = 2012 \' The next 3 fields start at 2013
max_years = 4 \' We need max 4 years to show

\'First initialize the arrays with empty
for i = 0 to max_years - 1
  new_units(i) = \"\"
  remodel_units(i) = \"\"
  int_units(i) = \"\"
next

\' ********** Now fill in only the years that have some info

\' New units
sql_str =	\"SELECT * FROM DIRDATA WHERE ACCOUNT = \'\" & account & \"\' AND Element_Tp = \'NEWUNITS\' ORDER BY CHRDATA1\"
\' response.write \"<br />sql_str: \"  & sql_str
dirdataRS.Open sql_str,objConn,adOpenForwardOnly,adCmdStoredProc  

i = 0
While not dirdataRS.eof
  cur_year = cInt(dirdataRS(\"CHRDATA1\"))
  array_idx = cur_year - start_year
  if array_idx < max_years and array_idx >= 0 then \' Make sure we do not go beyond 4 years
    new_units(array_idx) = dirdataRS(\"NUMDATA1\")
    if dirdataRS(\"NUMDATA2\") <> \"\" then
      new_units(array_idx) = new_units(array_idx) & \"-\" & dirdataRS(\"NUMDATA2\")
    end if  
  end if  
  dirdataRS.MoveNext
  i = i + 1
Wend
dirdataRS.Close

\' Remodel units
sql_str =	\"SELECT * FROM DIRDATA WHERE ACCOUNT = \'\" & account & \"\' AND Element_Tp = \'REMODELS\' ORDER BY CHRDATA1\"
dirdataRS.Open sql_str,objConn,adOpenForwardOnly,adCmdStoredProc  
i = 0
While not dirdataRS.eof

\'response.write \"<br />chrdata1: \"  & dirdataRS(\"CHRDATA1\") & \" numdata1: \"  & dirdataRS(\"NUMDATA1\") & \" numdata2: \"  & dirdataRS(\"NUMDATA2\")


  cur_year = cInt(dirdataRS(\"CHRDATA1\"))
  array_idx = cur_year - start_year
  if array_idx < max_years and array_idx >= 0 then \' Make sure we do not go beyond 4 years
    remodel_units(array_idx) = dirdataRS(\"NUMDATA1\")
    if dirdataRS(\"NUMDATA2\") <> \"\" then
      remodel_units(array_idx) = remodel_units(array_idx) & \"-\" & dirdataRS(\"NUMDATA2\")
    end if  
  end if  

\'response.write \"<br />start_year: \"  & start_year & \" i: \"  & i & \" remodel_units((2012 + i) - start_year): \"  & remodel_units((2012 + i) - start_year)

  dirdataRS.MoveNext
  i = i + 1
Wend
dirdataRS.Close

\' International units
sql_str =	\"SELECT * FROM DIRDATA WHERE ACCOUNT = \'\" & account & \"\' AND Element_Tp = \'NEWINUNITS\' ORDER BY CHRDATA1\"
dirdataRS.Open sql_str,objConn,adOpenForwardOnly,adCmdStoredProc  
i = 0
While not dirdataRS.eof
  cur_year = cInt(dirdataRS(\"CHRDATA1\"))
  array_idx = cur_year - start_year
  if array_idx < max_years and array_idx >= 0 then \' Make sure we do not go beyond 4 years
    int_units(array_idx) = dirdataRS(\"NUMDATA1\")
    if dirdataRS(\"NUMDATA2\") <> \"\" then
      int_units(array_idx) = int_units(array_idx) & \"-\" & dirdataRS(\"NUMDATA2\")
    end if  
  end if  
  dirdataRS.MoveNext
  i = i + 1
Wend
dirdataRS.Close


%>

                    
          <td align=\"right\" class=\"stdBold\">2012</td>
          <td class=\"stdCopy\"><input name=\"new01\" size=\"5\" maxlength=\"10\" value=\"<%= new_units(2012 - start_year) %>\"></td>
          
          
          <td align=\"right\" class=\"stdCopy\">2013</td>
          <td><input name=\"new02\" size=\"5\" maxlength=\"10\" value=\"<%= new_units(2013 - start_year) %>\"></td>
		  <td align=\"right\" class=\"stdCopy\">2014</td>
          <td><input name=\"new03\" size=\"5\" maxlength=\"10\" value=\"<%= new_units(2014 - start_year) %>\"></td>
		  <td align=\"right\" class=\"stdCopy\">2015</td>
          <td><input name=\"new04\" size=\"5\" maxlength=\"10\" value=\"<%= new_units(2015 - start_year) %>\"></td>
          <td> </td>	
		</tr>
		<tr>
          <td colspan=\"8\" class=\"stdBold\">How many U.S. units do you expect to remodel in...?</td>
		</tr>
		<tr>
                    
          <td align=\"right\" class=\"stdBold\">2012</td>
          <td class=\"stdCopy\"><input name=\"rem01\" size=\"5\" maxlength=\"10\" value=\"<%= remodel_units(2012 - start_year) %>\"></td>
          
          
          <td align=\"right\" class=\"stdCopy\">2013</td>
          <td><input name=\"rem02\" size=\"5\" maxlength=\"10\" value=\"<%= remodel_units(2013 - start_year) %>\"></td>
		  <td align=\"right\" class=\"stdCopy\">2014</td>
          <td><input name=\"rem03\" size=\"5\" maxlength=\"10\" value=\"<%= remodel_units(2014 - start_year) %>\"></td>
		  <td align=\"right\" class=\"stdCopy\">2015</td>
          <td class=\"stdCopy\"><input name=\"rem04\" size=\"5\" maxlength=\"10\" value=\"<%= remodel_units(2015 - start_year) %>\"></td>
		</tr>
		<tr>
          <td colspan=\"8\" class=\"stdBold\">How many new international units do you expect to open in...?</td>
		</tr>
		<tr>
                    
          <td align=\"right\" class=\"stdBold\">2012</td>
          <td class=\"stdCopy\"><input name=\"newint01\" size=\"5\" maxlength=\"10\" value=\"<%= int_units(2012 - start_year) %>\"></td>
          
          <td align=\"right\" class=\"stdCopy\">2013</td>
          <td><input name=\"newint02\" size=\"5\" maxlength=\"10\" value=\"<%= int_units(2013 - start_year) %>\"></td>
		  <td align=\"right\" class=\"stdCopy\">2014</td>
          <td><input name=\"newint03\" size=\"5\" maxlength=\"10\" value=\"<%= int_units(2014 - start_year) %>\"></td>
		  <td align=\"right\" class=\"stdCopy\">2015</td>
          <td class=\"stdCopy\"><input name=\"newint04\" size=\"5\" maxlength=\"10\" value=\"<%= int_units(2015 - start_year) %>\"></td>
		</tr>
		<tr><td colspan=\"8\"> </td></tr>
		<tr>
          <td colspan=\"8\" class=\"stdBold\">What states are you targeting for new stores? (Please indicate estimated number of stores in each area.)</td>		  
		</tr>
</table>    
    
<table id=\"oper_exp\">    
<%
Response.Write(\"<tr>\") \' Open the row
counter = 1
For Each state In given_states
  \' *** First fetch the info from database
  state_id = stateToStateId
  sql_str =	\"SELECT * FROM DIRDATA WHERE ACCOUNT = \'\" & account & \"\' AND Element_Tp = \'EXSTATE\' AND ChrData1 = \'\" & state_id & \"\'\"
  \' response.write \"<br />sql_str: \"  & sql_str
  dirdataRS.Open sql_str,objConn,adOpenForwardOnly,adCmdStoredProc  
	if not dirdataRS.eof then 
    has_stores = true 
    num_stores = dirdataRS(\"NUMDATA1\")
  else  
    has_stores = false 
    num_stores = \"\"
	end if
	dirdataRS.Close 
  
  \' A new row every 7 column
  if counter <> 1 and counter mod 7 = 1 then
    Response.Write(\"</tr><tr>\")
  end if   
  
  Response.Write(\"<td class=\"\"stdCopy\"\">\") \' Open td

  \' Add the checkbox on the left
  response.write \"<input type=\"\"checkbox\"\" name=\"\"expst\"\" value=\"\"\" & state & \"\"\"\"
	if has_stores then 	
    response.write \"checked\"
  end if  
  response.write \" />\"
  
  \'Put the state in the middle
  Response.Write(state) 
  Response.Write \"</td>\" 
  
  \' Now put the input for number of stores
  response.write \"<td><input type=\"\"text\"\" value=\"\"\" & num_stores & \"\"\" name=\"\"expst_num_store_\" & state & \"\"\" class=\"\"exp_num_stores num_stores\"\" state=\"\"\" & state  & \"\"\" maxlength=\"\"3\"\" /></td>\"
  
  counter = counter + 1
next
Response.Write(\"</tr>\") \'close the last row

%>    
</table>
<table width=\"600\">    
    
		<tr><td colspan=\"8\"> </td></tr>
		<tr>
          <td colspan=\"8\" class=\"stdCopy\">If you plan to open new stores outside North America, please list countries and expected number of openings per country below.</td>
		</tr>	
		<tr>
          <td colspan=\"8\" class=\"stdCopy\">    
			<% 
      text_area = \"<textarea cols=\"\"60\"\" rows=\"\"8\"\" name=\"\"exforeigndetail\"\" class=\"\"stdCopy\"\">\"
      
      sql_str =	\"SELECT * FROM DIRDATA WHERE ACCOUNT = \'\" & account & \"\' AND Element_Tp = \'EXCNTRY\'\"
      \' response.write \"<br />sql_str: \"  & sql_str
      dirdataRS.Open sql_str,objConn,adOpenForwardOnly,adCmdStoredProc  
      \'dirdataRS.Open \"pvs_getDirdataRowCHR \'\" & account & \"\', \'EXSTATE\', \'Foreign\'\", objConn, adOpenForwardOnly, adCmdStoredProc 
			 delimiter = \"\"
		  	 Do until dirdataRS.eof 
		  		text_area = text_area & delimiter & trim(dirdataRS(\"CHRDATA1\"))
					if not isNull(dirdataRS(\"NUMDATA1\")) then 
						text_area = text_area & \" \" & CStr(formatnumber(dirdataRS(\"NUMDATA1\"),0,,,-1))
					end if
				  delimiter = vbCrLf 
			 	  dirdataRS.MoveNext
			   Loop
		  	 dirdataRS.Close 
         
         text_area = text_area & \"</textarea>\"
         
         response.write text_area
         
         %></td>		  
		</tr>	
		<tr><td colspan=\"8\"> </td></tr>
		<tr>
          <td colspan=\"8\" class=\"stdCopy\">Preferred type of location(s): (check all that apply)</td>
		</tr>
		<tr>
          <td colspan=\"3\" class=\"stdCopy\">Enclosed Super-regional Mall</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"loctype\" value=\"Super Regional\"
		  <% dirdataRS.Open \"pvs_getDirdataTypLoc \'\" & account & \"\', \'Enclosed Super\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>
          <td colspan=\"3\" class=\"stdCopy\">Downtown/CBD</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"loctype\" value=\"Downtown\"
		  <% dirdataRS.Open \"pvs_getDirdataTypLoc \'\" & account & \"\', \'Downtown\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>		  
		</tr>
		<tr>
          <td colspan=\"3\" class=\"stdCopy\">Enclosed Regional Mall</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"loctype\" value=\"Regional\"
		  <% dirdataRS.Open \"pvs_getDirdataTypLoc \'\" & account & \"\', \'Enclosed Regional\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>
          <td colspan=\"3\" class=\"stdCopy\">Freestanding</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"loctype\" value=\"Freestanding\"
		  <% dirdataRS.Open \"pvs_getDirdataTypLoc \'\" & account & \"\', \'Freestanding\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>		  
		</tr>
		<tr>
          <td colspan=\"3\" class=\"stdCopy\">Power Center</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"loctype\" value=\"Power Center\"
		  <% dirdataRS.Open \"pvs_getDirdataTypLoc \'\" & account & \"\', \'Power\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>
          <td colspan=\"3\" class=\"stdCopy\">Airport/Transportation</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"loctype\" value=\"Airport\"
		  <% dirdataRS.Open \"pvs_getDirdataTypLoc \'\" & account & \"\', \'Airport\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>		  
		</tr>
		<tr>
          <td colspan=\"3\" class=\"stdCopy\">Community Strip Center</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"loctype\" value=\"Community\"
		  <% dirdataRS.Open \"pvs_getDirdataTypLoc \'\" & account & \"\', \'Community\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>
          <td colspan=\"3\" class=\"stdCopy\">Lifestyle Center</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"loctype\" value=\"Lifestyle Center\"
		  <% dirdataRS.Open \"pvs_getDirdataTypLoc \'\" & account & \"\', \'Lifestyle\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>  
		</tr>
		<tr>
          <td colspan=\"3\" class=\"stdCopy\">Neighborhood Strip Center</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"loctype\" value=\"Neighborhood\"
		  <% dirdataRS.Open \"pvs_getDirdataTypLoc \'\" & account & \"\', \'Neighborhood\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>
          <td colspan=\"3\" class=\"stdCopy\">Pad Site/Outparcel</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"loctype\" value=\"Outparcel/Pad\"
		  <% dirdataRS.Open \"pvs_getDirdataTypLoc \'\" & account & \"\', \'Pad Site\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>		  
		</tr>
		<tr>
          <td colspan=\"3\" class=\"stdCopy\">Outlet Center</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"loctype\" value=\"Outlet Center\"
		  <% dirdataRS.Open \"pvs_getDirdataTypLoc \'\" & account & \"\', \'Outlet\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>
          <td colspan=\"3\" class=\"stdCopy\">Theme/Festival Center</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"loctype\" value=\"Theme/Festival\"
		  <% dirdataRS.Open \"pvs_getDirdataTypLoc \'\" & account & \"\', \'Theme/Festival\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>
		</tr>
		<tr>
          <td colspan=\"3\" class=\"stdCopy\">Mixed Use Center</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"loctype\" value=\"Mixed Use\"
		  <% dirdataRS.Open \"pvs_getDirdataTypLoc \'\" & account & \"\', \'Mixed\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>
		  <td colspan=\"3\" class=\"stdCopy\">Other (please specify)</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"loctype\" value=\"Other\"
		  <% dirdataRS.Open \"pvs_getDirdataTypLocOther \'\" & account & \"\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 detail = \"\"
			 if not dirdataRS.EOF then 
			 	detail = dirdataRS(\"CHRDATA1\") %>
			 	checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>
		</tr>
		<tr>
          <td colspan=\"4\" class=\"stdCopy\"> </td>
          <td colspan=\"4\" class=\"stdCopy\">     <input type=\"text\" name=\"loctypedetail\" value=\"<%= detail %>\" size=\"25\" maxlength=\"50\"></td>
		</tr>
		<tr><td colspan=\"8\"> </td></tr>
<!-- 	<tr>
          <td colspan=\"8\" class=\"stdCopy\">Do you prefer to own <input type=\"checkbox\" name=\"own\" value=\"\"> or lease <input type=\"checkbox\" name=\"lease\" value=\"\">your locations </td>
		</tr>		 -->
		<tr>
          <td colspan=\"8\" class=\"stdCopy\">Preferred lease terms: 
		  <% dirdataRS.Open \"pvs_getDirdataRows \'\" & account & \"\', \'PREFLEASE\'\", objConn, adOpenForwardOnly, adCmdStoredProc 
			 if dirdataRS.EOF then
			 	tempStr = \"\"
			 else
			 	tempStr = dirdataRS(\"CHRDATA1\")
			 end if 
			 dirdataRS.Close %>
          	<input name=\"leaseyrs\" size=\"35\" maxlength=\"50\" value=\"<%= tempStr %>\"></td>		  
		</tr>
		<tr><td colspan=\"8\"> </td></tr>
		<tr>
          <td colspan=\"8\" class=\"stdCopy\">Preferred co-tenants (check all that apply)</td>
		</tr>
		<tr>
          <td colspan=\"3\" class=\"stdCopy\">Fashion-oriented</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"cotnt\" value=\"Fashion-Oriented\"
		  <% dirdataRS.Open \"pvs_getDirdataCoTent \'\" & account & \"\', \'fashion\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>
          <td colspan=\"3\" class=\"stdCopy\">Grocery/Supermarket</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"cotnt\" value=\"Grocery/Supermarket\"
		  <% dirdataRS.Open \"pvs_getDirdataCoTent \'\" & account & \"\', \'grocery\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>		  
		</tr>
		<tr>
          <td colspan=\"3\" class=\"stdCopy\">Upscale</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"cotnt\" value=\"Upscale\"
		  <% dirdataRS.Open \"pvs_getDirdataCoTent \'\" & account & \"\', \'upscale\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>
          <td colspan=\"3\" class=\"stdCopy\">Outlet</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"cotnt\" value=\"Outlet\"
		  <% dirdataRS.Open \"pvs_getDirdataCoTent \'\" & account & \"\', \'outlet\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>		  
		</tr>
		<tr>
          <td colspan=\"3\" class=\"stdCopy\">Discount</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"cotnt\" value=\"Discount\"
		  <% dirdataRS.Open \"pvs_getDirdataCoTent \'\" & account & \"\', \'discount\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>
          <td colspan=\"3\" class=\"stdCopy\">No preference</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"cotnt\" value=\"No preference\"
		  <% dirdataRS.Open \"pvs_getDirdataCoTent \'\" & account & \"\', \'all\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>		  
		</tr>
		<tr>
          <td colspan=\"3\" class=\"stdCopy\">Entertainment-oriented</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"cotnt\" value=\"Entertainment-Oriented\"
		  <% dirdataRS.Open \"pvs_getDirdataCoTent \'\" & account & \"\', \'entertain\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.EOF then %>
			 checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>
          <td colspan=\"3\" class=\"stdCopy\">Specific retailers (please list)</td>
          <td class=\"stdCopy\"><input type=\"checkbox\" name=\"cotnt\" value=\"Other\"
		  <% dirdataRS.Open \"pvs_getDirdataCoTentOther \'\" & account & \"\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 detail = \"\"
			 if not dirdataRS.EOF then 
			 	detail = dirdataRS(\"CHRDATA1\") %>
			 	checked
		  <% end if 
		  	 dirdataRS.Close %>
		  ></td>		  
		</tr>
		<tr>
          <td colspan=\"4\" class=\"stdCopy\"> </td>
          <td colspan=\"4\" class=\"stdCopy\">     <input type=\"text\" name=\"cotntdetail\" value=\"<%= detail %>\" size=\"25\" maxlength=\"50\"></td>
		</tr>
		<tr><td colspan=\"8\"> </td></tr>
		<tr>
          <td colspan=\"4\" class=\"stdCopy\">Do you co-brand or co-locate with other companies?</td>
		  <td colspan=\"4\" class=\"stdCopy\">
      Yes <input type=\'radio\' name=\'cobrand\' value=\'yes\'>
          
      No <input type=\'radio\' name=\'cobrand\' value=\'no\'>
      </td>
		</tr>
		<tr>
          <td colspan=\"8\" class=\"stdCopy\">    If yes, which companies?   <input type=\"text\" name=\"cobranddetail\" size=\"64\" maxlength=\"100\"></td>	  
		</tr>		
		<tr><td colspan=\"8\"> </td></tr>
		
		<tr>
          <td colspan=\"5\" class=\"stdCopy\">Do you have a dedicated real estate website?  If so, please list website address.</td>
		  <td colspan=\"3\" class=\"stdCopy\"><input type=\"text\" name=\"reurl\" size=\"30\" maxlength=\"60\" value=\"<%= DirBaseList(\"rewww\") %>\"></td>
		</tr>
		<%  
    Dim excess_space
    
    sql_str =	\"SELECT CHRDATA1 FROM DIRDATA WHERE ACCOUNT = \'\" & account & \"\' AND Element_Tp = \'XSSPACE\'\"
    \'response.write \"<br />sql_str: \" & sql_str
    dirdataRS.Open sql_str,objConn,adOpenForwardOnly,adCmdStoredProc  
		if not dirdataRS.EOF then 
      if lcase(dirdataRS(\"CHRDATA1\")) = \"yes\" then
        excess_space = \"Yes\"
      elseif lcase(dirdataRS(\"CHRDATA1\")) = \"no\" then
        excess_space = \"No\"
      end if
    else  
      excess_space = \"N/A\"
    end if  
	  dirdataRS.Close 
    %>
		<tr>
		  <td colspan=\"8\" class=\"stdCopy\">
      Are you currently seeking disposal of excess space?
         
      Yes <input type=\"radio\" name=\"excess\" value=\"yes\"
      <% if excess_space = \"Yes\" then response.write \"checked\" %>
      > 
      No <input type=\"radio\" name=\"excess\" value=\"no\" 
      <% if excess_space = \"No\" then response.write \"checked\" %>
      >
      </td>  	
    
    <%
	   dirdataRS.Open \"pvs_getDirdataRows \'\" & account & \"\', \'XSSPACEML\'\", objConn, adOpenForwardOnly, adCmdStoredProc %>
		<tr>
          <td colspan=\"8\" class=\"stdCopy\">Who is in charge of excess space disposal:
		   
      Name: <input type=\"text\" name=\"excessname\" size=\"15\" maxlength=\"60\" value=\"\" />
		  Email: <input type=\"text\" name=\"excessemail\" size=\"15\" maxlength=\"60\" 
		<% if not dirdataRS.EOF then  %>
		  	value=\"<%= dirdataRS(\"CHRDATA1\") %>\">
		<% else  %>
			value=\"\">
		<% end if 
			dirdataRS.Close 
		%>
			</td>
		</tr>
		<tr><td colspan=\"8\"> </td></tr>
		
		<tr>
          <td colspan=\"8\" class=\"stdCopy\">Do you have a population requirement?</td>		  
		</tr>
		<% dirdataRS.Open \"pvs_getDirdataRows \'\" & account & \"\', \'RADIUS\'\", objConn, adOpenForwardOnly, adCmdStoredProc 
		   if not dirdataRS.eof then 
		  	 	radius = dirdataRS(\"CHRDATA1\") 
		   end if 
		   dirdataRS.Close
		   dirdataRS.Open \"pvs_getDirdataRows \'\" & account & \"\', \'POPDENS\'\", objConn, adOpenForwardOnly, adCmdStoredProc %>
		<tr>
          <td></td>
          <td colspan=\"7\" class=\"stdCopy\"><input name=\"pop\" size=\"15\" maxlength=\"15\" 
		  <% if not dirdataRS.eof then %>
		  		value=\"<%= dirdataRS(\"CHRDATA1\") %>\"> people in a <input name=\"popradius\" size=\"5\" maxlength=\"10\" value=\"<%= radius %>\"> mile radius.</td>	
		  <% else %>
		  		> people in a <input name=\"popradius\" size=\"5\" maxlength=\"10\"> mile radius.</td>	
		  <% end if
		     dirdataRS.Close %>  
		</tr>
		<% dirdataRS.Open \"pvs_getDirdataRows \'\" & account & \"\', \'HHDENS\'\", objConn, adOpenForwardOnly, adCmdStoredProc %>
		<tr>
          <td></td>
          <td colspan=\"7\" class=\"stdCopy\"><input name=\"house\" size=\"15\" maxlength=\"15\" 
		  <% if not dirdataRS.eof then %>
		  		value=\"<%= dirdataRS(\"CHRDATA1\") %>\"> households in a <input name=\"houseradius\" size=\"5\" maxlength=\"10\" value=\"<%= radius %>\"> mile radius.</td>	
		  <% else %>
		  		> households in a <input name=\"houseradius\" size=\"5\" maxlength=\"10\"> mile radius.</td>	
		  <% end if
		     dirdataRS.Close %>  
		</tr>
		<tr>
          <td colspan=\"4\" class=\"stdCopy\">Do you have vehicle traffic requirements?</td>
          <td colspan=\"4\" class=\"stdCopy\"><input name=\"vehcl\" size=\"10\" maxlength=\"10\" 
		  <% dirdataRS.Open \"pvs_getDirdataRows \'\" & account & \"\', \'TRAFFIC\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.eof then %>
		  value=\"<%= dirdataRS(\"NUMDATA1\") %>\"
		  <% end if
		  	dirdataRS.Close %>
		  > vehicles per day.</td>		  
		</tr>
		<tr>
          <td colspan=\"8\" class=\"stdCopy\">Please describe any other important site requirements.</td>		  
		</tr>		
		<tr>
          <td colspan=\"8\" class=\"stdCopy\"><textarea cols=\"60\" rows=\"8\" name=\"special\" class=\"stdCopy\"><% dirdataRS.Open \"pvs_getDirdataRows \'\" & account & \"\', \'SPECREQ\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.eof then 
			 	response.write trim(dirdataRS(\"CHRDATA1\"))
			 end if
		  	 dirdataRS.Close %></textarea></td>		  
		</tr>		
		<tr><td colspan=\"8\"> </td></tr>
</table>  


  
<table width=\"450\">    
		<tr>
          <td colspan=\"8\" class=\"stdCopy\">Who is your target customer? (check all that apply)</td>		  
		</tr>		
		<tr>
          <td colspan=\"2\" class=\"stdCopy\">Income</td>
          <td> </td>
          <td colspan=\"2\" class=\"stdCopy\">Age</td>
          <td> </td>
          <td colspan=\"2\" class=\"stdCopy\">Sex</td>		  		  
		</tr>
		<tr>
          <td colspan=\"2\" class=\"stdCopy\"><input type=\"checkbox\" name=\"lowinc\" value=\"Low Income\" <% dirdataRS.Open \"pvs_getDirdataRowCHR \'\" & account & \"\', \'INCPREF\', \'Low\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.eof then 
			 	response.write \"checked\"
			 end if
		  	 dirdataRS.Close %>>Low Income</td>
          <td> </td>
          <td colspan=\"2\" class=\"stdCopy\"><input type=\"checkbox\" name=\"child\" value=\"Child\" <% dirdataRS.Open \"pvs_getDirdataRowCHR \'\" & account & \"\', \'CUSBASE\', \'Child\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.eof then 
			 	response.write \"checked\"
			 end if
		  	 dirdataRS.Close %>>Child</td>
          <td> </td>
          <td colspan=\"2\" class=\"stdCopy\"><input type=\"checkbox\" name=\"male\" value=\"Male\" <% dirdataRS.Open \"pvs_getDirdataRowCHR \'\" & account & \"\', \'CUSSEX\', \'Male\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.eof then 
			 	response.write \"checked\"
			 end if
		  	 dirdataRS.Close %>>Male</td>		  		  
		</tr>
		<tr>
          <td colspan=\"2\" class=\"stdCopy\"><input type=\"checkbox\" name=\"midinc\" value=\"Middle Income\" <% dirdataRS.Open \"pvs_getDirdataRowCHR \'\" & account & \"\', \'INCPREF\', \'Mid\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.eof then 
			 	response.write \"checked\"
			 end if
		  	 dirdataRS.Close %>>Middle Income</td>
          <td> </td>
          <td colspan=\"2\" class=\"stdCopy\"><input type=\"checkbox\" name=\"teen\" value=\"Teen\" <% dirdataRS.Open \"pvs_getDirdataRowCHR \'\" & account & \"\', \'CUSBASE\', \'Teen\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.eof then 
			 	response.write \"checked\"
			 end if
		  	 dirdataRS.Close %>>Teen</td>
          <td> </td>
          <td colspan=\"2\" class=\"stdCopy\"><input type=\"checkbox\" name=\"female\" value=\"Female\" <% dirdataRS.Open \"pvs_getDirdataRowCHR \'\" & account & \"\', \'CUSSEX\', \'Female\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.eof then 
			 	response.write \"checked\"
			 end if
		  	 dirdataRS.Close %>>Female</td>		  		  
		</tr>		
		<tr>
          <td colspan=\"2\" class=\"stdCopy\"><input type=\"checkbox\" name=\"highinc\" value=\"High Income\" <% dirdataRS.Open \"pvs_getDirdataRowCHR \'\" & account & \"\', \'INCPREF\', \'High\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.eof then 
			 	response.write \"checked\"
			 end if
		  	 dirdataRS.Close %>>High Income</td>
          <td> </td>
          <td colspan=\"2\" class=\"stdCopy\"><input type=\"checkbox\" name=\"adult\" value=\"Adult\" <% dirdataRS.Open \"pvs_getDirdataRowCHR \'\" & account & \"\', \'CUSBASE\', \'Adult\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.eof then 
			 	response.write \"checked\"
			 end if
		  	 dirdataRS.Close %>>Adult</td>
          <td> </td>
          <td colspan=\"2\" class=\"stdCopy\"><input type=\"checkbox\" name=\"nosex\" value=\"No Preference\">No preference</td>		  		  
		</tr>		
		<tr>
          <td colspan=\"2\" class=\"stdCopy\"><input type=\"checkbox\" name=\"noinc\" value=\"No Preference\">No preference</td>
          <td> </td>
          <td colspan=\"2\" class=\"stdCopy\"><input type=\"checkbox\" name=\"senior\" value=\"Senior\" <% dirdataRS.Open \"pvs_getDirdataRowCHR \'\" & account & \"\', \'CUSBASE\', \'Senior\'\", objConn, adOpenForwardOnly, adCmdStoredProc  
			 if not dirdataRS.eof then 
			 	response.write \"checked\"
			 end if
		  	 dirdataRS.Close %>>Senior</td>
          <td> </td>
          <td colspan=\"2\"> </td>		  		  
		</tr>
		<tr>
          <td colspan=\"2\"></td>
          <td></td>
          <td colspan=\"2\" class=\"stdCopy\"><input type=\"checkbox\" name=\"noage\" value=\"No Preference\">No preference</td>
          <td></td>
          <td colspan=\"2\"></td>		  		  
		</tr>
    
</table>
<table width=\"600\">    
    
		<tr>
          <td colspan=\"8\" class=\"stdCopy\">Please describe any other customer preferences.</td>		  
		</tr>		
<%    
    Dim customer_pref
    
    sql_str =	\"SELECT CHRDATA1 FROM DIRDATA WHERE ACCOUNT = \'\" & account & \"\' AND Element_Tp = \'CUSDETAIL\'\"
    \'response.write \"<br />sql_str: \" & sql_str
    dirdataRS.Open sql_str,objConn,adOpenForwardOnly,adCmdStoredProc  
		if not dirdataRS.EOF then 
      customer_pref = dirdataRS(\"CHRDATA1\")
    else  
      customer_pref = \"\"
    end if  
	  dirdataRS.Close 
%>    
		<tr>
          <td colspan=\"8\" class=\"stdCopy\">
          <textarea cols=\"60\" rows=\"8\" name=\"custspec\" class=\"stdCopy\"><%=customer_pref %></textarea>
          </td>		  
		</tr>		
		<tr>
          <td colspan=\"8\" class=\"lgBoldBlue\"><br />PERSONNEL</td>
		</tr>
		<tr>
          <td colspan=\"8\" class=\"stdCopy\"><b class=\"stdBold\">Who is responsible for handling real estate inquires:</b>
		       
        Name: <input type=\"text\" name=\"rename\" size=\"16\" maxlength=\"50\" value=\"\">
        Email: <input type=\"text\" name=\"reemail\" size=\"16\" maxlength=\"50\" value=\"<%= DirBaseList(\"restemail\") %>\">
      </td>
		</tr>
		<tr>
		  <td colspan=\"8\"></td>
		</tr>			  
		</tr>
		<tr>
      <td colspan=\"8\" class=\"stdCopy\">
        <p style=\"width: 720px;\">
          Please verify that the list below includes all of 
          your current key executives, including your President 
          and Vice Presidents, as well as the heads of Real 
          Estate, Construction, Development, Finance, 
          Marketing and Advertising.
        </p>  
      </td>		  
		</tr>		
		<tr>
          <td colspan=\"8\" class=\"stdCopy\"><textarea cols=\"60\" rows=\"8\" name=\"execlist\"><% if not isnull(ExecList(\"Title\")) then
			 	Do While Not ExecList.EOF
					response.write ExecList(\"Title\") & \": \"
					response.write ExecList(\"Name\") 
          
          if ExecList(\"Email\") <> \"\" then
					  response.write \" <\" & ExecList(\"Email\") & \">\"
          else
					  response.write \" <Add.Email>\"
          end if
          
          response.write vbcrlf
					ExecList.MoveNext
			 	Loop
			 end if %></textarea></td>		  
		</tr>
		<tr>
      <td colspan=\"8\" class=\"stdCopy\">
        <p style=\"width: 720px;\">
          Lists of <b class=\"stdBold\">regional 
          real estate personnel</b> and/or 
          <b class=\"stdBold\">third party Leasing 
          Agents</b> (if any are known to us) appear 
          in the box below. Please enter any 
          additions/revisions to these lists by 
          typing into the box.
        </p>
      </td>		  
		</tr>		
		<tr>
          <td colspan=\"8\" class=\"stdCopy\"><textarea cols=\"60\" rows=\"8\" name=\"leasinglist\"><% if leasingrCnt > 0 then
			Do While Not LeasingList.EOF
				response.write LeasingList(\"Company\") & \": \" & vbcrlf
				if not isnull(LeasingList(\"Address1\")) and LeasingList(\"Address1\") <> \" \" then
					response.write trim(LeasingList(\"Address1\")) & vbcrlf
				end if
				if not isnull(LeasingList(\"Address2\")) and LeasingList(\"Address2\") <> \" \" then
					response.write trim(LeasingList(\"Address2\")) & vbcrlf
				end if
				if not isnull(LeasingList(\"City\")) and LeasingList(\"City\") <> \" \" then
					response.write trim(LeasingList(\"City\")) & \", \" & Leasinglist(\"State\") & \" \" &_
						LeasingList(\"Zip\") & vbcrlf
				end if
				if not isnull(LeasingList(\"Phone\")) and LeasingList(\"Phone\") <> \" \" then
					Phone = LeasingList(\"Phone\")
					Phone = PhoneFormat(Phone)
					response.write(\"Phone: \" & Phone & vbcrlf)
				end if
				if not isnull(LeasingList(\"Fax\")) and LeasingList(\"Fax\") <> \" \" then
					Phone = LeasingList(\"Fax\")
					Phone = PhoneFormat(Phone)
					response.write(\"Fax: \" & Phone & vbcrlf)
				end if
				if not isnull(LeasingList(\"Name\")) and LeasingList(\"Name\") <> \" \" then
					response.write \"Contact: \" & trim(LeasingList(\"Name\")) & vbcrlf
				end if
				if not isnull(LeasingList(\"Region\")) and LeasingList(\"Region\") <> \" \" then
					response.write \"Region: \" & trim(LeasingList(\"Region\")) & vbcrlf
				end if
				if not isnull(LeasingList(\"Email\")) and LeasingList(\"Email\") <> \" \" then
					response.write trim(LeasingList(\"Email\")) & vbcrlf
				end if
				response.write vbcrlf
				LeasingList.MoveNext
			Loop
		end if %></textarea></td>		  
		</tr>
		<tr>
		  <td colspan=\"8\"></td>
		</tr>		
		<tr>
          <td colspan=\"8\" class=\"lgBoldBlue\"><br />NEW & NOTEWORTHY</td>
		</tr>
		<tr>
          <td colspan=\"8\" class=\"stdCopy\">Please enter any additional information you wish to share with our editors here.</td>		  
		</tr>		
		<tr>
          <td colspan=\"8\" class=\"stdCopy\"><textarea cols=\"60\" rows=\"8\" name=\"addlinfo\" value=\"\"><% if datarCnt > 0 then
			response.write(objRS(\"data\"))
		end if %></textarea></td>		  
		</tr>		
		<tr>
		  <td colspan=\"8\"></td>
		</tr>		
		<tr>
    
		<%  
    Dim contact_name, contact_email
    
    contact_name = \"\"
    contact_email = \"\"
    
    sql_str =	\"SELECT Contact, Contact_Name FROM dbo.RTDLookUp WHERE ACCOUNT = \'\" & account & \"\'\"
    \'response.write \"<br />sql_str: \" & sql_str
    dirdataRS.Open sql_str,objConn,adOpenForwardOnly,adCmdStoredProc  
		if not dirdataRS.EOF then 
      contact_email = dirdataRS(\"Contact\")
      contact_name = dirdataRS(\"Contact_Name\")
    end if  
	  dirdataRS.Close 
    %>
    
          <td colspan=\"8\" class=\"stdCopy\"><b class=\"stdBold\">Survey Contact Name:
           
		  <input type=\"text\" name=\"verifname\" size=\"30\" maxlength=\"50\" value=\"<%=contact_name%>\" /><br>
		    Survey Contact Email: <input type=\"text\" name=\"verifemail\" size=\"30\" value=\"<%=contact_email%>\" />
      </td>	  
		</tr>
		<tr>
		<td colspan=\"8\" class=\"stdCopy\">Would you like to be featured in our Plain Vanilla Shell newsletter?   Yes <input type=\"radio\" name=\"feature\" value=\"yes\"> No <input type=\"radio\" name=\"feature\" value=\"no\" checked></td>  
		</tr>	
		<tr>
			<td colspan=\"8\"><br /></td>
		</tr>
		<tr>
          <td colspan=\"4\"><input type=\"submit\" name=\"SUBMITINFO\" value=\"Submit information update\"></td>	  
		  <td colspan=\"4\"><input type=\"reset\" name=\"RESET\" value=\"Reset Form\"></td>
		</tr>				
<!--#include file=\"footer.inc\"-->	</TABLE>
</FORM>

<%
		Set DirBaseList = nothing
		Set ExecList = nothing
	end if
	objRS.close
	objConn.Close
	Set objRS = nothing
	Set objConn = nothing 
end if

%>
	</blockquote>
	</td>
	<td width=\"30\"> </td>
	</tr>

</table>
</BODY>
<% 
Sub getVerification
if account <> \"\" then
	Dim objConn, objrs, sqltxt
	Set objConn = Server.CreateObject(\"ADODB.Connection\")
	set objRS = Server.CreateObject(\"ADODB.Recordset\")              
	objConn.Open \"Provider=SQLNCLI10;\" & \"DSN=\" & Application(\"DSNName\") & \";UID=\" & Application(\"dbUser\") &_
		\";Password=\" & Application(\"dbPW\")				     	\'Open Database Connection
	objRS.Open \"pvs_getRTDCompName \'\" & account & \"\'\", objConn, adOpenForwardOnly, adCmdStoredProc 
	companyName = objRS(\"company1\")
	objRS.close
	objConn.Close
	Set objRS = nothing
	Set objConn = nothing 
end if
%>
			<!-- Start Content -->
			<div align=\"left\" class=\"redError\"><%= message1 %></div>
			<FORM METHOD=\"POST\" ACTION=\"disp_profile_update.asp\">
			
			<table width=\"100%\" border=\"0\" cellpadding=\"0\">
			<tr valign=\"top\">
				<td class=\"stdCopy\">
					<p>Thank you for visiting PlainVanillaShell.com to update your company profile for inclusion in the 2012 Retail Tenant Directory. In order to make this process easier for you, and improve accuracy, we will display the information we currently have in our database for your company and allow you to update that information using a form on this site.</p>
					<p>To view your current profile data and begin the update process, you will need the Account Number and <b class=\"stdBold\">Verification Code</b> that appear on the profile form you received in the mail, or in the email we sent directing you to this page. (If you followed an email link, the Account Number should already be present.) If you do not have this information, but would still like to update your company\'s profile, please call our Editorial department at 416-490-1090 for assistance. Enter the Account Number and Verification Code in the boxes below, and click submit to proceed.</p>
				</td>
			</tr>
			<tr valign=\"top\">
				<td> </td>
			</tr>
			<tr valign=\"top\">
				<td class=\"pvsh5\"><%= companyName %></td>
			</TR><INPUT TYPE=\"HIDDEN\" >
			<tr valign=\"top\">
				<td class=\"stdBold\">Account Number:  <INPUT TYPE=\"TEXT\" NAME=\"account\" VALUE=\"<%= account %>\" MAXLENGTH=\"20\"></td>
			</tr>
			<tr valign=\"top\">
				<td class=\"stdBold\">Verification Code:  <INPUT TYPE=\"TEXT\" NAME=\"verification\" MAXLENGTH=\"20\"></td>
			</tr>
			<tr valign=\"top\">
				<td> </td>
			</tr>
			<tr>
				<td ALIGN=\"CENTER\"><INPUT TYPE=\"SUBMIT\" NAME=\"SUBMITVER\" VALUE=\"Submit Verification Code\"></td>
			</tr>
			</table> 
			</FORM>
		</td>
<%
End Sub
%>
		
<style type=\"text/css\">
  .num_stores {width: 32px; margin-right: 9px;}
  table#oper_exp td, table#oper_current td {white-space: nowrap;}
  textarea      {width: 690px;}
  input[type=\"submit\"]   {width: auto;}
</style>  

<script type=\"text/javascript\">
  $(function()
  { 
    // When the number of stores in the exapnsion or current changes, make sure to also set the related check boxes
  
    $(\".op_num_stores\").change(function()
    {
      // Make sure to select the checkbox related to this number of stores
      var state = $(this).attr(\"state\") ;
      var check_box_selector = \"input[type=\\\"checkbox\\\"][name=\\\"opst\\\"][value=\\\"\" + state + \"\\\"]\" ;
      if ($(this).val() != \"\")
        $(check_box_selector).attr(\"checked\",true) ; 
      else  
        $(check_box_selector).attr(\"checked\",false) ; 
    }) ;
    
    $(\".exp_num_stores\").change(function()
    {
      // Make sure to select the checkbox related to this number of stores
      var state = $(this).attr(\"state\") ;
      var check_box_selector = \"input[type=\\\"checkbox\\\"][name=\\\"expst\\\"][value=\\\"\" + state + \"\\\"]\" ;
      if ($(this).val() != \"\")
        $(check_box_selector).attr(\"checked\",true) ; 
      else  
        $(check_box_selector).attr(\"checked\",false) ; 
    }) ;
    
    // Also when the checkbox is unchecked, make sure to empty the text box 
    $(\"input[type=\\\"checkbox\\\"][name=\\\"opst\\\"]\").change(function()
    {
      if (! $(this).attr(\"checked\"))
      {
        var state = $(this).val() ;
        $(\"input[name=\\\"opst_num_store_\" + state + \"\\\"]\").val(\"\") ; 
      }
    }) ;
    $(\"input[type=\\\"checkbox\\\"][name=\\\"expst\\\"]\").change(function()
    {
      if (! $(this).attr(\"checked\"))
      {
        var state = $(this).val() ;
        $(\"input[name=\\\"expst_num_store_\" + state + \"\\\"]\").val(\"\") ; 
      }
    }) ;
  }) ;
</script>
</HTML>

Share this code

| More

Use the link below to share the code:
HTML
BBCode