// External JavaScript resource file for M&C Properties website


featureOn      = new Image;
featureOn.src  = "images/featurea.gif";
featureOff     = new Image;
featureOff.src = "images/feature.gif";


function switchImage(IMGname,STATEname) {if (doneLoad==true) {eval('document.' + IMGname).src=eval(STATEname).src}}

function swapImgID(imgName,imgState,ID)	{
	if (navigator.appVersion.indexOf("AOL")<0) {
		if (document.images) {
			imgPageObj=eval("document." + imgName + ID);
			imgArrObj=eval(imgName + imgState);
			imgPageObj.src=imgArrObj.src;
			}
		}
	return true;
	}

function click(evt) {if (navigator.appName.indexOf("Microsoft")!=-1) {if (event.button==2 || event.button==1+2 || event.button==2+1) {alert('© Copyright M&C First Choice Real Estate S.L.'); return false}}; if (navigator.appName.indexOf("Netscape")!=-1) {if (evt.which==3) {alert('© M&C First Choice Real Estate S.L.'); return false}}}

function popUp(NextPage,width,height) {
	winName="PopUp";
	window.open(NextPage,winName,'toolbar=no,width=' + width + ',height=' + height + ',directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no');
	}

function popUp2(NextPage,width,height) {
	winName="PopUp2";
	window.open(NextPage,winName,'toolbar=no,width=' + width + ',height=' + height + ',directories=no,status=no,scrollbars=np,resizable=yes,menubar=no');
	}

function popUp3(NextPage,width,height) {
	winName="PopUp3";
	window.open(NextPage,winName,'toolbar=no,width=' + width + ',height=' + height + ',directories=no,status=no,scrollbars=np,resizable=yes,menubar=no');
	}

function doSearch(FormRef) {
	var price_range=FormRef.price_range[FormRef.price_range.selectedIndex].value;
	var location=FormRef.location[FormRef.location.selectedIndex].value;
	window.open('pages/results.asp?price_range=' + price_range + '&location=' + location,'PropertyWindow','toolbar=no,width=720,height=520,directories=no,status=yes,scrollbars=yes,resizable=yes,menubar=no');
	}

function openWindow(pageURL,width,height) {
	x=self.screenLeft + 10;
	y=self.screenTop + 10;
	EditWin=window.open(pageURL,"EditWindow","WIDTH=" + width + ",HEIGHT=" + height + ",left=" + x + ",screenX=" + x + ",top=" + y + ",screenY=" + y);
	}

function showFeatured(DBID) {
	window.open('pages/template.asp?ID=' + DBID,'PropertyWindow','toolbar=no,width=720,height=520,directories=no,status=yes,scrollbars=yes,resizable=yes,menubar=no');
	}
function showFeat(urlPagina) {
	window.open(urlPagina,'PropertyWindow','toolbar=no,width=720,height=520,directories=no,status=yes,scrollbars=yes,resizable=yes,menubar=no');
	}

