function JSBookMark(){
	if(navigator.appName == 'Netscape' && parseFloat(navigator.appVersion) >= 3.0)
		alert('Pressione <CRTL>+D para adicionar ao favoritos');
	else
		window.external.AddFavorite(top.location.href, document.title);
}
function JSPopMenu(url, id, myW, myH, myX, myY, scroll, resize, gw, menubar){
	var w = (myW) ? myW : getWinWidth(), h = (myH) ? myH : getWinHeight();
	var x = (myX) ? myX : (gw ? (getWinWidth() / 2) - (w / 2) : 0);
	var y = (myY) ? myY : (gw ? (getWinHeight() / 2) - (h / 2) : 0);
	var menu = (menubar == '1' || menubar == 'yes') ? 'yes' : 'no';
return(window.open(url, id, 'width='+w+',outerWidth='+(w + 10)+',height='+h+',left='+x+',top='+y+',scrollbars='+scroll+',toolbar=no,location=no,directories=no,status=no,menubar='+menu+',resizable='+resize+',copyhistory=no,titlebar=no,hotkeys=no'));
}
function JSPop(url, id, w, h){ var win = JSPopUp(url, id, w, h, 0, 0, 'no', 'no', true); }
function JSPopUp(url, id, w, h, x, y, scroll, resize, gw){ return(JSPopMenu(url, id, w, h, x, y, scroll, resize, gw, 'no')); }
function JSPopImg(url, id, w, h){
	wImg = JSPopUp('', id, w, h, 0, 0, 'no', 'no', 1);
	wImg.document.open();
	wImg.document.write('<html><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="#ffffff">');
	wImg.document.write('<img src='+url+' width="'+w+'" height="'+h+'" alt="" border="0">');
	wImg.document.write('</body></html>');
	wImg.document.close();
	wImg.focus();
return(wImg);
}
function getWinWidth(target){ return(screen.availWidth - (!target ? 8 : 0)); }
function getWinHeight(target){ return(screen.availHeight - (!target ? 28 : 0)); }
function maximizeWin(target){ resizeWin(getWinWidth(), getWinHeight(), target); return(target); }
function resizeWin(w, h, target){
	target = (!target) ? top.window : target;
	target.resizeTo(w, h);
	target.moveTo((getWinWidth(target) - w) / 2, (getWinHeight(target) - h) / 2);
	target.focus();
}
function JSClose(win){ if(win) win.close(); else window.close(); }
function adjustIFrame(iframe){
	var doc = iframe.document;
	if(doc.height){
		var el = gebi(iframe.name);
		el.height = doc.height + 'px';
		el.width = doc.width + 'px';
	}else if(document.all){
		var el = document.all[iframe.name];
		iframe = (doc.compatMode && doc.compatMode != 'BackCompat') ? doc.documentElement : doc.body;
		el.height = iframe.scrollHeight + 'px';
		el.width = iframe.scrollWidth + 'px';
	}
}
