function ResizeDiv(which) {
	document.getElementById(which).style.width=(document.body.clientWidth)+"px";
}

function ScrollWindowTo(which) {
	FinalXPos=getElementXpos(document.getElementById(which));
	CurrentXPos=getScrollLeft();
	NewXPos=Math.ceil(CurrentXPos+((FinalXPos-CurrentXPos)*30/100));
	window.scrollTo(NewXPos,0);
	//PlaceLinkToHome();
	if (!(NewXPos>(FinalXPos-5) && NewXPos<(FinalXPos+5))) {
		newTimeOut=setTimeout("ScrollWindowTo('"+which+"')",50);
	}
}

function getElementXpos(el) {
	var x = 0;
	while(el.offsetParent){  
		x += el.offsetLeft;    
		el = el.offsetParent;
	}	return x;
}

function getScrollLeft() {
	if(document.all) return (document.documentElement.scrollLeft) ? document.documentElement.scrollLeft : document.body.scrollLeft;
	else return window.pageXOffset;   
}

function ContactByMail() {
	window.location="mailto:contact@rotemnir.com";
}

function PlaceLinkToHome() {
	document.getElementById("LinkToMenu").style.left=(getScrollLeft()+document.body.clientWidth-50)+"px";
}