function applyStyleFromLocation(){
	var params = extractUrlParams(window.location.toString());
	applyStyle(params['page']);
}

function applyStyle(p_styleCode) {
	var bodyElt = document.getElementsByTagName('body')[0];
	bodyElt.className=p_styleCode;
}

function extractUrlParams(url) {
  var regexp=new RegExp("[?&]");
  var tab=url.split(regexp);
  tabparam=new Array;
  for (var i=1;i<tab.length;i++){
    tabparam[tab[i].substring(0,tab[i].indexOf("="))]=tab[i].substring(tab[i].indexOf("=")+1)
  }
  return tabparam;
}

/* ------------------------------------------------------------------ */
/*
function body_onresize(){
	var body = document.getElementsByTagName('body')[0];
	if(getWindowSize('y')>550){body.style.overflow='hidden'}	
	else{body.style.overflow='visible'}
}

function getWindowSize(p_side) {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  var side = p_side.toLowerCase();
  if(side=='x' || side=='w')return myWidth;
  if(side=='y' || side=='h')return myHeight;
}
*/

