
function getObj(name)
{
  if (document.getElementById)
  {
    this.obj = document.getElementById(name);
    if (this.obj != null)
    this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
    this.obj = document.all[name];
    if (this.obj != null)
    this.style = document.all[name].style;
  }
  else if (document.layers)
  {
    this.obj = document.layers[name];
   if (this.obj != null)
    this.style = document.layers[name];
  }
}

function getObj2(name, doc)
{
  if (doc.getElementById)
  {
    this.obj = doc.getElementById(name);
    if (this.obj != null)
    this.style = doc.getElementById(name).style;
  }
  else if (doc.all)
  {
    this.obj = doc.all[name];
    if (this.obj != null)
    this.style = doc.all[name].style;
  }
  else if (doc.layers)
  {
    this.obj = doc.layers[name];
   if (this.obj != null)
    this.style = doc.layers[name];
  }
}
////////////////////////////////////
//simulation of modal dialog box.
var winModalWindow;
 
function IgnoreEvents(e)
{
  return false;
}
 
function ShowWindow(src, parms, width, height)
{
  if (window.showModalDialog)
  {
    window.showModalDialog(src,parms, "dialogWidth:" + width + "dialogHeight:" + height);
  }
  else
  {
    window.top.captureEvents (Event.CLICK|Event.FOCUS);
    window.top.onclick=IgnoreEvents;
    window.top.onfocus=HandleFocus ;
    winModalWindow = window.open (src,parms,"dependent=yes,width=" + width + ",height=" + height);
    winModalWindow.focus();
  }
}

 
function HandleFocus()
{
  if (winModalWindow)
  {
    if (!winModalWindow.closed)
    {
      winModalWindow.focus();
    }
    else
    {
      window.top.releaseEvents (Event.CLICK|Event.FOCUS);
      window.top.onclick = "";
    }
  }
  return false;
}

function getBodySize(){
		
		if (self.innerHeight) // all except Explorer
		{
			this.x = self.innerWidth;
			this.y = self.innerHeight;
			//alert('self' + this.x);
		}
		else if (document.documentElement && document.documentElement.clientHeight)
			// Explorer 6 Strict Mode
		{
			this.x = document.documentElement.clientWidth;
			this.y = document.documentElement.clientHeight;
			//alert('ie6');
		}
		else if (document.body) // other Explorers
		{
			this.x = document.body.clientWidth;
			this.y = document.body.clientHeight;
			//alert('body');
		}
		else{
			this.x = 750;
			this.y = 500;
			//alert('not found');
		}
}

function getWindowSize(){
		
		
		if (self.innerHeight) // all except Explorer
		{
			this.x = self.innerWidth;
			this.y = self.innerHeight;
		}
		else if (document.documentElement && document.documentElement.clientHeight)
			// Explorer 6 Strict Mode
		{
			this.x = document.documentElement.clientWidth;
			this.y = document.documentElement.clientHeight;
		}
		else if (document.body) // other Explorers
		{
			this.x = document.body.clientWidth;
			this.y = document.body.clientHeight;
		}
		else{
			this.x = 750;
			this.y = 500;
			
		}
		
	 
}


