function getBodySize() {
  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;
  }
  return new Array(myWidth,myHeight);
}
sfHover = function (){};
function addOnload(onloadFunc) 
    {
    if(typeof(onloadFunc)=="function")
        {
        if(this.addEventListener) 
            this.addEventListener("load", onloadFunc, false);
        else if(this.attachEvent) 
            this.attachEvent("onload", onloadFunc);
        else 
            {
            var onloadOld = this.onload;
            this.onload = function() {onloadOld(); onloadFunc(); }
            }
        }
    }
function init(){
    sfHover();
}
keyFrame = 0;
keyFrameBack = 0;
movingObjLeft = new Array(1);
movingObjTop = new Array(1);
movingObjLeftBack = new Array(1);
movingObjTopBack = new Array(1);
movingObjLeft[0] = new Array(-175,-160,-140,-120,-100,-80,-60,-40,-20,0);
movingObjTop[0] = new Array(0,0,0,0,0,0,0,0,0,0);
movingObjLeftBack[0] = new Array(0,-20,-40,-60,-80,-100,-120,-140,-160,-175);
movingObjTopBack[0] = new  Array(0,0,0,0,0,0,0,0,0,0);
function startSlide() 
{
     setTimeout("slideTheObject()", 50);
keyFrameBack = 0;
}

function startSlideBack() 
{
     setTimeout("slideTheObjectBack()",50)
keyFrame = 0;
}
function slideTheObject()  
{
     var whichOne;
     whichOne = document.getElementById("menu").style;
      whichOne.left = movingObjLeft[0][keyFrame]+"px";
      whichOne.top = movingObjTop[0][keyFrame]+"px";
     keyFrame++;
    if  (keyFrame < movingObjLeft[0].length && keyFrame < movingObjTop[0].length) 
         setTimeout("slideTheObject()",50);
}
function slideTheObjectBack()  
{
     var whichOne;
     whichOne = document.getElementById("menu").style;
     whichOne.left = movingObjLeftBack[0][keyFrameBack]+"px";
     whichOne.top = movingObjTopBack[0][keyFrameBack]+"px";
     keyFrameBack++
     if  (keyFrameBack < movingObjLeftBack[0].length && keyFrameBack < movingObjTopBack[0].length) 
          setTimeout("slideTheObjectBack()",50);
}
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
var steps = new Array(160,140,120,100,80,60,40,33,0);
function openEffect(stepID){
    var step=(typeof(stepID)=="undefined")?0:stepID;
    document.getElementById("float_menu_wrapper").style.left=steps[step]+"px";
    step++;
    if(step < steps.length ){
        setTimeout(function(){openEffect(step)},50);
    }
}
function closeEffect(stepID){
    var step=(typeof(stepID)=="undefined")?(steps.length-1):stepID;
    document.getElementById("float_menu_wrapper").style.left=steps[step]+"px";
    step--;
    if(step >= 0){
        setTimeout(function(){closeEffect(step)},50);
    }
}
var state=false;
function toggleMenu(obj){
try{
    if(state){
        obj.className="openClose open";
        closeEffect();
    } else {
        obj.className="openClose close";
        openEffect();
    }
    state=!state;
    }catch(e){alert(e);}
}
 

function getParameter ( queryString, parameterName ) {
   // Add "=" to the parameter name (i.e. parameterName=value)
   parameterName = parameterName + "=";
   if ( queryString.length > 0 ) {
      // Find the beginning of the string
      begin = queryString.indexOf ( parameterName );
      // If the parameter name is not found, skip it, otherwise return the value
      if ( begin != -1 ) {
         // Add the length (integer) to the beginning
         begin += parameterName.length;
         // Multiple parameters are separated by the "&" sign
         end = queryString.indexOf ( "&" , begin );
      if ( end == -1 ) {
         end = queryString.length
      }
      // Return the string
      return unescape ( queryString.substring ( begin, end ) );
   }
   // Return "null" if no parameter has been found
   return "null";
   }
}

function doSubmitFile(fileid)
{
    document.getElementById('fileid').value = fileid;
    document.form.submit();
}function openPreview(pageGuid)    
{ 
    window.open( '/CMS/ioRD.asp?Action=Preview&Pageguid=' + pageGuid, 'Preview', 'top=20, left=20, width=850, height=598, scrollbars=yes, resizable=yes' );
}