function getScrollY() {
	return (document.documentElement.scrollTop ? 
	document.documentElement.scrollTop : 
	document.body.scrollTop);
}

function getScrollX() {
	return (document.documentElement.scrollLeft ? 
	document.documentElement.scrollLeft : 
	document.body.scrollLeft);
}

function getVisiblePageSize(){
	var dim=new Object();

	if (self.innerHeight) {		// all except Explorer
		dim.width = self.innerWidth;
		dim.height = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight) {	
		// Explorer 6 Strict Mode
		dim.width = document.documentElement.clientWidth;
		dim.height = document.documentElement.clientHeight;
	}
	else if (document.body) { // other Explorers
		dim.width = document.body.clientWidth;
		dim.height = document.body.clientHeight;
	}
	return dim;
}

this.eventbanner = function() {	var temp;
	$("a.evebanner").mouseover(function() { temp = this.id;
		$("#img"+temp).css('opacity','0.7'); });	
	$("a.evebanner").mouseout(function() { 									$("#img"+temp).css('opacity','1.0'); });
};

var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
var topMargin = (location.href.indexOf("/english/") > -1 ? 280 : 400);

/*********************************************************
 * You may use this code for free on any web page provided that 
 * these comment lines and the following credit remain in the code.
 * Floating Div from http://www.javascript-fx.com
 ********************************************************/ 

function JSFX_FloatDiv(id, sx, sy, lColH, rColH)
{
	var el = d.getElementById ? d.getElementById(id) : d.all ? d.all[id] : d.layers[id];
	var px = document.layers ? "" : "px";
	window[id + "_obj"] = el;
	if(d.layers) el.style = el;
	el.cx = el.sx = sx; el.cy = el.sy = sy;
	el.sP = function(x, y) {
		this.style.position = "absolute";
		this.style.top = ( y > topMargin ? y : topMargin ) + px; 
		//this.style.left = x + px;
	};

	el.floatIt = function()
	{
		var pX, pY;
		pX = (this.sx >= 0) ? 0 : ns ? innerWidth : 
		document.documentElement && document.documentElement.clientWidth ? 
		document.documentElement.clientWidth : document.body.clientWidth;
		pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
		document.documentElement.scrollTop : document.body.scrollTop;
		if(this.sy < 0) 
		pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? 
		document.documentElement.clientHeight : document.body.clientHeight;
		this.cx += (pX + this.sx - this.cx)/8;
		this.cy += (pY + this.sy - this.cy)/8;

		if( parseInt(this.cy - topMargin) < parseInt(lColH - rColH) ) 
			this.sP(this.cx, this.cy);
		setTimeout(this.id + "_obj.floatIt()", 20);
	}
	return el;
}

$(document).ready(function(){ eventbanner(); 

var rightColH = $("#scrolltext").height();
var lMargin = 60;
var leftColH = parseInt($("#leftTd").height() - lMargin);

if(leftColH > rightColH && location.href.indexOf('medias.php') == -1 ) {
	JSFX_FloatDiv("scrolltext", 650, 10, parseInt(leftColH + lMargin), rightColH).floatIt();
}
$("#contentrow").css("height", parseInt(rightColH + lMargin));

$("#cmore").click(function() { 
	$("#photogall").show();
	$("#cmore").hide();
});

}); 
