// Copyright 2001 AgênciaClick


// Basics


d=document

function isDef(S){return(eval('typeof('+S+')')!='undefined'&&eval('typeof('+S+')')!='unknown')}

function BUGdivIEmac(){return((is.mac&&is.ie)?'<div></div>':'')}
function BUGdivNE(){return ((is.ns4)?'<div style="position:absolute;top:-10">&nbsp;</div><link rel="stylesheet" href="../../css/superig.css">':'')+((is.ns4&&is.win)?'<link rel="stylesheet" href="../../css/superig_ns.css">':'')}

function toId(S){
	S=S.toLowerCase()
	S=S.replace(/[áàãâ]/g,'a')
	S=S.replace(/[éèêë&]/g,'e')
	S=S.replace(/[íìîï]/g,'i')
	S=S.replace(/[óòõôö]/g,'o')
	S=S.replace(/[úùûü]/g,'u')
	S=S.replace(/[ç]/g,'c')
	S=S.replace(/[ \.:,\+\-\*\'\"\\\/<>]/g,'')
	if(S.indexOf('?')!=-1)S=S.substring(0,S.indexOf('?'))
	return S
}

function openPopup(url,w,h,other){
	popup=window.open(url,'popupSuperiG_'+toId(url),'left=18,top=18,width='+w+',height='+h+',scrollbars=1'+((other)?','+other:''))
	other=other||''
	if(is.ie&&other.indexOf('fullscreen')!=-1){popup.moveTo(0,0);popup.resizeTo(screen.width,screen.height)}
	popup.focus()
}

function openBlank(url){window.open(url)}


// Forms

function cFormField(obj){
	if(obj.value.length==obj.maxLength){
		for(var i=0;i<obj.form.length;i++){
			if(obj.form[i]==obj){obj.form[i+1].focus();break}
		}
	}
}


// Strings

var tb='<table border=0 cellspacing=0 cellpadding=0 '