/* Toogle text in search field functions
---------------------------------------------------------------- */

function focusField(f,txt){

	// Declare variable
	var field = document.getElementById(f.id);
	
	// Clean field, markup if text is not the same as original
	if(field.value==txt){
		field.value = '';
	}else{
		field.select();
	}

}

function blurField(f,txt){

	// Declare variable
	var field = document.getElementById(f.id);
	
	// Restore field if not text is original
	if(field.value==''){
		field.value = txt;
	}

}

/* Link function
---------------------------------------------------------------- */

function goToUrl(popup,url){

	// If popup is true, then open in popup, else open normal
	if(url){
		if(popup){
			window.open(url);
		}else{
			location.href = url;
		}
	}

}
function newSrc(nId, nSrc){
	
//	alert(nId + " " + nSrc);	
	document.getElementById(nId).src = nSrc;
	}
function oSrc(nId, oSrc){
	
//	alert(nId + " " + nSrc);	
	document.getElementById(nId).src = oSrc;
}