/*****************************************************
	This libary is copyright by HOTWeb GmbH
	---------------------------------------
	contact: info@hotweb.de
*****************************************************/

/******* BrowserIdentification ***********/
var  ns=(document.layers)?1:0;
var  ie=(document.all)?1:0;
var dom=(document.getElementById)?1:0;
/*****************************************/ 

/******* VisualFunctions *****************/
function ShowLayer() {this.css.visibility='visible';}
function HideLayer() {this.css.visibility='hidden' ;}
/*****************************************/

/******* OpacityFunctions ****************/
function FadeInPic() {
	   eval(this.nsLayer+".show()");if (!ie) return;
	   tmp=this.filter.alpha.opacity;
	   tmp+=this.InSpeed;
	   this.filter.alpha.opacity=tmp;
	   if (this.fading) {clearInterval(this.fading);this.fading=0;}
	   if (tmp<100) this.fading=window.setInterval(this.name+'.fadein()',10);
	}
function FadeOutPic() {
	   if (!ie) {eval(this.nsLayer+".hide()");return;}
	   tmp=this.filter.alpha.opacity;
	   tmp-=this.OutSpeed;
	   this.filter.alpha.opacity=tmp;
	   if (this.fading) {clearInterval(this.fading);this.fading=0;}
	   if (tmp>0) this.fading=window.setInterval(this.name+'.fadeout()',10);
}
/*****************************************/

/******* CreateObjectFunctions ***********/
function GetPic(was,was2,nsLayer){
  	this.filter=(ie)?document.all[was].filters:0;
  	this.fading=0;
  	this.fadein=FadeInPic;
	this.fadeout=FadeOutPic;
  	this.InSpeed=10;
  	this.OutSpeed=5;
  	this.name=was2;
	this.nsLayer=nsLayer;
  	return this;
}

function GetCss(was,nest) {
  if (ns) if (nest) this.css=document.layers[nest].document.layers[was]; else this.css=document.layers[was];
  if (ie) this.css=document.all[was].style;
  if (dom) this.css=document.getElementById(was).style;
  	
  	this.show=ShowLayer;
  	this.hide=HideLayer;
  	this.name=was;
  return this;}
/*****************************************/

/**********GetScreenDetails **************/
function GetWidth() {
  if (ns) w=parseInt(innerWidth);
  if (ie) w=document.body.offsetWidth;
  if ((dom)&&(!ie)) w=innerWidth;
return w;
}

function GetHeight() {
  if (ns) return parseInt(innerHeight);
  if (ie) return document.body.offsetHeight;
  if ((dom)&&(!ie)) return innerHeight;
}
/****************************************/

