var st,dw;
var fm,w;

function sendmail() {
	window.location = 'm'+String.fromCharCode(97)+'ilto'+String.fromCharCode(58)+
										'info'+String.fromCharCode(64)+'pasajes-a-dvd'+String.fromCharCode(46)+'com.ar';
}

function collapse(elem) {
	var ele = (document.getElementById(elem)).getElementsByTagName('div')[1];
	var lgs = document.getElementById('logos');
	var btn = document.getElementById(elem+"button");
	var btn_q = document.getElementById('quienesbutton');
	var btn_a = document.getElementById('aboutbutton');
	var btn_s = document.getElementById('serviciosbutton');
	var btn_p = document.getElementById('portfoliobutton');
	var btn_c = document.getElementById('contactbutton');

	if (ele.currentStyle)
		ch = ele.currentStyle.height;
	else
		ch = document.defaultView.getComputedStyle(ele,'').getPropertyValue('height');

	if (ch==='34px' || ch==='44px') {
		if (elem==='portfolio') lgs.style.display = 'block';
		ele.style.height = 'auto';
		ele.style.visibility = 'visible';
		btn.style.backgroundImage = 'url(images/btn_'+elem+'_cl.png)';
	} else {
		if (elem==='portfolio') lgs.style.display = 'none';
		ele.style.height = '34px';
		btn.style.backgroundImage = 'url(images/btn_'+elem+'_op.png)';
	}

	btn_q.style.display = 'none';
	btn_q.style.display = 'block';
	btn_a.style.display = 'none';
	btn_a.style.display = 'block';
	btn_s.style.display = 'none';
	btn_s.style.display = 'block';
	btn_p.style.display = 'none';
	btn_p.style.display = 'block';
	btn_c.style.display = 'none';
	btn_c.style.display = 'block';
}

function mpcheck() {
	if (document.documentElement.scrollTop!=st) {
		st = document.documentElement.scrollTop;
		fm.style.top = (st+167)+'px';
	}
	if (document.width!=dw) {
		dw = document.body.clientWidth;
		fm.style.left = (((dw-504)/2)-w)+'px';
	}
}

function mponload() {

	st = document.documentElement.scrollTop;
	dw = document.body.clientWidth;
	fm = document.getElementById('floatingmenu');

	w = fm.clientWidth+8;

	fm.style.top = (st+155)+'px';
	fm.style.left = (((dw-504)/2)-w)+'px';
	
	fm.style.visibility = 'visible';

	window.setInterval("mpcheck()",20);
}

//******

if (window.attachEvent)
	window.attachEvent("onload",mponload);
else
	onload = mponload;
