

<!-- Begin Function: OpenPopUp
	function OpenPopUp(url,name) {
		window.open(url,name,'status=no,scrollbars=yes,resizable=yes,width=525,height=300');
	}
//--> End Function: OpenPopUp


<!-- Begin Function: TextAreaCounter
	function textCounter(field,cntfield,maxlimit) 
	{
		if (field.value.length > maxlimit)
		{
			// if too long...trim it!
			field.value = field.value.substring(0, maxlimit);
		} else
		{
			// otherwise, update 'characters left' counter
			cntfield.value = maxlimit - field.value.length;
		}
	}
	//detect if we should warn the user of lost data
	function warningClick() 
	{
	  if (typeof(beforeStep3)=="undefined")
	  {
	    beforeStep3 = false;
	  }
		if(turnWarningsOn == true) 
		{
		  if (beforeStep3 == false)
		  {
			  return(confirm('You are leaving your Ad before finishing all required steps. If you leave now, you will find it in MyPropertyNut as UnFinished. Ok to leave now or Cancel to Finish Now.'));
			}
			else
			{
        return(confirm('If you leave WITHOUT finishing Step 3, your Ad will NOT be saved. Clicking OK will NOT save the Ad in MyPropertyNut>MyCurrentAds; Click CANCEL to complete Step 3 and save your Ad now.'));			
      }  
		}
		return true;
	}	
 
function rollover(whichTab, whichWay)
{
	if (document.getElementById(whichTab).className != "selected")
		{
			if (whichWay == 'over')
				document.getElementById(whichTab).className = "rollover";
			else
				document.getElementById(whichTab).className = "unselected";
		}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

//--> End Function: TextAreaCounter