function abrePopupASP(page,width,height) {
	features = 'width='+width+',height='+height+',scrollbars=yes,statusbar=no,resizable=yes';
	page = page+'?agente=%{COD_CONEXAO}'
	win = window.open(page,'id',features);
	win.window.focus();
}
function abrePopupNoScroll(page,width,height) {
	features = 'width='+width+',height='+height+',scrollbars=no,statusbar=no';
	win = window.open(page,'id',features);
	win.window.focus();
}
function abrePopup(page,width,height) {
	features = 'width='+width+',height='+height+',scrollbars=yes,statusbar=no';
	win = window.open(page,'id',features);
	win.window.focus();
}
function abreResizablePopup(page,width,height) {
	features = 'width='+width+',height='+height+',scrollbars=yes,statusbar=no,resizable=yes';
	win = window.open(page,'id',features);
	win.window.focus();
}
function newWindow(mypage,myname,w,h,features) {
var win = null;
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
if (winl < 0) winl = 0;
if (wint < 0) wint = 0;
var settings = 'height=' + h + ',';
settings += 'width=' + w + ',';
settings += 'top=' + wint + ',';
settings += 'left=' + winl + ',';
settings += features;
win = window.open(mypage,myname,settings);
win.window.focus();
}
function windowSize(xy) {
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) {
	myWidth = window.innerWidth;
	myHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
if(xy == 'w'){return myWidth;}else{return myHeight;}
}
function abreFecha(id){
	if(get(id).style.display == 'none'){
		get(id).style.display = '';
	}else{
		get(id).style.display = 'none';
	}
}
function windowWidth(){	return windowSize('w');}
function setHeight(id,height){
	height = ''+height;
	if(height.charAt(height.length -1) == '%'){
		height = windowPercentHeight(height.substr(0,height.length -1));
	}
	get(id).style.height = height + 'px';
}
function windowPercentHeight(percent){
	percent = parseInt(percent);
	return parseInt(windowHeight()/100*percent);
}
function setLeft(id,left){
	left = ''+left;
	if(left.charAt(left.length -1) == '%'){
		left = windowPercentWidth(left.substr(0,left.length -1));
	}
	get(id).style.left = left + 'px';
}
function windowHeight(){return windowSize('h');}
function windowPercentWidth(percent){
	percent = parseInt(percent);
	return parseInt(windowWidth()/100*percent);
}
function windowPercentHeight(percent){
	percent = parseInt(percent);
	return parseInt(windowHeight()/100*percent);
}
function setTop(id,top){
	top = ''+top;
	if(top.charAt(top.length -1) == '%'){
		top = windowPercentHeight(top.substr(0,top.length -1));
	}
	get(id).style.top = top + 'px';
}
function setWidth(id,width){
	width = ''+width;
	if(width.charAt(width.length -1) == '%'){
		width = windowPercentWidth(width.substr(0,width.length -1));
	}
	get(id).style.width = width + 'px';
}
function savePosition(page,id){
	l = parseInt(get(id).style.left);
	t = parseInt(get(id).style.top);
	w = parseInt(get(id).style.width);
	h = parseInt(get(id).style.height);
	z = get(id).style.zIndex;
	bg = get(id).style.backgroundColor;
	border = get(id).style.border;
	borderL = get(id).style.borderLeft;
	borderT = get(id).style.borderTop;
	borderR = get(id).style.borderRight;
	borderB = get(id).style.borderBottom;
	if(l < 0) l = 0;
	if(l < 0) t = 0;
	if(l < 0) w = 0;
	if(l < 0) h = 0;
	style = "z-index: "+z+"; ";
	style += "left: "+l+"px; ";
	style += "top: "+t+"px; ";
	style += "width: "+w+"px; ";
	style += "height: "+h+"px; ";
	style += "background-color: "+bg+"; ";
	style += "border: "+border+"; ";
	style += "border-left: "+borderL+"; ";
	style += "border-top: "+borderT+"; ";
	style += "border-right: "+borderR+"; ";
	style += "border-bottom: "+borderB+"; ";
	style = style.replace(/[#]/,'$$');
	style = style.replace(/[#]/,'$$');
	style = style.replace(/[#]/,'$$');
	style = style.replace(/[#]/,'$$');
	style = style.replace(/[#]/,'$$');
	style = style.replace(/[#]/,'$$');
	get('iframeoculto_layouteronline').src = page+'&divStyle='+style;
}
var contentsBottom = 0;
function guardaBottom(id){
	h = get(id).style.height;
	t = get(id).style.top;
	b = parseInt(h) + parseInt(t);
	if(contentsBottom < b){
		contentsBottom = b;
	}
}
var _largs = Array();
var _footerAlterado = false;
function zoomaDiv(id,percent){
	if(!_largs[id]){
		_largs[id] = parseInt(get(id).style.width);
	}
	obj = get(id);
	obj.style.zoom = percent+'%';
	largAnterior = _largs[id];
	largAtual = largAnterior*percent/100;
	largNovaPercentAtual = 100*largAnterior/largAtual;
	obj.style.width = (largAnterior*largNovaPercentAtual/100)+'px';
	altAnterior = obj.offsetHeight;
	altAtual = altAnterior*percent/100;
	bottomAtual = altAtual+parseInt(obj.style.top);
	if((bottomAtual > contentsBottom) || _footerAlterado){
		contentsBottom = bottomAtual;
		_footerAlterado = true;
		ajusta();
	}
}
function reposicionaToolbox(idconteudo, idtoolbox) {
	if (get(idtoolbox) != null) {
		get(idtoolbox).style.top = parseInt(get(idconteudo).style.top)-22;
		get(idtoolbox).style.left=get(idconteudo).style.left;
	}
}
function get(id){return document.getElementById(id);}
function setHtml(id, html){get(id).innerHTML = html;}

function _uVoid() { return; }
function nvtTracker(pageId,pageName,sectionId,sectionName,referrer) {
  var res=screen.width+"x"+screen.height;
  var addr= "http://sicportal.unisul.br/content/navitacontent_/ext/noApplication/logPageView.cfm"
  var qs= "?pageId="+escape(pageId)+
          "&pageName="+escape(pageName)+
          "&sectionId="+escape(sectionId)+
          "&sectionName="+escape(sectionName)+
          "&referer="+escape(referrer)+
          "&resolution="+escape(res);
  var i2=new Image(1,1);
  i2.src=addr+qs;
  i2.onload=function() { _uVoid(); }
}
function player(codigo){

window.open('http://shoutcast.unisul.br/player/portal/?cod='+codigo,'player','width=320,height=260');
document.Main.submit();
}
function playertv(codigo){

window.open('http://shoutcast.unisul.br/player/unisultv/?cod='+codigo,'player','width=320,height=260');
document.Main.submit();
}
