

	//Funcao responsavel pelo encaminhamento e accoes dos links dentro do site
	function changeWindow(strurl)
	{
		var success = false;
		var x;
	
		if(parent.main.framewindow)
		{
			if(eval(parent.main.framepath + ".formwindow"))
			{
				if (eval(parent.main.framepath + ".validateForm()"))
				{
					x = eval(parent.main.framepath + ".document.forms[0]");
					success = true;
				}
			}
			else if (eval(parent.main.framepath + ".stayInWindow"))
			{
				var inter = eval(parent.main.framepath + ".inter");
				
				if (inter==true)
				{
					eval(parent.main.framepath + ".EnableForm()");
					x = eval(parent.main.framepath + ".document.forms[0]");
					x.action = strurl + "&intern=1";
					x.method = "post";
					x.submit();
				}
				else
					eval(parent.main.framepath + ".location.href = strurl");
			}
			else
			{
				var inter = eval(parent.main.framepath + ".inter");
				
				if (inter==true)
				{
					eval(parent.main.framepath + ".EnableForm()");
					x = eval(parent.main.framepath + ".document.forms[0]");
					
					if (eval(parent.main.framepath + ".stayInWindow"))
						x.action = strurl + "&intern=1";
					else
						x.action = "submit.asp?strurl=" + strurl + "&intern=1";
						
					x.method = "post";
					x.submit();
				}
				else
					parent.main.location.href = strurl;
			}
		}
		else
		{
			if(parent.main.formwindow)
			{
				if (parent.main.validateForm())
				{
					x = parent.main.document.forms[0];
					success = true;
				}
			}
			else
				parent.main.location.href = strurl;
		}
				
		if (success)
		{
			if (parent.main.framewindow)
			{
				if (eval(parent.main.framepath + ".stayInWindow"))
					x.action = strurl;
				else
					x.action = "submit.asp?strurl=" + strurl;
			}
			else
				x.action = strurl;
				
		/*	if (x.xmlSubmit)
				alert(x.xmlSubmit.value);*/
				
			x.method = "post";
			x.submit();
		}
	}
	
	//Muda a iluminacao dos tabs dos headers
	function changeHighLight()
	{
		var idPage = eval(parent.main.defaultPath + ".windowname");
		var idImage = eval(parent.main.defaultPath + ".windowname");
		
		if (eval(idPage))
		{
			if (eval(parent.main.defaultPath + ".imageName"))
				idImage = eval(parent.main.defaultPath + ".imageName");
		
			eval(idPage +".src='/images/Buttons/tabs/Sep_" + idImage + "(on).gif'");
		}
	}
