// Copyright by Spanish Property Service 2006. All rights reserved.
function pli() { 
var d=document; if(d.images){ if(!d.ii) d.ii=new Array(); 
var i,j=d.ii.length,a=pli.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){
d.ii[j]=new Image;d.ii[j++].src='/'+'images'+'/'+'m_'+a[i]+'_a.gif';}}};

function xi() {
	var d=document;if(d.images){
		var img;
		for (var i=0; i<xi.arguments.length; i+=2) {
			img = null;
			if (d.layers) img = findElement(CHGi.arguments[i],0);
			else img = d.images[xi.arguments[i]];
			if (img) {img.src = xi.arguments[i+1];}
}	}	}

function tmo(il){
	xi(il.id,'/images/'+il.id+'_a.gif');
}

function tmf(il){
	xi(il.id,'/images/'+il.id+'.gif');
}

function newWindow(a_str_windowURL, a_str_windowName, a_int_windowWidth, a_int_windowHeight, a_bool_scrollbars, a_bool_resizable, a_bool_menubar, a_bool_toolbar, a_bool_addressbar, a_bool_statusbar, a_bool_fullscreen) {
  var int_windowLeft = (screen.width - a_int_windowWidth) / 2;
  var int_windowTop = (screen.height - a_int_windowHeight) / 2;
  var str_windowProperties = 'height=' + a_int_windowHeight + ',width=' + a_int_windowWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=' + a_bool_scrollbars + ',resizable=' + a_bool_resizable + ',menubar=' + a_bool_menubar + ',toolbar=' + a_bool_toolbar + ',location=' + a_bool_addressbar + ',statusbar=' + a_bool_statusbar + ',fullscreen=' + a_bool_fullscreen + '';
  var obj_window = window.open(a_str_windowURL, a_str_windowName, str_windowProperties)
    if (parseInt(navigator.appVersion) >= 4) {
      obj_window.window.focus();
    }
}

function showDetails(){
	newWindow('/directory/suggest_site/details.htm',0,497,280,0,0,0,0,0,1,0);
}

function showImages(ref,st){
	newWindow('/images/show/?ref='+ref+'&st='+st,0,640,480,0,0,0,0,0,1,0);
}

function mAlert(el){el.className = 'nlineo';}
function mAlert2(el){el.className = 'nlineo2';}
function mdeAlert(el){el.className = 'nline';}
function mdeAlert2(el){el.className = 'nline2';}
function sAlert(el){el.className = 'slno';}
function sdeAlert(el){el.className = 'sln';}
function nAlert(el){el.className = 'tlno';}
function ndeAlert(el){el.className = 'tln';}
function pAlert(el){el.className = 'plno';}
function pdeAlert(el){el.className = 'pln';}
function lAlert(el){el.className = 'nlineon';}
function ldeAlert(el){el.className = 'nlineo';}
function lAlert2(el){el.className = 'nline2';}
function ldeAlert2(el){el.className = 'nline';}
function jmp(where){document.location.href=where;}


function snews(rss_path,news_path){

	var pg='http://www.spanish-property-service.com',rpath=pg+rss_path,npath=pg+news_path;
	
	var mbuf = 
	'<a href="http://us.rd.yahoo.com/my/atm/Spanish%20Property%20Service/Propery%20news%20from%20Spain/*'+
	'http://add.my.yahoo.com/rss?url='+rpath+'">'+
	'<img src="/images/my_yahoo.gif" width="87" height="12" border="1" alt="Add to My Yahoo!" class=news style="float:left"></a>'+
	'<a href ="http://my.msn.com/addtomymsn.armx?id=rss&ut='+rpath+'&ru='+npath+'">'+
	'<img src="/images/my_msn.gif" width="69" height="12" border="1" class=news alt="Add to MSN"></a>'+
	'<a href="http://fusion.google.com/add?feedurl='+rpath+'">'+
	'<img src="/images/my_google.gif" width="100" height="12" border="1" alt="Add to Google" class=news style="float:left"></a>'+
	'<a href="http://feeds.my.aol.com/add.jsp?url='+rpath+'" target="_blank">'+
	'<img src="/images/my_aol.gif" width="61" height="12" border="1" alt="Add to My AOL" class=news border="0"><br></a>'; 
	
	if (document.all)
		subnews.innerHTML=mbuf;
	else if (document.getElementById){
		rng = document.createRange();
		el = document.getElementById("subnews");
		rng.setStartBefore(el);
		htmlFrag = rng.createContextualFragment(mbuf);
		while (el.hasChildNodes()) el.removeChild(el.lastChild);
		el.appendChild(htmlFrag);}
}

var xmlHttp;

function GetXmlHttpObject(){ 
var objXMLHttp=null;if (window.XMLHttpRequest){objXMLHttp=new XMLHttpRequest()}
else if (window.ActiveXObject){objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")}
return objXMLHttp}
function setMenus(){if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
var spl=xmlHttp.responseText.split("||"),mar=document.getElementById("dareas"),mne=document.getElementById("dnews");
if(mar!=null) mar.innerHTML=spl[0];if(mne!=null) mne.innerHTML=spl[1];}}
function loadMenus(){xmlHttp=GetXmlHttpObject();
if (xmlHttp==null){alert("Browser does not support HTTP Request");return;}
else{xmlHttp.onreadystatechange=setMenus;xmlHttp.open("GET","/_func/getmenu.asp",true);
xmlHttp.setRequestHeader("Content-Type", "text/xml; charset=ISO-8859-1");xmlHttp.send(null);}
}