	function confirmAction(object, message){
	    var is_confirmed = confirm(message);
		if(is_confirmed) 
  		   object.href += '&is_js_confirmed=1';
        return is_confirmed;
      } // end of the 'confirmLink()' function

	  
	  function blockError(){return true;}
window.onerror = blockError;


theObjects = document.getElementsByTagName("object");
for (var i = 0; i < theObjects.length; i++) {
theObjects[i].outerHTML = theObjects[i].outerHTML;
}

function runSWF(archivo, ancho, alto, version, bgcolor, id, menu, FlashVars, quality, allowScriptAccess) {
if(version!=""){
var version_data=version;
}else{
var version_data="6,0,0,0";
}
if(menu!=""){
menu_data=menu;
}else{
menu_data=false;
}
if(bgcolor!=""){
var bgcolor_data=bgcolor;
}else{
var bgcolor_data="#FFFFFF";
}
if(id!=""){
id_data=id;
}else{
id_data="flashMovie";
}
if(quality!=""){
quality_data=quality;
}else{
quality_data="high";
}
if(allowScriptAccess!=""){
allowScriptAccess_data=allowScriptAccess;
}else{
allowScriptAccess_data="always";
}
var quality="high"; // calidad de visualización de la peli
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase= "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version= '+version_data+'" width='+ancho+' height='+alto+' id='+id_data+'>\n');
document.write('<param name="movie" value='+archivo+'>\n');
document.write('<param name= "allowScriptAccess" value= '+allowScriptAccess_data+'>\n');
document.write('<param name="quality" value='+quality_data+'>\n');
document.write('<param name="wmode" value="transparent">\n'); // propiedad extra para javascript
document.write('<param name="FlashVars" value='+FlashVars+'>\n');
document.write('<param name="bgcolor" value='+bgcolor_data+'>\n');
document.write('<param name="menu" value='+menu_data+' >\n');
document.write('<embed src='+archivo+' bgcolor='+bgcolor_data+' FlashVars='+FlashVars+' wmode="transparent" menu='+menu_data+' allowScriptAccess='+allowScriptAccess_data+' quality='+quality_data+' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width='+ancho+' height='+alto+' swLiveConnect=true name='+id_data+'></embed>');
document.write('</object>\n');
}

	function cargapagina(pagina){
		var i;
		var params = '';
		for(i=0;i<document.frm.elements.length;i++){
			if(params == ''){
				params += '?'+document.frm.elements[i].name+'='+document.frm.elements[i].value;
			}
			else{
				params += '&'+document.frm.elements[i].name+'='+document.frm.elements[i].value;
			} 
		} 

		tb_show(null, pagina+params, false);
		return false;
	}


	var mygrid;
	function pruebaGrid(){
		mygrid = new dhtmlXGridFromTable('tblToGrid');
    mygrid.attachEvent("onKeyPress",onKeyPressed);
	mygrid.setSizes();
	mygrid.enableBlockSelection();

	 function onKeyPressed(code,ctrl,shift){
			 
				if(code==67&&ctrl){
					mygrid.setCSVDelimiter("\t")
					mygrid.copyBlockToClipboard()
				}
				if(code==86&&ctrl){
					mygrid.pasteBlockFromClipboard()
				}
		return true;
    }
	function showClipboard(){
			 if (window.clipboardData)
   					document.getElementById("ser_1").value = window.clipboardData.getData("Text");		
	}
	}

function zoomText(tipo){
	//inicializaciones
	obj=document.getElementById("resenas");
var max = 120 //tamaño máximo del fontSize
var min = 90 //tamaño mínimo del fontSize
	if (obj.style.fontSize==""){
		obj.style.fontSize="100%";
	}
	actual=parseInt(obj.style.fontSize);
	incremento=10;
	
	//operacion
	if(tipo=="normal"){
		obj.style.fontSize="100%"
	}
	if(tipo=="aumentar"){
		valor=actual+incremento;
		obj.style.fontSize=valor+"%"
	}
	if(tipo=="disminuir"){
		valor=actual-incremento;
		obj.style.fontSize=valor+"%"
	}
}

//MOSTRAR Y ESCONDER OPCIONES EN FORMULARIOS

df={
	hideClass:'hide',
	letterOption:'newsletter',
	subjectOption:'subject',
	init:function(){
		if(!document.getElementById || !document.createTextNode){return;}
		df.news=document.getElementById(df.letterOption);
		df.subject=document.getElementById(df.subjectOption);
		if(!df.subject || !df.news){return;}
		
		df.newsOpt=DOMhelp.closestSibling(df.news.parentNode,1);
		df.subjectOpt=DOMhelp.closestSibling(df.subject.parentNode,1);
		DOMhelp.cssjs('add',df.newsOpt,df.hideClass);
		DOMhelp.cssjs('add',df.subjectOpt,df.hideClass);
		DOMhelp.addEvent(df.news,'click',df.letterChange,false);
		DOMhelp.addEvent(df.subject,'change',df.subjectChange,false);
	},
	letterChange:function(e){
		var t=DOMhelp.getTarget(e);
		var action=t.checked?'remove':'add';
		DOMhelp.cssjs(action,df.newsOpt,df.hideClass);
	},
	subjectChange:function(e){
		var t=DOMhelp.getTarget(e);
		var action=t.selectedIndex==5?'remove':'add';
		DOMhelp.cssjs(action,df.subjectOpt,df.hideClass);
		if(action=='remove'){
			df.subjectOpt.getElementsByTagName('input')[0].focus();
		}
	}
}
DOMhelp.addEvent(window,'load',df.init,false);

function ficha (URL){
window.open(URL,"ficha","width=350, height=500, scrollbars=yes, menubar=no, location=no, resizable=no")
} 

function ayuda (URL){
window.open(URL,"ficha","width=620, height=500, scrollbars=yes, menubar=no, location=no, resizable=no")
} 