/* --------------------------------------------------------------------------------- */
function loginLayer( whichLayer ){
        var elem, vis;
        if( document.getElementById )
                elem = document.getElementById( whichLayer );
        else if( document.all )
                elem = document.all[whichLayer];
        else if( document.layers )
                elem = document.layers[whichLayer];

        vis = elem.style;
        if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
                vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
                vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}
/* --------------------------------------------------------------------------------- */
function effectSlideRightIntoView(element) {
  $(element).style.width = '0px';
  $(element).style.overflow = 'hidden';
  $(element).firstChild.style.position = 'relative';
  Element.show(element);
  new Effect.Scale(element, 100,
    Object.extend(arguments[1] || {}, {
      scaleContent: false,
      scaleY: false,
      scaleMode: 'contents',
      scaleFrom: 0,
      afterUpdate: function(effect){}
    })
  );
}
function effectSlideRightOutOfView(element) {
  $(element).style.overflow = 'hidden';
  $(element).firstChild.style.position = 'relative';
  Element.show(element);
  new Effect.Scale(element, 0,
    Object.extend(arguments[1] || {}, {
      scaleContent: false,
      scaleY: false,
      delay: 2,
      afterUpdate: function(effect){},
      afterFinish: function(effect)
        { Element.hide(effect.element); }
    })
  );
}

function effectSlideLeftAndRight(element) {
  element = $(element);
  if(Element.visible(element)) effectSlideRightOutOfView(element);
  else effectSlideRightIntoView(element);
}
/*
function JSONscriptRequest(fullUrl) {
    this.fullUrl = fullUrl; 
    this.noCacheIE = '&noCacheIE=' + (new Date()).getTime();
    this.headLoc = document.getElementsByTagName("head").item(0);
    this.scriptId = 'YJscriptId' + JSONscriptRequest.scriptCounter++;
}

JSONscriptRequest.scriptCounter = 1;

JSONscriptRequest.prototype.buildScriptTag = function () {
    this.scriptObj = document.createElement("script");
    this.scriptObj.setAttribute("type", "text/javascript");
    this.scriptObj.setAttribute("src", this.fullUrl + this.noCacheIE);
    this.scriptObj.setAttribute("id", this.scriptId);
}
 
JSONscriptRequest.prototype.removeScriptTag = function () {
    // Destroy the script tag
    this.headLoc.removeChild(this.scriptObj);  
}

JSONscriptRequest.prototype.addScriptTag = function () {
	this.headLoc.appendChild(this.scriptObj);
}


*/
