//Retorna a altura do objecto em pixeis
function getobjheight(obj){
	if (n){
		return obj.clip.height
	}
	else {
		return obj.clientHeight
	}
}

//Retorna a largura do objecto em pixeis
function getobjwidth(obj){
	if (n){
		return obj.clip.width
	}
	else {
		return obj.clientWidth
	}
}

//Retorna a largura disponível dentro da janela do browser
function getinsidewindowwidth(){
	if (n){
		return window.innerWidth
	}
	else {
		return document.body.clientWidth
	}
}

//Retorna a altura disponível dentro da janela do browser
function getinsidewindowheight(){
	if (n){
		return window.innerHeight
	}
	else {
		return document.body.clientHeight
	}
}

//Coloca um objecto numa determinada posição
function shiftto(obj,x,y){
	if (n){
		obj.moveTo(x,y);
	}
	else {
		obj.pixelLeft = x;
		obj.pixelTop = y;
	}	
}

//Centra o objecto
function coloca(layer,desviox,desvioy){
	if (ie){
		var obj = eval("document.all."+layer+".style");
		var contentobj = eval("document.all."+layer);
	}
	else{
		var obj = eval("document."+layer);
		var contentobj = eval("document."+layer);
	}

	var y = Math.round(desvioy);
	if (n)	{
		var x = Math.round(((getinsidewindowwidth() - 780)/2) + desviox);
	}
	else {
		var x = Math.round(((getinsidewindowwidth() - 780)/2));
	}

	shiftto(obj,x,y);
	return 
}


//Calcula o valor do x
function calcx(){
	if (n)	{
		var x = Math.round(((getinsidewindowwidth() - 780)/2) + desviox);
	}
	else {
		var x = Math.round(((getinsidewindowwidth() - 780)/2));
	}

	return x
}

//Recoloca o objecto
function recoloca(layer,desviox1,desviox2,desvioy1,desvioy2){
	if (ie){
		var obj = eval("document.all."+layer+".style");
		var contentobj = eval("document.all."+layer);
	}
	else{
		var obj = eval("document."+layer);
		var contentobj = eval("document."+layer);
	}

	if (n)	{
		var x = Math.round(((getinsidewindowwidth() - 780)/2) + desviox1);
		var y = Math.round(desvioy1);
	}
	else {
		var x = Math.round(((getinsidewindowwidth() - 780)/2) + desviox2);
		var y = Math.round(desvioy2);
	}

	shiftto(obj,x,y);
	return 
}
