function ge(n){
	return document.getElementById(n);
}
try{
	document.execCommand("BackgroundImageCache",false,true);
}
catch(e){};

window.documentChanged = function(){
	window.onbeforeunload = function(){
		return "The changes you made were not saved";
	};
	return true;
};

function buildFlash(swfLocation,x,y,swfMode, variaveis){
	var swfLocation, x, y, swfMode, variaveis;
	if(variaveis == undefined || variaveis.length < 1) variaveis = '';
	document.write(' <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+x+'" height="'+y+'">');
	document.write(' <param name="movie" value="'+swfLocation+'.swf'+variaveis+'" />');
	document.write(' <param name="quality" value="best" />');
	document.write(' <param name="wmode" value="'+swfMode+'" />');
	document.write(' <embed src="'+swfLocation+'.swf'+variaveis+'" wmode="'+swfMode+'" quality="best" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+x+'" height="'+y+'"></embed>');
	document.write(' </object>');
}

function flashObj(id, last){
	var a, o;
	if(id)
		(o = document.getElementById(id)) && (a = o.outerHTML) && (o.outerHTML = a);
	else if(last)
		(o = document.getElementsByTagName("object")) && (a = (o = o[o.length - 1]).outerHTML) && (o.outerHTML = a);
	else
		for(var i = (o = document.getElementsByTagName("object")).length; i--;)
			(a = o[i].outerHTML) && (o[i].outerHTML = a);
}
function simpleShowHide(o) {
	var obj = document.getElementById(o), d = obj.style.display;
	obj.style.display = d == "none" || !d ? "block" : "none";
}

function getStyle(o, p, ie){
	p = ie ? p.replace(/\-(\w)/g, function(a, l){return l.toUpperCase()}) : p;
	var v = o.currentStyle ? o.currentStyle[p] : window.getComputedStyle ? document.defaultView.getComputedStyle(o, null).getPropertyValue(p) : null;
	return parseInt(v, 10);
};

function findAncestor(o, tag){
	for(tag = tag.toLowerCase(); o = o.parentNode;)
		if(o.tagName && o.tagName.toLowerCase() == tag)
			return o;
	return null;
}

function findNext(o, tag){
	for(tag = tag.toLowerCase(); o = o.nextSibling;)
		if(o.tagName && o.tagName.toLowerCase() == tag)
			return o;
	return null;
}
function findPrevious(o, tag){
	for(tag = tag.toLowerCase(); o = o.previousSibling;)
		if(o.tagName && o.tagName.toLowerCase() == tag)
			return o;
	return null;
}
function getElementsByClassName(name, parent){
	for(var o = [], n = new RegExp("\\b" + name.replace(/([(){}|*+?.,^$\[\]\\])/g, "\\\$1") + "\\b"), l = (parent || document).getElementsByTagName("*"), i = l.length; i--;)
		n.test(l[i].className) && (o[o.length] = l[i]);
	return o;
}

shuffle = function(v){
    for(var j, x, i = v.length; i; j = parseInt(Math.random() * i), x = v[--i], v[i] = v[j], v[j] = x);
    return v;
};

function showLightBox(id, className){
	var o = ge(id);
	o.style.display = "block";

	if(!window.BOX){
		BOX = new LightBox();

		addEvent(document, "keydown", function(e){
			if(BOX.locked && e.key == 27) {
				o.style.display = "none";
				hideLightBox();
			}
		});

	}
	if(BOX.locked)
		return;

	BOX.setClassName(className ? className : "LightBox");
	BOX.setTopMost();
	var original = o.parentNode, node;
	original.style.display = "block";
	node = BOX.box.appendChild(o);
	hideLightBox = function(){
		o.style.display = "none";
		original.appendChild(node);
		BOX.hide();
	}
	BOX.show();
}

function hideLightBox(){
	if(window.BOX){
		BOX.hide();
	}
}

var pageTracker = null;
function pageView(){
	try {
		if(pageTracker == null)
			pageTracker = _gat._getTracker("UA-270675-17");
		pageTracker._trackPageview();
	} catch(err) {}
}