/* Escribe flash embed para evitar bloqueo de IE*/
/*
Se llama de la siquiente forma
<script language="JavaScript" type="text/javascript">
	writeFlash('texto alt','ancho','alto','7,0,19,0','URL','transparencia','texto dinamico si lo tiene');
</script>
*/
function MM_checkPlugin(plgIn, autoGo) { 
    var ok=false; 
	//document.MM_returnValue = false; 
    with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) { 
       ok=(plugins && plugins[plgIn]); 
    } else if (appVersion.indexOf('3.1')==-1) { 
       if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) ok=window.MM_flash; 
       else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir; 
       else ok=autoGo; } 
    return ok;
} 


function writeFlash(tag_alt,ancho_flash,alto_flash,version_flash,src, opacidad, alternateText, alternateimg) {
	// Construye el Flash Embed
	ok = MM_checkPlugin('Shockwave Flash', true);
	if (!ok)
	{
	document.write('<strong>CARGA IMAGEN ESTATICA</strong>');
	//document.write('<img src="/images/html/logo_im_header.gif" alt="" />');
	//document.write('<img src="'+alternateimg+'" alt="" />');
	return;
	}
	var param1 = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+version_flash+'" width="'+ancho_flash+'" height="'+alto_flash+'" title="'+tag_alt+'">';
	var param2 = '<param name="movie" value="'+src+'" />';
	var param3 = '<param name="quality" value="High" />';
	if(!alternateText) 
	{	
		var param4='';
	}
	else
	{
		var param4 = '<PARAM NAME="FlashVars" VALUE="'+ alternateText +'"/>';
	}
	var param5 = '<param name="wmode" value="'+opacidad+'" />'
	var param6 = '<param name="menu" value="false" />'
	var param7 = '<embed swLiveConnect="true" FlashVars="'+ alternateText +'" src="'+src+'" quality="High" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" salign="lt" bgcolor="#251207" wmode="'+opacidad+'" allowScriptAccess="sameDomain" width="'+ancho_flash+'" height="'+alto_flash+'"></embed>'
	var param8 = '</object>'

	// Escribe las lineas
	document.write(param1+param2+param3+param4+param5+param6+param7+param8)
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v6.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; }
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

//funcion para agrandar o achicar el tamaño de letra (25/09/2003)
		var max_size = 150;
		var min_size = 90;
		var tamagnoLetras = 100;
		
		function dzIncreaseFontSize(idElemento) {
			if (document.all || document.getElementById) {	
				var elemento = document.all ? document.all[idElemento] : document.getElementById(idElemento);
				if (elemento) {	
					// el valor está; indicado en porcentaje:
					if(tamagnoLetras >= max_size){
						alert("No es posible aumentar más el texto.")
					}else{
						tamagnoLetras += 10;
						if (elemento.length) 
							for (i=0; i < elemento.length; i++) {
								elemento[i].style.fontSize = (tamagnoLetras+'%');
							}
						else
							elemento.style.fontSize = (tamagnoLetras+'%');				
					}
				}
			}
		}
		
		function dzDecreaseFontSize(idElemento) {
			if (document.all || document.getElementById) {	
				var elemento = document.all ? document.all[idElemento] : document.getElementById(idElemento);
				if (elemento) {	
					// el valor est&aacute; indicado en porcentaje:
					if(tamagnoLetras <= min_size){
						alert("No es posible disminuir más el texto.")
					}else{
						tamagnoLetras -= 5;
						if (elemento.length) 
							for (i=0; i < elemento.length; i++) {
								elemento[i].style.fontSize = (tamagnoLetras+'%');
							}
						else
							elemento.style.fontSize = (tamagnoLetras+'%');				
					}
				}
			}
		}
		
		function dzResetFontSize(idElemento) {
			var elemento = document.all[idElemento];
			elemento.body.style.fontSize = '100%';
			document.body.style.fontSize = '100%';
		}

<!--
function Asignar(codigo){
 cod=0;
 tex='';
 if(codigo.selectedIndex>-1){
  var cod = '$' + codigo[codigo.selectedIndex].value + ' por minuto';
  var tex = codigo[codigo.selectedIndex].text + ' por s&oacute;lo:';
 } 
 if(cod==0){
  cod='$0';
  tex='';
 }
 var obj = document.getElementById('lPrecio'); obj.innerHTML = cod;
 var obj = document.getElementById('lCiudad'); obj.innerHTML = tex;
}

function fOverOut(s, sw){
 var o=document.getElementById(s);
 if(sw==1)
  o.src=o.src.replace('_off.','_on.')
 else
  o.src=o.src.replace('_on.','_off.');
}
//-->
