// JavaScript Document
<!--
var LastSelected=0;
var UseSmallBGs=0;
//*************************************************************************************************
function png(){ if(navigator.appName.indexOf("Microsoft Internet Explorer")!=-1)supersleight.init(); }
//*************************************************************************************************
var supersleight=function(){
	
	var root=false;
	var applyPositioning=true;
	var shim='./img/x.gif';
	var shim_pattern=/\.\/img\/x\.gif$/i;
	var fnLoadPngs=function(){
		if(root){
			root=document.getElementById(root);
		}else{ root=document; }
		for(var i=root.all.length-1,obj=null;(obj=root.all[i]);i--){
			if(obj.currentStyle.backgroundImage.match(/\.png/i)!==null){bg_fnFixPng(obj);}
			if(obj.tagName=='IMG' && obj.src.match(/\.png$/i)!==null){el_fnFixPng(obj);}
			if(applyPositioning && (obj.tagName=='A' || obj.tagName=='INPUT') && obj.style.position==='')
			 {obj.style.position = 'relative';}
		}
	};
	var bg_fnFixPng=function(obj){
		var mode='scale';
		var bg=obj.currentStyle.backgroundImage;
		var src=bg.substring(5,bg.length-2);
		if(obj.currentStyle.backgroundRepeat == 'no-repeat'){mode='crop';}
		obj.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='"+mode+"')";
		obj.style.backgroundImage='url('+shim+')';
	};
	var el_fnFixPng=function(img){
		var src=img.src;
		img.style.width=img.width+"px";
		img.style.height=img.height+"px";
		img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='scale')";
		img.src=shim;
	};
	return {
		init: function() { fnLoadPngs()},
		limitTo: function(el) { root = el;},
		run: function() { fnLoadPngs();}
	};
}();
//*************************************************************************************************
function findObj(n,d)
 {//v4.01
  var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
//*************************************************************************************************
//('e1','contact','alfa-group.biz');
function SetEMail(Id,prefix,postfix)
 {
  if((Obj=findObj(Id))!=null)
   Obj.innerHTML='<a href = "'+'mailto:'+prefix+'@'+postfix+'">'+prefix+'@'+postfix+'</a>';
 }
//*************************************************************************************************
function SetBG(Id,Src)
 {
  if((Obj=findObj(Id))!=null)
   {
	Obj.style.backgroundImage="url("+Src+")";
	Obj.style.backgroundRepeat="repeat-x";
   }
 }
//*************************************************************************************************
function Hide()
 {
  for(i=0;i<arguments.length;i++)if((Obj=findObj(arguments[i]))!=null)Obj.style.display='none';
 }
//*************************************************************************************************
function Show()
 {
  for(i=0;i<arguments.length;i++)if((Obj=findObj(arguments[i]))!=null)Obj.style.display='';
 }
//*************************************************************************************************
function ActivateForm(El, DefValue)
 {
  if((Obj=findObj(El))!=null)
   {
	Obj.style.color='#000000';
	if(Obj.value==DefValue)Obj.value='';
   }
 }
//*************************************************************************************************
function BlurForm(El,DefValue)
 {
  if((Obj=findObj(El))!=null)
   {
	if(Obj.value=='')
	 {
	  Obj.style.color='#666666';
	  Obj.value = DefValue;
	 }
  }
 }
//*************************************************************************************************
function GoTo(URL) { document.location=URL; }
//*************************************************************************************************
function getElementPosition(elemId)
 {
  var elem=findObj(elemId);
  var w=elem.offsetWidth;
  var h=elem.offsetHeight;
  var l=0;
  var t=0;
  while(elem)
   {
	l+=elem.offsetLeft;
	t+=elem.offsetTop;
	elem=elem.offsetParent;
   }
  return {"left":l,"top":t,"width":w,"height":h};
 }
//*************************************************************************************************
function popUpWindow(URLStr,left,top,width,height)
 {
  var prevwin=window.open(URLStr,'popUpWin','toolbars=no,scrollbars=no,width=700,height=500');
 }
//*************************************************************************************************
function EnLight(Id)
 {
  if(UseSmallBGs==0)SetBG(Id,"./img/bg_menu_big_selected.jpg")
  else SetBG(Id,"./img/bg_menu_selected.jpg");
 }
//*************************************************************************************************
function DeLight(Id)
 {
  if(UseSmallBGs==0)SetBG(Id,"./img/bg_menu_big.jpg")
  else SetBG(Id,"./img/bg_menu.jpg");
 }
//*************************************************************************************************
function SetSubMenuPosition(N)
 {
  pos=getElementPosition('Btn'+N);
  if((Obj2=findObj('Sub'+N))!=null)
   {
	Obj2.style.top=pos.top+pos.height;
	Obj2.style.left=pos.left+10;
   }
 }
//*************************************************************************************************
function SelectMenu(N)
 {
  DeLight('Btn'+LastSelected);
  Hide('Sub'+LastSelected);
  EnLight('Btn'+N);
  LastSelected=N;
  SetSubMenuPosition(N);
  Show('Sub'+N);
 }
//-->