function iclear(inp){
	if(inp.value==inp.title){inp.value='';}
}
function iwrite(inp){
	if(inp.value==''){inp.value=inp.title;}	
}

function precarga(images){
	im=new Array();
	
	for(i=0;i<images.length;i++){
		im[i]=document.createElement('img'); im[i].src=images[i];
		document.getElementById('precarga').appendChild(im[i]);
	}
	
}

function notie_print(){
	if(navigator.appName == "Microsoft Internet Explorer"){
		document.write('<div id="notie"><div class="margin">Por favor, no navegue con IE<br /><a href="http://www.google.com/chrome/" title="Use Google Chrome" target="_blank"><img src="/img/nav/chrome.png" alt="Use Google Chrome" /></a> <a href="http://www.mozilla-europe.org/firefox/" title="Use Firefox" target="_blank"><img src="img/nav/firefox.png" alt="Use Firefox" /></a></div></div>');
	}
}

function colorear(el,clase){
		el.className=clase;
}

function mytab(el){
			bloque=el.attr("id").split('_')[0];
			// switch all tabs off
			$("."+bloque+".sboton").addClass("boton");
			$("."+bloque+".sboton").removeClass("sboton");
			
			// switch this tab on
			el.removeClass("boton");
			el.addClass("sboton");
			
			// slide all content up
			$(".tabcon_"+bloque).slideUp();
			
			// slide this content up
			var content_show = el.attr("id").split('_')[1];
			$("#"+content_show).slideDown();
}

function refix(){
	extra=200;
	noalto=$('#ajuste').outerHeight()+extra;
	$('#cuerpo').height(noalto); $('#menu').height(noalto);
}
//JQUERY DONES
	$(document).ready(function(){
		$("div.sboton,div.boton").click(function(){mytab($(this));});
		refix();
	});