var urlAddress='<xsl:value-of select="/INFORMATION/SITE/SITE_URL"/>';
var pageName='<xsl:value-of select="/INFORMATION/SITE/SITE_TITLE"/>';

function addToFavorites()
{
alert('yaniv');
	if (window.external) // Internet Explorer
	{
		window.external.AddFavorite(urlAddress,pageName);
  	}
  	else
  	{
		if (window.sidebar){ // FireFox
			window.sidebar.addPanel(pageName, urlAddress,"");
		}
   		else{
			alert("Sorry! Your browser doesn't support this function.");
		}
  	}
}


/*
 +-------------------------------------------------------------------+
 |                   J S - T O O L T I P   (v1.5)                    |
 |                                                                   |
 | Copyright Gerd Tentler               www.gerd-tentler.de/tools    |
 | Created: Feb. 15, 2005               Last modified: Mar. 28, 2006 |
 +-------------------------------------------------------------------+
 | This program may be used and hosted free of charge by anyone for  |
 | personal purpose as long as this copyright notice remains intact. |
 |                                                                   |
 | Obtain permission before selling the code for this program or     |
 | hosting this software on a commercial website or redistributing   |
 | this software over the Internet or in any other medium. In all    |
 | cases copyright must remain intact.                               |
 +-------------------------------------------------------------------+

======================================================================================================

 This script was tested with the following systems and browsers:

 - Windows XP: IE 6, NN 4, NN 7, Opera 7, Firefox 1
 - Mac OS X:   IE 5, Safari 1

 If you use another browser or system, this script may not work for you - sorry.

------------------------------------------------------------------------------------------------------

 USAGE:

 Use the toolTip-function with mouse-over and mouse-out events (see example below).

 - To show a tooltip, use this syntax: toolTip(text, width in pixels, opacity in percent)
   Note: width and opacity are optional

 - To hide a tooltip, use this syntax: toolTip()

------------------------------------------------------------------------------------------------------

 EXAMPLE:

 <a href="#" onMouseOver="toolTip('Just a test', 150)" onMouseOut="toolTip()">some text here</a>

======================================================================================================
*/

  var OP = (navigator.userAgent.indexOf('Opera') != -1) ? true : false;
  var IE = (navigator.userAgent.indexOf('MSIE') != -1 && !OP) ? true : false;
  var GK = (navigator.userAgent.indexOf('Gecko') != -1) ? true : false;
  var NN4 = document.layers;
  var DOM = document.getElementById;

  function TOOLTIP() {
//----------------------------------------------------------------------------------------------------
// Configuration
//----------------------------------------------------------------------------------------------------
    this.width = 250;                     // width (pixels)
    this.bgColor = '#FFFFff';             // background color
    this.textColor = '#000000';           // text color
    this.borderColor = '#D00000';         // border color
    this.opacity = 100;                    // opacity (percent) - doesn't work with all browsers
    this.cursorDistanceX = -100;              // distance from cursor (pixels)
    this.cursorDistanceY = 30;              // distance from cursor (pixels)

    // don't change
    this.text = '';
    this.height = 0;
    this.obj = 0;
    this.sobj = 0;
    this.active = false;

// -------------------------------------------------------------------------------------------------------
// Functions
// -------------------------------------------------------------------------------------------------------
    this.create = function() {
      if(!this.sobj) this.init();

      var t = '<table border=0 cellspacing=0 cellpadding=4 width=' + this.width + ' bgcolor=' + this.bgColor + '><tr>' +
              '<td align=center><font color=' + this.textColor + '>' + this.text + '</font></td></tr></table>';

      if(NN4) {
        t = '<table border=0 cellspacing=0 cellpadding=1><tr><td bgcolor=' + this.borderColor + '>' + t + '</td></tr></table>';
        this.sobj.document.write(t);
        this.sobj.document.close();
      }
      else {
        this.sobj.border = '1px solid ' + this.borderColor;
        this.setOpacity();
        if(document.getElementById) document.getElementById('ToolTip').innerHTML = t;
        else document.all.ToolTip.innerHTML = t;
      }
      if(DOM) this.height = this.obj.offsetHeight;
      else if(IE) this.height = this.sobj.pixelHeight;
      else if(NN4) this.height = this.obj.clip.bottom;

      this.show();
    }

    this.init = function() {
      if(DOM) {
        this.obj = document.getElementById('ToolTip');
        this.sobj = this.obj.style;
      }
      else if(IE) {
        this.obj = document.all.ToolTip;
        this.sobj = this.obj.style;
      }
      else if(NN4) {
        this.obj = document.ToolTip;
        this.sobj = this.obj;
      }
    }

    this.show = function() {
      var ext = (document.layers ? '' : 'px');
      var left = mouseX;
      var top = mouseY;

      if(left + this.width + this.cursorDistanceX > winX) left -= this.width + this.cursorDistanceX;
      else left += this.cursorDistanceX;

      if(top + this.height + this.cursorDistanceY - scrTop > winY) top -= this.height;
      else top += this.cursorDistanceY;

      this.sobj.left = left + ext;
      this.sobj.top = top + ext;

      if(!this.active) {
        this.sobj.visibility = 'visible';
        this.active = true;
      }
    }

    this.hide = function() {
      if(this.sobj) this.sobj.visibility = 'hidden';
      this.active = false;
    }

    this.setOpacity = function() {
      this.sobj.filter = 'alpha(opacity=' + this.opacity + ')';
      this.sobj.mozOpacity = '.1';
      if(this.obj.filters) this.obj.filters.alpha.opacity = this.opacity;
      if(!document.all && this.sobj.setProperty) this.sobj.setProperty('-moz-opacity', this.opacity / 100, '');
    }
  }

//----------------------------------------------------------------------------------------------------
// Build layer, get mouse coordinates and window width, create tooltip-object
//----------------------------------------------------------------------------------------------------
  var tooltip = mouseX = mouseY = winX = winY = scrTop = 0;

  if(document.layers) {
    document.write('<layer id="ToolTip" align="left"></layer>');
    document.captureEvents(Event.MOUSEMOVE);
  }
  else document.write('<div align="left" id="ToolTip" style="position:absolute; z-index:69;"></div>');
  document.onmousemove = getMouseXY;

  function getMouseXY(e) {
    if(document.body && document.body.scrollTop >= 0) scrTop = document.body.scrollTop;
    else if(window.pageYOffset >= 0) scrTop = window.pageYOffset;

    if(IE) {
      mouseX = event.clientX + document.body.scrollLeft;
      mouseY = event.clientY + document.body.scrollTop;
    }
    else {
      mouseX = e.pageX;
      mouseY = e.pageY;
    }

    if(mouseX < 0) mouseX = 0;
    if(mouseY < 0) mouseY = 0;

    if(GK || NN4) {
      winX = window.innerWidth - 25;
      winY = window.innerHeight;
    }
    else if(DOM) {
      winX = document.body.offsetWidth - 25;
      winY = document.body.offsetHeight;
    }
    else {
      winX = screen.width - 25;
      winY = screen.height;
    }
    if(tooltip && tooltip.active) tooltip.show();
  }

  function toolTip(text, width, opacity) {
    if(text) {
      tooltip = new TOOLTIP();
      tooltip.text = text;
      if(width) tooltip.width = width;
      if(opacity) tooltip.opacity = opacity;
      tooltip.create();

    }
    else
    {
    
      if(tooltip)
        tooltip.hide();
    }
  }
  
  
  function spacer()
          {
             
              var aDivs = document.getElementsByTagName("div");
              var aHolders = new Array();
              var aReals = new Array();
              
			 
           //this loop inserting to the  new array of aholder and areals 
              for(var i=0; i<aDivs.length; i++)
              {
				  if(aDivs[i].getAttribute("holder") != "")
		              aHolders[aDivs[i].getAttribute("holder")] = aDivs[i];
                
	              if(aDivs[i].getAttribute("real") != "")
	                  aReals[aDivs[i].getAttribute("real")] = aDivs[i];
		            
              }
            
              for(var i=0; i<aHolders.length; i++)
              {
	              if(aHolders[i].offsetHeight > aReals[i].offsetHeight)
		            aReals[i].style.height = aHolders[i].offsetHeight+"px";
		            
		          if(aHolders[i].offsetWidth > aReals[i].offsetWidth)
		            aReals[i].style.width = aHolders[i].offsetWidth+"px";
				
				aHolders[i].style.visibility = 'visible';
	    
              }
            
             
            var curleft = new Array();
            var curtop = new Array();
			var curleftho = new Array();
            var curtopho = new Array();
			
            
            for(var i=0; i<aReals.length; i++)
            {
				curleftho[i]=0;
				curtopho[i]=0;
				curleft[i]=0;
				curtop[i]=0;

               if (aReals[i].offsetParent)
                {
                  curleft[i] = aReals[i].offsetLeft;
                  curtop[i] = aReals[i].offsetTop;
				 
                }	
                
                 while (aReals[i]= aReals[i].offsetParent)
                     {
                        curleft[i] += aReals[i].offsetLeft;
                        curtop[i] += aReals[i].offsetTop;
						 
                     } 	
				if (aHolders[i].offsetParent)
				{
                  curleftho[i] = aHolders[i].offsetLeft;
                  curtopho[i] = aHolders[i].offsetTop;
				  	
				  }
               
			  
				
			 aHolders[i].style.marginTop = curtop[i]-curtopho[i] +"px";
			 aHolders[i].style.marginLeft = curleft[i]-curleftho[i]+ "px";
			  
            }
             
                 
          }
          
          