



/*

function toTop()

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Description:	This little functions performs a smooth

		scroll from the bottom to the top of the

		page.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -	*/

function load_url()
{

document.frm.action=document.form.elements['activite'].options[document.form.elements['activite'].selectedIndex].value ;
document.frm.submit();

}


var g_USER_AGENT = getAgent();









 var urlAddress = "http://www.solutia-domicile.fr/";

 var pageName = "Solutia : Services � Domicile";

 function addToFavorites(anchor)

 {

 if (window.external)

 {

 window.external.AddFavorite(anchor.getAttribute('href'), anchor.getAttribute('title'));

 }

 }






function JumpNews()

	{

	if (document.dateform.code.value != 0)

		window.location.href='/fr/r_newsdetail.htm?ncode='+document.dateform.code.value;

	}



function JumpCategNews()

	{

	if (document.categnewsform.sel_categ.value != 0)

		window.location.href='actualite.html?g_nccode='+document.categnewsform.sel_categ.value;

	}





// return NN4, NN5(Netscape 6+, Mozilla 1+?), IE4, IE5(IE5+), Unknown

function getAgent(){

  var userAgent = navigator.userAgent;

  var charIndex;

  var majorVersion;



  charIndex = userAgent.indexOf("MSIE");

  if(charIndex){

	majorVersion = userAgent.charAt(charIndex + 4 + 1);

	if(majorVersion > 4){

	  return("IE5");

	}

	else if(majorVersion == 4){

	  return("IE4");

	}

  }



  charIndex = userAgent.indexOf("Mozilla");

  majorVersion = userAgent.charAt(charIndex + 7 + 1);

  if(majorVersion > 4){

	return("NN5");

  }

  else if(majorVersion == 4){

	return("NN4");

  }



  return("Unknown");

}

/* USER_AGENT check end -------------------------------------------------- */



function getWindowYOffset(){

  if(g_USER_AGENT == "IE5" || g_USER_AGENT == "IE4"){

	return document.body.scrollTop;

  }else if(g_USER_AGENT == "NN5" || g_USER_AGENT == "NN4"){

	return window.pageYOffset;

  }else{

	return 0;

  }

}



var waitTimer;

function jumpTo(dstY, srcY, scrollRate, waitMillSec) {

  if(waitTimer){

	clearTimeout(waitTimer);

  }

  if( ! dstY || dstY < 0 ){

	dstY = 0;

  }

  if( ! srcY ){

	srcY = 0 + getWindowYOffset();

  }

  if( ! scrollRate ){

	scrollRate = 5;

  }

  if( ! waitMillSec ){

	waitMillSec = 20;

  }



  srcY += (dstY - getWindowYOffset()) / scrollRate;

  if(srcY < 0){

	srcY = 0;

  }

  posY = Math.floor(srcY);

  window.scrollTo(0, posY);



  if(posY != dstY){

	waitTimer = setTimeout("jumpTo("+ dstY +", "+ srcY +", "+ scrollRate +", "+ waitMillSec +")", waitMillSec);

  }

  else if(posY == dstY){

	clearTimeout(waitTimer);

  }

  else if(posY < 1){

	window.scroll(0, 0);

  }

}



function toTop(){

  jumpTo(0, 0, 7, 14);

}

