// JavaScript Document
function setFloatMenuCSS(){
	if (navigator.appName.indexOf("Microsoft")!=-1){
		if (document.getElementById("floatMenu")){
			floatMenu.style.position = "absolute";
			moveFloatingMenu();
			}
	}
	moveFloatingMenu();
}
function moveFloatingMenu(){
    getScrollXY();
	var winW, winH, wniScrollH
	if ((document.getElementById("floatMenu"))&&(navigator.appName.indexOf("Microsoft")!=-1))
	{
		floatMenu.style.position = "absolute";
		winW = document.documentElement.clientWidth;
		winH = document.documentElement.clientHeight;
       
		  if( typeof( window.pageYOffset ) == 'number' ) {
            //Netscape compliant
            wniScrollH = window.pageYOffset;
          } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
            //DOM compliant
            wniScrollH = document.body.scrollTop;
          } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
            //IE6 standards compliant mode
            wniScrollH = document.documentElement.scrollTop;
          }
          if(typeof( wniScrollH ) == 'undefined'){wniScrollH = 1;}
		floatMenu.style.pixelTop = wniScrollH + winH - 50;
		if (winW < 780)
		{
			floatMenu.style.pixelRight = 10;
		}
		else
		{
			floatMenu.style.pixelRight = ((winW - 780) / 2) + 20;
		}
	}
	else
	{
		winW = window.innerWidth;
		winH = window.innerHeight;

		document.getElementById("floatMenu").style.top = winH - 100 + 'px';
		if (winW < 820)
		{alert("F");
			document.getElementById("floatMenu").style.offsetRight = 100 + 'px';
		}
		else
		{//alert("e");
			document.getElementById("floatMenu").style.right = (((winW - 780) / 2) + 20) + 'px';
		}		
	}
}

function getScrollXY() {
  var scrOfY = 0;//,scrOfX = 0
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    //scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    //scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    //scrOfX = document.documentElement.scrollLeft;
  }
  return [scrOfY];
}