//*** <Script.js> ***
function getE(id,wnd)
{
  if(!wnd) var wnd=window;
  if(!wnd.document) return null;
  return wnd.document.getElementById(id);
}
//***
function rnd(s)
{
  return cfgVEGARnd(s);
}
//***
function Rnd(s)
{
  return cfgVEGARnd(s);
}
//***
function cfgVEGARnd(s)
{
  return new String(s+"rnd="+Math.random()).replace(".","");
}
//***
function cfgVEGAEndEvent(e)
{
  if(!e) return;
  if(top.gvIE)
    {
     e.cancelBubble=true;
     e.returnValue=false;
    }
     else
    {
     e.preventDefault();
     e.stopPropagation();
    }
  return false;
}
//***
function cfgVEGAHideLayer(el)
{
  if(getE(el)) getE(el).style.display="none";
}
/*********************************************************************/
/* String prototype                                                  */
/*********************************************************************/
String.prototype.Trim=function()
{
  return new String(this).replace(/(^ +)|( +$)/g,'');
//  return this.LTrim().RTrim();
}
String.prototype.LTrim=function()
{
  return new String(this).replace(/^(\s)*/,"");
}
String.prototype.RTrim=function()
{
  return new String(this).replace(/(\s)*$/,"");
}
String.prototype.Left=function(len)
{
  return new String(this).substr(0,len);
}
String.prototype.Right=function(len)
{
  return new String(this).substr(this.length-len);
}
String.prototype.Mid=function(start,len)
{
  if(arguments.length < 2) return new String(this).substr(start);
  return new String(this).substr(start,len);
}
String.prototype.Replace=function(s1,s2)
{
  return new String(this).replace(new RegExp(s1,"gi"),s2);
}
String.prototype.Press=function(c)
{
  if(arguments.length == 1) c=" ";
  return new String(this.replace(new RegExp(c+"+","ig"),c));
}
//*** </Script.js> ***