
function clickclear(thisfield, defaulttext) {
if (thisfield.value == defaulttext) {
thisfield.value = "";
}
}
function clickrecall(thisfield, defaulttext) {
if (thisfield.value == "") {
thisfield.value = defaulttext;
}
}

function openDSAhelp()
{
if (window.displayWin) {
displayWin.close();	
}		
//displayWin=window.open("http://www.foundlocals.com/dsaHelp.html",'Using the DSA System','width=400, height=555, left=300, //top=200,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes');
myRef = window.open('http://www.foundlocals.com/direct/dsaHelp.html','DSA_help',
'left=500,top=200,width=700,height=500,toolbar=0,resizable=1,scrollbars=0');
}


function confirmExit()
{
 if (window.onBack=true)
return "Using the back button will cause errors, such as duplicating or overwriting your prospects. Please use the 'Full Prospect Listing' to view a previous prospect.";
}


function check_length(my_form, my_text, text_num)
{

var form1=my_form;
var text1=my_text;
var num1=text_num;

getval=eval('document.'+form1+'.'+text1+'.value.length');

//alert(getval);
//alert(form1.arguments[1].value.length);
//alert("he");
//if (getval >= 5) {
// Alert message if maximum limit is reached.
// If required Alert can be removed.
//var msg = "You have reached your maximum limit of characters allowed";
//alert(msg);
// Reached the Maximum length so trim the textarea
//form1.text1.value = form1.text1.value.substring(0, len1);
//else{ // Maximum length not reached so update the value of my_text counter
//form1.num1.value = form1.text1.value.length;}
//form1.num1.value=getval;
eval('document.'+form1+'.'+num1+'.value='+getval);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function MM_jumpMenuGo(objId,targ,restore){ //v9.0
  var selObj = null;  with (document) { 
  if (getElementById) selObj = getElementById(objId);
  if (selObj) eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0; }
}


function imposeMaxLength(Object, MaxLen)
{
	
  if (Object.value.length>MaxLen)
  {
	  	alert("There is a 200 character limit");
	  Object.value=Object.value.substring(0, MaxLen)
  }
  //return (Object.value.length <= MaxLen);
}

function addDirText(businessName, state, businessSpecialty, businessType)
{
document.updateForm.dirAsum.value=businessName+" of "+state+", "+businessType+", takes pride in "+businessSpecialty;
check_length('updateForm','dirAsum','num1');
}

function addHeadlineText(businessName, state, businessSpecialty, businessType)
{
document.updateForm.prAheadline.value=businessName+", "+state+" "+businessType+", launches Online Advertising campaign to highlight ___"+businessSpecialty;
check_length('updateForm','prAheadline','num2');
}

function addSummaryText(businessName, state, businessSpecialty, businessType)
{
document.updateForm.prAsummary.value="As customer research trends continue to shift to the internet, "+businessName+" of "+state+" "+businessType+", launches Online Advertising campaign to educate consumers about ___"+businessSpecialty+".";
check_length('updateForm','prAsummary','num3');
}

function addBodyText(businessName, state, businessSpecialty)
{
document.updateForm.prAbody.value="In today's market, 60% of customers express a preference to utilize the internet to find local businesses instead of 'traditional' resources like the Yellow Pages; this makes having an online presence a clear necessity. But some savvy small businesses like "+businessName+" have risen above local competitors by launching an local online advertising campaign that highlights what makes their business unique; ___"+businessSpecialty+".___\n\nTurning to the internet is the next logical step for "+businessName+" which already has a significant presence in "+state+". Early adoption of the trend towards local internet marketing not only provides them with access to the thousands of locals who utilize the internet first to find local businesses, but more importantly illustrates to their potential clients that they are abreast of industry trends and technology. On the internet, just as off of it, the unique stories and strengths of each business are what drive success.";
check_length('updateForm','prAbody','num4');
}

