<!--


// Navigation Menu Color Change ----------------------------------------------------
function n_I(src, nid, act) {

	if (act == '1') {
		document.images['n'+nid].src = 'img/nav/a_1.jpg';
		src.style.cursor='hand';
	} else if (act == '0') {
		document.images['n'+nid].src = 'img/nav/a_0.jpg';
	} else if (act != '') {
		location.href = act;
	}
		
}



// Window open script ----------------------------------------------------
// Example: openWin('whatever.asp','name','width=600,height=300')
function openWin(theURL,winName,features) {
  window.open(theURL,winName,features);
}




// CAR LIST Color Change ----------------------------------------------------
function listI(src, evnt, ln_var) {
	// NAV Links
	
	if (evnt == '1') {
		src.style.backgroundColor='#C5E2FF'; 
		src.style.cursor='hand';
	} else if (evnt == '0') {
		src.style.backgroundColor='#DCEEFF';
	} else if (evnt == '2') {
		location.href = ln_var;
	}
		
}


// CAR LIST Color Change FOR THE BASIC REFERENCES ----------------------------------------------------
function listB(src, evnt, interval, ln_var) {
	// NAV Links
	
	if (evnt == '1') {
		src.style.backgroundColor='#e1e1e1'; 
		src.style.cursor='hand';
	} else if (evnt == '0') {
		if (interval == 1) {
			src.style.backgroundColor='#efefef';
		} else {
			src.style.backgroundColor='#f7f7f7';
		}
	} else if (evnt == '2') {
		location.href = ln_var;
	}
		
}


// ANTI SPAN DOCUMENT WRITE EMAIL
function emailDo(first, second, csst, txt) {
	var x1 = first;
	var x2 = second;
	var x3 = '.com';
	var x4 = '@';
	var x5 = 'mailto:';
	var x6 = txt;
	
	x2 = second + x3
	x1 = x1 + x4
	if (txt) {
		document.write('<a class="' + csst + '" href="' + x5 + x1 + x2 + '">' + txt + '</a>');
	} else {
		document.write('<a class="' + csst + '" href="' + x5 + x1 + x2 + '">' + x1 + x2 + '</a>');
	}
}

function TopSrch_Now(SrchString, sec) {

	var s;
	s = SrchString;

	if(s.replace(/\s/gi, "").length < 3) {
		alert('El texto de b\úsqueda es demasiado corto.');
	} else {

		location.href = 'clasificados.aspx?s=' + sec + '&t=' + escape(s);
	}

	return false;

}

function selectClear(whatselect) {

	var whatselectObj = document.getElementById(whatselect);

	var i = 0;
	for (i = whatselectObj.options.length; i >= 0; --i) {
		whatselectObj.options[i] = null;
	}
	
}

function selectAddOption(whatselect, txt, val) {

	var whatselectObj = document.getElementById(whatselect);
	
	if (whatselectObj.length < 0) {
        	whatselectObj[0] = new Option(txt, val);
	} else {
        	whatselectObj[whatselectObj.length] = new Option(txt, val);
	}	
	
}

function adjDd(whatselect, whatval) {

	var whatselectObj = document.getElementById(whatselect);
	
	var i = 0;
	for (i = whatselectObj.options.length; i >= 0; --i) {
		if(whatselectObj.options[i]) {
			if(whatselectObj.options[i].value == whatval) {
				whatselectObj.selectedIndex = i;
			}
		}
	}

}

function MD_ShowVid(path, w, h) {
	openWin('/reg/do/video/?1='+w+'&2='+h+'&3='+escape(path),'','width=100,height=100,scrollbars=yes')
}

function MD_ShowAud(path) {
	openWin('/reg/do/audio/?1='+escape(path),'','width=100,height=100,scrollbars=yes')
}

//-->