function fflash(tsrc,w,h,ver,vars,bg){
	document.write("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ");
	document.write("codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+ver+"' ");
	document.write("WIDTH='"+ w + "' HEIGHT='"+ h + "' id='iflash' ALIGN='center' allowScriptAccess='sameDomain'> ");
	document.write("<PARAM NAME=movie VALUE='" + tsrc + "'> <PARAM NAME=quality VALUE=high> <PARAM NAME=menu VALUE=false> ");
	document.write("<PARAM NAME=allowScriptAccess VALUE='sameDomain'> ");
	document.write("<PARAM NAME='FlashVars' value='"+ vars +"'> ");
	document.write("<PARAM NAME=bgcolor VALUE="+bg+"> <EMBED src='" + tsrc + "' quality=high ");
	document.write("bgcolor="+bg+"  WIDTH='"+ w + "' HEIGHT='"+ h + "' NAME='iflash' ALIGN='center' ");
	document.write("TYPE='application/x-shockwave-flash' menu='false' ");
	document.write("flashvars='" + vars + "' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED></OBJECT>");
}

function openwinr(url,w,h){
	if(w>screen.width) w=screen.width-20;
	if(h>screen.height) h=screen.height-80;
	l=(screen.width-w)/2;
	t=(screen.height-h)/2;
	feat="width="+w+",height="+h+",top="+t+",left="+l+",statusbar=no,scrollbars=yes,menubar=no,resizable=yes";
	w1=window.open(url,'',feat);
}

function openwinmax(url){
	w=screen.width;
	h=screen.height;
	if(screen.width>800) w=screen.width-40;
	if(screen.height>800) h=screen.height-100;
	openwinr(url,w,h);
}

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 decodem(txt){
	var orig="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-.@";
	var dest="bcqNdghT1YUV2Xi9jaQklm0LpJDr@stKuv6734wx_yzABCE.FGHMnIOPRSefWZ58-o";
	var out="";
	if(txt!=""){
		for(i=0;i<txt.length;i++){
			ind=orig.indexOf(txt.substring(i,i+1));
			if(ind!=-1) out+=dest.substring(ind,ind+1);
			else out+=txt.substring(i,i+1);
		}
	}
	return out;
}

function emailto(witch){
	document.location.href="mailto:"+decodem(witch);
}

var curmenu="";

function showm(cur){
	Alosquehay=Array("s1","s2","s3");
	for(i=0;i<Alosquehay.length;i++){
		obj=MM_findObj(Alosquehay[i]);
		if(cur==Alosquehay[i] && curmenu!=cur) obj.style.display='';
		else obj.style.display='none';
	}
	if(curmenu==cur) curmenu="";
	else curmenu=cur;
}


function fshowhide(cual){
	obj=MM_findObj(cual);
	if(obj.style.display=='none') obj.style.display='';
	else obj.style.display='none';
}

function CambiarVal(obj){
	if(obj.value=="USUARIO" || obj.value=="CONTRASEŅA") obj.value="";
}

function vervideo(url){
	openwinr('vervideo.asp?url='+escape(url),700,460);
}
