function id() {
  var elements = new Array();
  for (var i = 0; i < arguments.length; i++) {
    var element = arguments[i];
    if (typeof element == 'string') element = document.getElementById(element);
    if (arguments.length == 1) return element;
    elements.push(element);
  }
  return elements;
}

funcoesGerais = {
	apagaCombos : function(){
		drops = document.body.getElementsByTagName('select');
		for(c=0;c<drops.length;c++){
			drops[c].style.visibility='hidden';
		}
	},

	reexibeCombos : function(box){
		if (id(box)) {
			drops = id(box).getElementsByTagName('select');
		}else {
			drops = document.body.getElementsByTagName('select');
		}
		for(c=0;c<drops.length;c++){
			drops[c].style.visibility='visible';
		}
	},

	carregaYoutube : function(youtubeLink,largura,altura,paremetros){
		if (paremetros == undefined) {
			paremetros='&amp;hl=pt-br&amp;fs=1&amp;rel=0';
		}
		if (youtubeLink.indexOf('watch?v=') != -1){
			idBegin = youtubeLink.indexOf('watch?v=') + 8;
			if (youtubeLink.indexOf('&',idBegin)) {
				idEnd = youtubeLink.indexOf('&',idBegin);
				youtubeId = youtubeLink.substring(idBegin,idBegin)
			}else {
				youtubeId = youtubeLink.substring(idBegin)
			}
			funcoesGerais.CarregaFlash ('http://www.youtube.com/v/' + youtubeId + paremetros,largura,altura);
		}else {
			if (youtubeLink.indexOf('/v/') != -1){
				idBegin = youtubeLink.indexOf('/v/') + 3;
				idEnd = youtubeLink.indexOf('&',idBegin);
				youtubeId = youtubeLink.substring(idBegin,idEnd);
				funcoesGerais.CarregaFlash ('http://www.youtube.com/v/' + youtubeId + paremetros,largura,altura);
			}else {
				funcoesGerais.CarregaFlash ('http://www.youtube.com/v/' + youtubeLink + paremetros,largura,altura);
			}

		}
	},
	
	CarregaFlash : function(caminho,largura,altura,wmode){
		//classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
		var objectId = Math.random()*10000;
		objectId = parseInt(objectId);
		document.write('<object data="' + caminho + '" type="application/x-shockwave-flash" width="' + largura + '" height="' + altura + '" id="objectId_' + objectId + '" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0">');
		document.write('<param name="allowFullScreen" value="true" />');
		document.write('<param name="allowscriptaccess" value="always" />');
		document.write('<param name="quality" value="high" />');
		document.write('<param name="scale" value="noscale" />');
		if (wmode == undefined) {
			document.write('<param name="wmode" value="none">');
		}else {
			document.write('<param name="wmode" value="' + wmode + '">');
		}
		document.write('<param name="movie" value="' + caminho + '" />');
		document.write('</object>');
	},
	
	CarregaFlashDiv : function(caminho,largura,altura,div,wmode){	
		var objectId = Math.random()*10000;
		objectId = parseInt(objectId);	
		var conteudo = '<object data="' + caminho + '" type="application/x-shockwave-flash" width="' + largura + '" height="' + altura + '" id="objectId_' + objectId + '" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0">';
		conteudo += '<param name="allowFullScreen" value="true" />';
		conteudo += '<param name="allowscriptaccess" value="always" />';
		conteudo += '<param name="quality" value="high" />';
		conteudo += '<param name="scale" value="noscale" />';
		if (wmode == undefined) {
			conteudo += '<param name="wmode" value="none">';
		}else {
			conteudo += '<param name="wmode" value="' + wmode + '">';
		}
		conteudo += '</object>';
		this.AlteraTexto(div,conteudo);
	},

	removeElement: function(elemId) {
	  var olddiv = id(elemId);
	  document.body.removeChild(olddiv);
	},

	getPageSize: function() {
				
		var xScroll, yScroll;
	
		if (window.innerHeight && window.scrollMaxY) {	
			xScroll = window.innerWidth + window.scrollMaxX;
			yScroll = window.innerHeight + window.scrollMaxY;
		} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
			xScroll = document.body.scrollWidth;
			yScroll = document.body.scrollHeight;
		} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
			xScroll = document.body.offsetWidth;
			yScroll = document.body.offsetHeight;
		}
		
		var windowWidth, windowHeight;
		
		if (self.innerHeight) {	// all except Explorer
			if(document.documentElement.clientWidth){
				windowWidth = document.documentElement.clientWidth; 
			} else {
				windowWidth = self.innerWidth;
			}
			windowHeight = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
			windowWidth = document.documentElement.clientWidth;
			windowHeight = document.documentElement.clientHeight;
		} else if (document.body) { // other Explorers
			windowWidth = document.body.clientWidth;
			windowHeight = document.body.clientHeight;
		}	
		
		// for small pages with total height less then height of the viewport
		if(yScroll < windowHeight){
			pageHeight = windowHeight;
		} else { 
			pageHeight = yScroll;
		}
		
		// for small pages with total width less then width of the viewport
		if(xScroll < windowWidth){	
			pageWidth = xScroll;		
		} else {
			pageWidth = windowWidth;
		}

		// Pega altura e largura do scroll
		var scrollH, scrollV;

		if (self.pageYOffset) {
			scrollV = self.pageYOffset;
			scrollH = self.pageXOffset;
		} else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)){	 // Explorer 6 Strict
			scrollV = document.documentElement.scrollTop;
			scrollH = document.documentElement.scrollLeft;
		} else if (document.body) {// all other Explorers
			scrollV = document.body.scrollTop;
			scrollH = document.body.scrollLeft;	
		}
		
		return {pw:pageWidth,ph:pageHeight,ww:windowWidth,wh:windowHeight,sw:scrollV,sh:scrollH};
	},

	centralizaObj: function(obj,onResize) {
		if (onResize){
			window.onresize = function(){
				funcoesGerais.centralizaObj(box)
			}
		}
		medidas = this.getPageSize();
		centroPgW = medidas.ww/2;
		centroPgH = medidas.wh/2;
		centroSiteW = (id(obj).offsetWidth)/2;
		centroSiteH = (id(obj).offsetHeight)/2;
		if ((centroPgH-centroSiteH)<0){
			pTop = 0;
		} else {
			pTop = centroPgH-centroSiteH;
		}
		if ((centroPgW-centroSiteW)<0){
			pLeft = 0;
		} else {
			pLeft = centroPgW-centroSiteW;
		}
		//this.posicionaBG(pTop-238,pLeft-301);
		id(obj).style.position="absolute";
		id(obj).style.top=pTop+"px";
		id(obj).style.left=pLeft+"px";
	},

	posicionaBG: function(pTop,pLeft) {
		document.body.style.backgroundPosition= pLeft+"px "+pTop+"px";
	},

	KeyCheck :  function (e) {
		var KeyID = (window.event) ? event.keyCode : e.keyCode;
		if (KeyID==27) {
			lightbox.fechar();
		}
	},

	trocaOpacity : function(opacity, objId) {
		if (id(objId)){
			var objeto = id(objId).style;
			objeto.opacity = (opacity / 100);
			objeto.MozOpacity = (opacity / 100);
			objeto.KhtmlOpacity = (opacity / 100);
			objeto.filter = "alpha(opacity=" + opacity + ")";
		}
	},

	fadeOpacity : function(elemId, fromOpacity, toOpacity, time, fps){/* fps entre 8 - 12 */
		var steps = Math.ceil(fps * (time / 1000));
		var delta = (toOpacity - fromOpacity) / steps;
		
		this.fadeOpacityStep(elemId, 0, steps, fromOpacity, delta, (time / steps));
	},

	fadeOpacityStep : function(elemId, stepNum, steps, fromOpacity, delta, timePerStep){
		this.trocaOpacity(Math.round(parseInt(fromOpacity) + (delta * stepNum)), elemId);
		if (stepNum < steps) {
			setTimeout("funcoesGerais.fadeOpacityStep('" + elemId + "', " + (stepNum + 1) + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + timePerStep + ");", timePerStep);
		}
	},
	
	initCustomInput : function(formId,onClassRadio,offClassRadio,onClassCheckbox,offClassCheckbox){
	    var agt=navigator.userAgent.toLowerCase();
	
		this.major = parseInt(navigator.appVersion);
		this.ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
		this.ie3    = (this.ie && (this.major < 4));
		this.ie4    = (this.ie && (this.major == 4) && (agt.indexOf("msie 4")!=-1) );
		this.iemac  = (this.ie && (agt.indexOf("mac")!=-1));
		
		if( !(this.iemac || this.ie3 || this.ie4) ){
			funcoesGerais.customiseInputs(formId,onClassRadio,offClassRadio,onClassCheckbox,offClassCheckbox);
		}
	},
	
	addLabelProperties : function(f){
		if(typeof f.getElementsByTagName == 'undefined') return;
		var labels = f.getElementsByTagName("label"), label, elem, i = j = 0;
		
		while (label = labels[i++]){
			if(typeof label.htmlFor == 'undefined') return;
			elem = document.getElementById(label.htmlFor);
			
			if(typeof elem == 'undefined'){
				var inputs = label.getElementsByTagName("input");
				if(inputs.length==0){
					continue;
				} else {
					elem=inputs[0];
				}
			} else if(typeof elem.label != 'undefined') {
				continue;
			} else if(typeof elem.length != 'undefined' && elem.length > 1 && elem.nodeName != 'SELECT'){
				for(j=0; j<elem.length; j++){
					elem.item(j).label = label;
				}
			}
			elem.label = label;
		}
	},
	
	toggleLabelStyle : function(formId, label, onClass, offClass){
		if(!document.getElementById || !label) return;
			
		var form = document.getElementById(formId);
		if(!form) return;
		
		if(label.htmlFor) {
			var e = document.getElementById(label.htmlFor);
			
			if(e.type=="checkbox"){
				e.label.className = (e.label.className==onClass) ? offClass : onClass;
				e.checked = (e.label.className==onClass);
			} else if(e.type=="radio"){
				var radioGroup = form.elements[e.name];
				if(!radioGroup) return;
				
				for(var i=0; i<radioGroup.length; i++){
					if(radioGroup[i].label){
						radioGroup[i].label.className = ((radioGroup[i].checked=(radioGroup[i].id == e.id))
														 && radioGroup[i].label) ? onClass : offClass;
					}
				}
			}
		}
	},
	
	customiseInputs : function(formId,onClassRadio,offClassRadio,onClassCheckbox,offClassCheckbox){
		if(!document.getElementById) return;
	
		var prettyForm = document.getElementById(formId);
		if(!prettyForm) return;
			
		prettyForm.onreset = function() { funcoesGerais.customiseInputs(formId, onClassRadio, offClassRadio, onClassCheckbox, offClassCheckbox); }
		
		funcoesGerais.addLabelProperties(prettyForm);
	
		var inputs = prettyForm.getElementsByTagName('input');
		for (var i=0; i < inputs.length; i++) {
	
			//RADIO ONLY
			if( (inputs[i].type=="radio") && inputs[i].label && onClassRadio && offClassRadio){
				inputs[i].style.display="none";
				inputs[i].label.className=offClassRadio;
				inputs[i].label.onclick = function (){ funcoesGerais.toggleLabelStyle(formId, this, onClassRadio, offClassRadio); return false; };
				inputs[i].onclick = function (){ funcoesGerais.toggleLabelStyle(formId, this.label, onClassRadio, offClassRadio); };
				if(inputs[i].defaultChecked || inputs[i].checked){ funcoesGerais.toggleLabelStyle(formId, inputs[i].label, onClassRadio, offClassRadio); }
			}
			
			//CHECKBOX ONLY
			if( (inputs[i].type=="checkbox") && inputs[i].label && onClassCheckbox && offClassCheckbox){
				inputs[i].style.display="none";
				inputs[i].label.className=offClassCheckbox;
				inputs[i].checked = false;
				inputs[i].label.onclick = function (){ funcoesGerais.toggleLabelStyle(formId, this, onClassCheckbox, offClassCheckbox); return false; };
				inputs[i].onclick = function (){ funcoesGerais.toggleLabelStyle(formId, this.label, onClassCheckbox, offClassCheckbox); };
				if(inputs[i].defaultChecked || inputs[i].checked){ funcoesGerais.toggleLabelStyle(formId, inputs[i].label, onClassCheckbox, offClassCheckbox); }
			}
	
			if( (inputs[i].type=="checkbox") || (inputs[i].type=="radio") && inputs[i].label ){
				if(!this.ie){
					inputs[i].label.style.margin = "1px";
					inputs[i].onfocus = function (){ this.label.style.border = "1px dotted #333"; this.label.style.margin="0px"; return false; };
					inputs[i].onblur  = function (){ this.label.style.border = "none"; this.label.style.margin="1px"; return false; };
				}
			}
		}
	}
}

lightbox = {

    xOp7Up: '',
    xOp6Dn: '',
    xIE4Up: '',
    xIE4: '',
    xIE5: '',
    xNN4: '',
    xUA: navigator.userAgent.toLowerCase(),
    xMac: navigator.userAgent.toLowerCase().indexOf('mac') != -1,

    moverJanela: function(box)
    {
        var viewportwidth;
        var viewportheight;

        // the most standard compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
        if (typeof window.innerWidth != 'undefined')
        {
            viewportwidth = window.innerWidth,
            viewportheight = window.innerHeight
        }
        else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0)// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
        {
            viewportwidth = document.documentElement.clientWidth,
            viewportheight = document.documentElement.clientHeight
        }
        else// older versions of IE
        {
            viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
            viewportheight = document.getElementsByTagName('body')[0].clientHeight
        }

        var esquerda = (viewportwidth - 450) / 2;
        var topo = viewportheight / 2;
        //var esquerda = (window.screen.width - 410) / 2;
        //var topo = (window.screen.height - 329) / 2;
        this.xMoveTo(box, esquerda, topo + this.xScrollTop());
        //this.xMoveTo('divOpacity', 0, this.xScrollTop());
    },

    xDef: function()
    {
        for (var i = 0; i < arguments.length; ++i)
        {
            if (typeof (arguments[i]) == 'undefined')
                return false;
        }
        return true;
    },

    xGetElementById: function(e)
    {
        if (typeof (e) == 'string')
        {
            if (document.getElementById)
                e = document.getElementById(e);
            else if (document.all)
                e = document.all[e];
            else
                e = null;
        }
        return e;
    },

    xLeft: function(e, iX)
    {
        if (!(e = lightbox.xGetElementById(e)))
            return 0;

        var css = this.xDef(e.style);

        if (css && this.xStr(e.style.left))
        {
            if (this.xNum(iX))
                e.style.left = iX + 'px';
            else
            {
                iX = parseInt(e.style.left);

                if (isNaN(iX))
                    iX = 0;
            }
        }
        else if (css && this.xDef(e.style.pixelLeft))
        {
            if (this.xNum(iX))
                e.style.pixelLeft = iX;
            else
                iX = e.style.pixelLeft;
        }

        return iX;
    },

    xMoveTo: function(e, x, y)
    {
        this.xLeft(e, x);
        this.xTop(e, y);
    },

    xNum: function()
    {
        for (var i = 0; i < arguments.length; ++i)
        {
            if (isNaN(arguments[i]) || typeof (arguments[i]) != 'number')
                return false;
        }

        return true;
    },

    xScrollTop: function(e, bWin)
    {
        var offset = 0;
        if (!this.xDef(e) || bWin || e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body')
        {
            var w = window;
            if (bWin && e)
                w = e;

            if (w.document.documentElement && w.document.documentElement.scrollTop)
                offset = w.document.documentElement.scrollTop;
            else if (w.document.body && this.xDef(w.document.body.scrollTop))
                offset = w.document.body.scrollTop;
        }
        else
        {
            e = this.xGetElementById(e);

            if (e && this.xNum(e.scrollTop))
                offset = e.scrollTop;
        }

        return offset;
    },

    xStr: function(s)
    {
        for (var i = 0; i < arguments.length; ++i)
        {
            if (typeof (arguments[i]) != 'string')
                return false;
        }
        return true;
    },

    xTop: function(e, iY)
    {
        if (!(e = this.xGetElementById(e)))
            return 0;

        var css = this.xDef(e.style);

        if (css && this.xStr(e.style.top))
        {
            if (this.xNum(iY))
                e.style.top = iY + 'px';
            else
            {
                iY = parseInt(e.style.top);

                if (isNaN(iY))
                    iY = 0;
            }
        }
        else if (css && xDef(e.style.pixelTop))
        {
            if (this.xNum(iY))
                e.style.pixelTop = iY;
            else
                iY = e.style.pixelTop;
        }

        return iY;
    },

    contentBox: '',
    divBox: '',
    msgBox: '',
    position: '',
    divOpacity: '',

    abrirJanela: function(box, msgBox, msg, fadeColor, position, callback)
    {
        ///////////////////////////////////////////////////////////////////////////
        if (window.opera)
        {
            var i = this.xUA.indexOf('opera');
            if (i != -1)
            {
                var v = parseInt(this.xUA.charAt(i + 6));
                this.xOp7Up = v >= 7;
                this.xOp6Dn = v < 7;
            }
        }
        else if (navigator.vendor != 'KDE' && document.all && this.xUA.indexOf('msie') != -1)
        {
            this.xIE4Up = parseFloat(navigator.appVersion) >= 4;
            this.xIE4 = this.xUA.indexOf('msie 4') != -1;
            this.xIE5 = this.xUA.indexOf('msie 5') != -1;
        }
        else if (document.layers)
        {
            this.xNN4 = true;
        }
        ////////////////////////////////////////////////////////////////////////////

        this.position = position;
        if (id('opacity'))
        {
            this.fechar();
        }

        var objBody = document.getElementsByTagName("body").item(0);
        if (fadeColor == undefined)
        {
            fadeColor = "000000";
        }
        document.onkeyup = funcoesGerais.KeyCheck;
        window.onresize = function()
        {
            lightbox.rePosiciona(box);

            window.onscroll();
        }
        window.onscroll = function()
        {
            lightbox.moverJanela(box);
        }

        this.divOpacity = document.createElement("a");
        this.divOpacity.setAttribute('id', 'opacity');
        this.divOpacity.setAttribute('href', 'javascript:lightbox.fechar();');
        this.divOpacity.style.cursor = "default";
        this.divOpacity.style.position = "absolute";
        this.divOpacity.style.zIndex = 888;
        this.divOpacity.style.top = "0px";
        this.divOpacity.style.left = "0px";
        this.divOpacity.style.lineHeight = "0px";
        this.divOpacity.style.background = "#" + fadeColor;
        this.divOpacity.style.width = funcoesGerais.getPageSize().pw + "px";
        this.divOpacity.style.height = funcoesGerais.getPageSize().ph + "px";
        funcoesGerais.trocaOpacity(0, 'opacity');
        //objBody.appendChild(this.divOpacity); //02-10-2009 Pediram pra remover a CORTINA
        RemoveClassName($Get('lnkLogoCoelho'), "zi999");
        funcoesGerais.apagaCombos();
        funcoesGerais.reexibeCombos(box);

        this.divBox = id(box);
        //this.divBox.style.filter = 'alpha(opacity=0)';
        //this.divBox.style.opacity = '0';
        this.divBox.style.display = '';
        this.divBox.style.position = "absolute";
        this.divBox.style.zIndex = 999;
        this.divBox.callback = callback;

        if (msg !== null && msgBox !== null)
        {
            this.msgBox = id(msgBox);
            this.msgBox.innerHTML = msg;
        }

        if (this.position != undefined)
        {
            this.divBox.style.top = id(position).offsetTop + this.divBox.offsetTop + "px";
            this.divBox.style.left = id(position).offsetLeft + this.divBox.offsetLeft + "px";
        }
        else
        {
            this.divBox.style.top = funcoesGerais.getPageSize().sh + (funcoesGerais.getPageSize().wh - this.divBox.offsetHeight) / 2 + "px";
            this.divBox.style.left = funcoesGerais.getPageSize().sw + (funcoesGerais.getPageSize().ww - this.divBox.offsetWidth) / 2 + "px";
        }

        funcoesGerais.fadeOpacity('opacity', 0, 70, 1000, 20);
        //funcoesGerais.fadeOpacity(box, 0, 100, 1000, 20);

        lightbox.rePosiciona(box);
        lightbox.moverJanela(box);
    },

    abrir: function(box, fadeColor, position, callback)
    {
        ///////////////////////////////////////////////////////////////////////////
        if (window.opera)
        {
            var i = this.xUA.indexOf('opera');
            if (i != -1)
            {
                var v = parseInt(this.xUA.charAt(i + 6));
                this.xOp7Up = v >= 7;
                this.xOp6Dn = v < 7;
            }
        }
        else if (navigator.vendor != 'KDE' && document.all && this.xUA.indexOf('msie') != -1)
        {
            this.xIE4Up = parseFloat(navigator.appVersion) >= 4;
            this.xIE4 = this.xUA.indexOf('msie 4') != -1;
            this.xIE5 = this.xUA.indexOf('msie 5') != -1;
        }
        else if (document.layers)
        {
            this.xNN4 = true;
        }
        ////////////////////////////////////////////////////////////////////////////

        this.position = position;
        if (id('opacity'))
        {
            this.fechar();
        }

        var objBody = document.getElementsByTagName("body").item(0);
        if (fadeColor == undefined)
        {
            fadeColor = "000000";
        }
        document.onkeyup = funcoesGerais.KeyCheck;
        window.onresize = function()
        {
            lightbox.rePosiciona(box);

            window.onscroll();
        }
        window.onscroll = function()
        {
            lightbox.moverJanela(box);
        }

        this.divOpacity = document.createElement("a");
        this.divOpacity.setAttribute('id', 'opacity');
        this.divOpacity.setAttribute('href', 'javascript:lightbox.fechar();');
        this.divOpacity.style.cursor = "default";
        this.divOpacity.style.position = "absolute";
        this.divOpacity.style.zIndex = 888;
        this.divOpacity.style.top = "0px";
        this.divOpacity.style.left = "0px";
        this.divOpacity.style.lineHeight = "0px";
        this.divOpacity.style.background = "#" + fadeColor;
        this.divOpacity.style.width = funcoesGerais.getPageSize().pw + "px";
        this.divOpacity.style.height = funcoesGerais.getPageSize().ph + "px";
        funcoesGerais.trocaOpacity(0, 'opacity');
        //objBody.appendChild(this.divOpacity); //02-10-2009 Pediram pra remover a cortina
        RemoveClassName($Get('lnkLogoCoelho'), "zi999");
        funcoesGerais.apagaCombos();
        funcoesGerais.reexibeCombos(box);

        this.divBox = id(box);
        //this.divBox.style.filter = 'alpha(opacity=0)';
        //this.divBox.style.opacity = '0';
        this.divBox.style.display = '';
        this.divBox.style.position = "absolute";
        this.divBox.style.zIndex = 999;
        this.divBox.callback = callback;

        if (this.position != undefined)
        {
            this.divBox.style.top = id(position).offsetTop + this.divBox.offsetTop + "px";
            this.divBox.style.left = id(position).offsetLeft + this.divBox.offsetLeft + "px";
        }
        else
        {
            this.divBox.style.top = funcoesGerais.getPageSize().sh + (funcoesGerais.getPageSize().wh - this.divBox.offsetHeight) / 2 + "px";
            this.divBox.style.left = funcoesGerais.getPageSize().sw + (funcoesGerais.getPageSize().ww - this.divBox.offsetWidth) / 2 + "px";
        }

        funcoesGerais.fadeOpacity('opacity', 0, 70, 1000, 20);
        //funcoesGerais.fadeOpacity(box, 0, 100, 1000, 20);

        lightbox.rePosiciona(box);
        lightbox.moverJanela(box);
    },

    fechar: function(resposta)
    {
        var objBody = document.getElementsByTagName("body").item(0);
        if (id('opacity'))
        {
            funcoesGerais.removeElement('opacity');
        }
        if (this.position = !undefined)
        {
            this.divBox.style.top = '';
            this.divBox.style.left = '';
        }
        AddClassName($Get('lnkLogoCoelho'), "zi999");
        funcoesGerais.reexibeCombos();
        this.divBox.style.display = 'none';

        document.onkeyup = '';
        window.onresize = '';
        window.onscroll = '';

        if (this.divBox.callback)
            this.divBox.callback(resposta);
    },

    rePosiciona: function(obj)
    {
        funcoesGerais.centralizaObj(obj);
        this.divOpacity.style.width = funcoesGerais.getPageSize().pw + "px";
        this.divOpacity.style.height = funcoesGerais.getPageSize().ph + "px";
    }
}
/*
CSS Browser Selector v0.3.3 (Sep 09, 2009)
Rafael Lima (http://rafael.adm.br)
http://rafael.adm.br/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Contributors: http://rafael.adm.br/css_browser_selector#contributors

Available OS Codes [os]:
	* win - Microsoft Windows
	* linux - Linux (x11 and linux)
	* mac - Mac OS
	* freebsd - FreeBSD
	* ipod - iPod Touch
	* iphone - iPhone
	* webtv - WebTV
	* mobile - J2ME Devices (ex: Opera mini)

Available Browser Codes [browser]:
	* ie - Internet Explorer (All versions)
	* ie8 - Internet Explorer 8.x
	* ie7 - Internet Explorer 7.x
	* ie6 - Internet Explorer 6.x
	* ie5 - Internet Explorer 5.x
	* gecko - Mozilla, Firefox (all versions), Camino
	* ff2 - Firefox 2
	* ff3 - Firefox 3
	* ff3_5 - Firefox 3.5
	* opera - Opera (All versions)
	* opera8 - Opera 8.x
	* opera9 - Opera 9.x
	* opera10 - Opera 10.x
	* konqueror - Konqueror
	* webkit or safari - Safari, NetNewsWire, OmniWeb, Shiira, Google Chrome
	* safari3 - Safari 3.x
	* chrome - Google Chrome
	* iron - SRWare Iron
*/
function css_browser_selector(u){var ua = u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1;},g='gecko',w='webkit',s='safari',h=document.getElementsByTagName('html')[0],b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3')?g+' ff3':is('gecko/')?g:/opera(\s|\/)(\d+)/.test(ua)?'opera opera'+RegExp.$2:is('konqueror')?'konqueror':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);