function changetext(txt) {
 if( document.all && !document.getElementById )
  {document.all.title.value = txt; }
  else
  { document.getElementById('title').value = txt; }
}

function win_open(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function navigate (url) { 
	document.location.href = url; 
} 
function mOvr(src,clrOver) {
 if (!src.contains(event.fromElement)) {
  src.style.cursor = 'hand';
  src.bgColor = clrOver;
 }
}
function mOut(src,clrIn) {
 if (!src.contains(event.toElement)) {
  src.style.cursor = 'default';
  src.bgColor = clrIn;
 }
}
function mClk(src) {
 if(event.srcElement.tagName=='TD'){
  src.children.tags('A')[0].click();
 }
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		index_01_over = newImage("images/top_10/apt_praiasol.jpg");
		index_02_over = newImage("images/top_10/boavista19.jpg");
		index_03_over = newImage("images/top_10/boavista75.jpg");
		index_04_over = newImage("images/top_10/boavista77.jpg");
		index_05_over = newImage("images/top_10/qag.jpg");
		index_06_over = newImage("images/top_10/vespirit.jpg.jpg");
		index_07_over = newImage("images/top_10/vlumira_n.jpg");
		index_08_over = newImage("images/top_10/vluzmira_e.jpg");
		index_09_over = newImage("images/top_10/vrosa.jpg");
		index_10_over = newImage("images/top_10/vsoclamar.jpg");
		index_11_over = newImage("images/top_all.jpg");
		index_12_over = newImage("images/top_new.jpg");						
		preloadFlag = true;
	}
}

var browsermsg = "Algarve Yes! Copyright ® 2004";

// do not edit below this line
// ===========================
var bV  = parseInt(navigator.appVersion)
var bNS = navigator.appName=="Netscape"
var bIE = navigator.appName=="Microsoft Internet Explorer"

function nrc(e) {
   if (bNS && e.which > 1){
      alert(am)
      return false
   } else if (bIE && (event.button >1)) {
     alert(browsermsg)
     return false;
   }
}

//document.onmousedown = nrc;
//if (document.layers) window.captureEvents(Event.MOUSEDOWN);
//if (bNS && bV<5) window.onmousedown = nrc;

function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
