//FLASH
function flash(versao, largura, altura, nome, modo, cor)
{
	/*
	versao = 8 .................. <- Versão do player
	largura = 200px ............. <- Largura do SWF
	altura = 200px .............. <- Altura do SWF
	id = nome ................... <- ID do arquivo
	nome = arquivo.swf .......... <- Caminho do SWF, essa opção não pode ser vazia
	modo = transparent/opaque ... <- Flash transparente ou opaco / pode ser vazia
	cor = #ffffff ............... <- Cor de fundo
	*/
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="'+versao+',0,0,0" width="'+largura+'" height="'+altura+'">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
	document.write('<param name="movie" value="'+nome+'" />\n');
	document.write('<param name="wmode" value="'+modo+'" />\n');
	document.write('<param name="bgcolor" value="'+cor+'" />\n');
	document.write('<embed src="'+nome+'" wmode="'+modo+'" bgcolor="'+cor+'" width="'+largura+'" height="'+altura+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
	document.write('</object>\n');
}
function kada_AutoResWindow(theURL,winName,width,height,features) { 
//1.1 kadazuro kadazuro@kardouz.com
	if(window.screen){
		per_ancho=(width/screen.width)*100;//porcentaje screen-ancho
		per_alto=(height/width)*100;//porcentaje de ancho-alto
		win_ancho=(screen.width*per_ancho)/100;//ancho de la ventana
		win_alto=(win_ancho*per_alto)/100;//alto de la ventana
		x=(screen.width-win_ancho)/2;//centra x
		y=(screen.height-win_alto)/2;//centra y
	}else{// si el buscador es 4-- queda todo igual :(
		x=0;
		y=0;
		win_ancho=w;
		win_alto=y;
	}
	winfeatures=("top="+y+",left="+x+",width="+win_ancho+",height="+win_alto+","+features);
	window.open(theURL,winName,winfeatures);
}
//
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 pop_up(theURL,width,height,features) { 
	if(window.screen){
		per_ancho=(width/screen.width)*100;//porcentaje screen-ancho
		per_alto=(height/width)*100;//porcentaje de ancho-alto
		win_ancho=(screen.width*per_ancho)/100;//ancho de la ventana
		win_alto=(win_ancho*per_alto)/100;//alto de la ventana
		x=(screen.width-win_ancho)/2;//centra x
		y=(screen.height-win_alto)/2;//centra y
	}else{// si el buscador es 4-- queda todo igual :(
		x=0;
		y=0;
		win_ancho=w;
		win_alto=y;
	}
	winfeatures=("top="+y+",left="+x+",width="+win_ancho+",height="+win_alto+","+features);
	window.open(theURL,'',winfeatures);
}

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_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; }
}
