function mostraFoto(obj, dir){
	document.getElementById(obj).innerHTML = '<img src="'+dir+'" border=0>';
}

function GeraSWF($arquivo,$altura,$largura,$id,$transparent){
	
	var incTransp = '';
	
    document.writeln('    <object align="middle" id="globalnav-object" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + $largura + '" height="' + $altura + '" id="' + $id + '" name="' + $id + '">');
	if($transparent == "yes"){
		document.writeln('        <param name="wmode" value="transparent" />');
		incTransp = 'wmode="transparent"';
	}
    document.writeln('        <param name="allowScriptAccess" value="sameDomain" />');
    document.writeln('        <param name="quality" value="high" />');
    document.writeln('        <param name="scaleMode" value="noScale" />');
    document.writeln('        <param name="menu" value="false" />');
    document.writeln('        <param name="bgcolor" value="#000000" />');
    document.writeln('        <param name="movie" value="' + $arquivo + '" />');
    document.writeln('        <param name="FlashVars" value="loc=en_US&htmlApp=false&gatewayURL=gwurl" />');
    document.writeln('        <embed id="globalnav-embed" src="' + $arquivo + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="loc=en_US&htmlApp=false&gatewayURL=gwurl" menu="false" align="middle" quality="high" scale="noscale" id="' + $id + '" width="' + $largura + '" bgcolor="#000000" height="' + $altura + '" '+incTransp+'></embed>');
    document.writeln('    </object>');
}

function changeBG(obj, status){
	var s =document.getElementById(obj).style;
	
	if(status == 'over'){
		s.backgroundColor = '#0066FF';
		document.getElementById(obj+'_bloco').style.color = "#FFFFFF";
		s.cursor = 'hand';
	} else {
		document.getElementById(obj+'_bloco').style.color = "#0066FF";
		s.backgroundColor = '#f2f2f2';
	}
}


function verifyCompatibleBrowser(){ 
    this.ver=navigator.appVersion 
    this.dom=document.getElementById?1:0 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?1:0; 
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
 
    this.ns4=(document.layers && !this.dom)?1:0; 
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
    return this 
} 
bw=new verifyCompatibleBrowser() 
 
 
var speed=50 
 
var loop, timer 
 
function ConstructObject(obj,nest){ 
    nest=(!nest) ? '':'document.'+nest+'.' 
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight 
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight 
    this.up=MoveAreaUp;this.down=MoveAreaDown; 
    this.MoveArea=MoveArea; this.x; this.y; 
    this.obj = obj + "Object" 
    eval(this.obj + "=this") 
    return this 
} 
function MoveArea(x,y){ 
    this.x=x;this.y=y 
    this.css.left=this.x 
    this.css.top=this.y 
} 
 
function MoveAreaDown(move){ 
	if(this.y>-this.scrollHeight+objContainer.clipHeight){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".down("+move+")",speed) 
	} 
} 
function MoveAreaUp(move){ 
	if(this.y<0){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".up("+move+")",speed) 
	} 
} 
 
function PerformScroll(speed){ 
	if(initialised){ 
		loop=true; 
		if(speed>0) objScroller.down(speed) 
		else objScroller.up(speed) 
	} 
} 
 
function CeaseScroll(){ 
    loop=false 
    if(timer) clearTimeout(timer) 
} 
var initialised; 
function InitialiseScrollableArea(){ 
    objContainer=new ConstructObject('divContainer') 
    objScroller=new ConstructObject('divContent','divContainer') 
    objScroller.MoveArea(0,0) 
    objContainer.css.visibility='visible' 
    initialised=true; 
} 

function newWindow(mypage, w, h, scroll, resizeWindow) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+','+resizeWindow+''
	win = window.open(mypage, 'newWindow', winprops)
	
		if (parseInt(navigator.appVersion) >= 4) { 
			win.window.focus(); 
		}
}


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

var flg1 = true;
var flg2 = true;
var txtorig1; 
var txtorig2; 

function inn(txt,i) {
	 if (eval('flg'+i)){
		  eval('txtorig'+i+'=txt.value;');
		  eval('flg'+i+'=false;');
	 }
	
	 if (txt.value == eval('txtorig'+i)) txt.value = '';
}

function out(txt,i) {
	if (txt.value == '') txt.value = eval('txtorig'+i);
}
