// JavaScript Document



// Popup Window ------------------------------------------------------------



<!--

function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}

//-->



// Função para MainMenu ----------------------------------------------------



<!--//--><![CDATA[//><!--

startList = function() {

	if (document.all&&document.getElementById) {

		navRoot = document.getElementById("nav");

		for (i=0; i<navRoot.childNodes.length; i++) {

			node = navRoot.childNodes[i];

			if (node.nodeName=="LI") {

				node.onmouseover=function() {

					this.className+=" over";

				}

				node.onmouseout=function() {

					this.className=this.className.replace(" over", "");

				}

			}

		}

	}

}

window.onload=startList;

//--><!]]>



// Cross browser flash ----------------------------------------------------

function MM_checkPlugin(plgIn, theURL, altURL, autoGo) { //v4.0 
  var ok=false; document.MM_returnValue = false; 
  with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) { 
    ok=(plugins && plugins[plgIn]); 
  } else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1 
    if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) ok=window.MM_flash; 
    else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir; 
    else ok=autoGo; } 
  if (!ok) theURL=altURL; if (theURL) window.location=theURL; 
} 




function AC_AddExtension(src, ext)

{

  if (src.indexOf('?') != -1)

    return src.replace(/\?/, ext+'?'); 

  else

    return src + ext;

}



function AC_Generateobj(objAttrs, params, embedAttrs) 

{ 

  var str = '<object ';

  for (var i in objAttrs)

    str += i + '="' + objAttrs[i] + '" ';

  str += '>';

  for (var i in params)

    str += '<param name="' + i + '" value="' + params[i] + '" /> ';

  str += '<embed ';

  for (var i in embedAttrs)

    str += i + '="' + embedAttrs[i] + '" ';

  str += ' ></embed></object>';



  document.write(str);

}



function AC_FL_RunContent(){

  var ret = 

    AC_GetArgs

    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"

     , "application/x-shockwave-flash"

    );

  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);

}



function AC_SW_RunContent(){

  var ret = 

    AC_GetArgs

    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"

     , null

    );

  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);

}



function AC_GetArgs(args, ext, srcParamName, classid, mimeType){

  var ret = new Object();

  ret.embedAttrs = new Object();

  ret.params = new Object();

  ret.objAttrs = new Object();

  for (var i=0; i < args.length; i=i+2){

    var currArg = args[i].toLowerCase();    



    switch (currArg){	

      case "classid":

        break;

      case "pluginspage":

        ret.embedAttrs[args[i]] = args[i+1];

        break;

      case "src":

      case "movie":	

        args[i+1] = AC_AddExtension(args[i+1], ext);

        ret.embedAttrs["src"] = args[i+1];

        ret.params[srcParamName] = args[i+1];

        break;

      case "onafterupdate":

      case "onbeforeupdate":

      case "onblur":

      case "oncellchange":

      case "onclick":

      case "ondblClick":

      case "ondrag":

      case "ondragend":

      case "ondragenter":

      case "ondragleave":

      case "ondragover":

      case "ondrop":

      case "onfinish":

      case "onfocus":

      case "onhelp":

      case "onmousedown":

      case "onmouseup":

      case "onmouseover":

      case "onmousemove":

      case "onmouseout":

      case "onkeypress":

      case "onkeydown":

      case "onkeyup":

      case "onload":

      case "onlosecapture":

      case "onpropertychange":

      case "onreadystatechange":

      case "onrowsdelete":

      case "onrowenter":

      case "onrowexit":

      case "onrowsinserted":

      case "onstart":

      case "onscroll":

      case "onbeforeeditfocus":

      case "onactivate":

      case "onbeforedeactivate":

      case "ondeactivate":

      case "type":

      case "codebase":

        ret.objAttrs[args[i]] = args[i+1];

        break;

      case "width":

      case "height":

      case "align":

      case "vspace": 

      case "hspace":

      case "class":

      case "title":

      case "accesskey":

      case "name":

      case "id":

      case "tabindex":

        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];

        break;

      default:

        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];

    }

  }

  ret.objAttrs["classid"] = classid;

  if (mimeType) ret.embedAttrs["type"] = mimeType;

  return ret;

}





// ypChaser class definition ----------------------------------------------------



function ypChaser(sLayerId, iTopOffset, iSlideTime, iCeiling, iFloor) {

	this.chaserDiv = null

	this.layerId = sLayerId

	this.topOffset = iTopOffset

	this.slideTime = iSlideTime

	this.ceiling = iCeiling

	this.floor = iFloor

	ypChaser.registry[ypChaser.registry.length] = this

	}

ypChaser.isIE = window.clientInformation ? true : false

ypChaser.isIEDTD = ((document.doctype && document.doctype.name.indexOf(".dtd")>-1) || document.compatMode == "CSS1Compat") ? true : false;

ypChaser.isN4 = document.layers ? true : false

ypChaser.isN6 = navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 5

ypChaser.isO5 = navigator.userAgent.indexOf("Opera") != -1 && parseInt(navigator.appVersion) >= 4

ypChaser.registry = new Array( )

ypChaser.callRate = 10

window.setInterval("ypChaser.timer( )", ypChaser.callRate)

ypChaser.timer = function() {

	for (var i = 0; chObj = this.registry[i]; i++) {

		if (!chObj.chaserDiv) chObj.attemptLoad()

		if (chObj.chaserDiv) chObj.main()

		}

	}

ypChaser.prototype.attemptLoad = function() {

	var chDiv = null

	if (ypChaser.isN6 || ypChaser.isO5) chDiv = document.getElementById(this.layerId)

	else if (ypChaser.isIE) chDiv = document.all[this.layerId]

	else if (ypChaser.isN4) chDiv = document.layers[this.layerId]

	if (chDiv && chDiv != null) {

		this.chaserDiv = chDiv

		}

	}

ypChaser.prototype.main = function( ) {

	this.currentY = this.getCurrentY()

	var scrollTop = ypChaser.getWindowScroll() 

	var newTargetY = scrollTop + this.topOffset

	var floor = ypChaser.getDocumentHeight() - this.floor

	newTargetY = Math.max( newTargetY, this.ceiling)

	if (!ypChaser.isO5) newTargetY = Math.min(newTargetY, floor)

	if ( this.currentY != newTargetY ) {

		if ( newTargetY != this.targetY ) {

			this.targetY = newTargetY

			this.slideInit( )

			}

		this.slide( )

		}

	}

ypChaser.prototype.slideInit = function( ) {

	this.A = (this.targetY - this.currentY) / this.slideTime / this.slideTime

	this.startT = (new Date()).getTime()

	this.startP = this.getCurrentY()

	this.D = this.targetY - this.startP

	}



ypChaser.prototype.slide = function( ) {

	var elapsed = (new Date()).getTime() - this.startT

		if (elapsed < this.slideTime) {

			this.moveTo(this.D - (Math.round(Math.pow(this.slideTime - elapsed, 2) * this.A)) + this.startP)

			}

	}

ypChaser.prototype.moveTo = function(ny) {

	if (ypChaser.isN4) this.chaserDiv.top = ny

	else this.chaserDiv.style.top = ny + "px"

	}

ypChaser.prototype.getCurrentY = function() {

	var n = ypChaser.isN4 ? this.chaserDiv.top : parseInt(this.chaserDiv.style.top)

	return isNaN(n) ? 0 : n

	}

ypChaser.getWindowScroll = function() {

	if (ypChaser.isIEDTD) {

		window.status=document.documentElement.scrollTop;

		return document.documentElement.scrollTop;

		}

	else if (ypChaser.isIE) return document.body.scrollTop;

	else return window.pageYOffset

	}

ypChaser.getDocumentHeight = function() {

	if (ypChaser.isO5) return 0 // opera can't retreive this property.

	else if (ypChaser.isIEDTD) return Math.max(document.documentElement.scrollHeight, document.documentElement.offsetHeight)

	else if (ypChaser.isIE) return Math.max(document.body.scrollHeight, document.body.offsetHeight)

	else return window.document.height

	}



//-->