function limpiar_tarjeta(){
	document.getElementById("tarjeta_de_contacto").innerHTML="";
}

function resize(elem, max) {
  //var elem = document.getElementById(which);
  if (elem == undefined || elem == null) return false;
  if (max == undefined) max = 100;
  if (elem.width > elem.height) {
    if (elem.width > max) elem.width = max;
  } else {
    if (elem.height > max) elem.height = max;
  }
}

function setCookie(c_name,value,expiredays){
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function popupAjax(vars,url,popup_width,popup_height) {


	// Instantiate a Panel from script
	panel = new YAHOO.widget.Panel("popup", { width:popup_width+"px", height:popup_height+"px", visible:false, draggable:false, modal:true, close:false, fixedcenter:true, iframe:true, underlay:"none" } );
	panel.render("container");
	panel.show();
	
	document.getElementById("popup").innerHTML="<div class='bd' id='popup_bd'></div><div class='popup_close' onclick='panel.destroy();'>X</div>";
	abrirAjax(vars,url,"popup_bd");
}
function popupIframe(url,popup_width,popup_height) {
	iframe_width=popup_width;
	iframe_height=popup_height;

	// Instantiate a Panel from script
	panel = new YAHOO.widget.Panel("popup", { visible:false, draggable:false, modal:true, close:false, fixedcenter:true, iframe:true, underlay:"none" } );
	panel.setBody("<iframe width='"+iframe_width+"' height='"+iframe_height+"' scrolling='no' frameborder='0' src='"+url+"'></iframe>");
	panel.render("container");
	panel.show();
	
	document.getElementById("popup").innerHTML=document.getElementById("popup").innerHTML+"<div class='popup_close' onclick='panel.destroy();'>X</div>";

	
}



