﻿function MSOLayout_GetRealOffset(StartingObject, OffsetType, EndParent) { var realValue=0;
if (!EndParent) EndParent=document.body; for (var currentObject=StartingObject;
currentObject && currentObject !=EndParent && currentObject != document.body; currentObject=currentObject.offsetParent)
{ var offset = eval('currentObject.offset'+OffsetType); if (offset) realValue+=offset;
} return realValue; }


function handleSearchBox()
{				//searchbox textbox
				var searchBox = $('#SRSB input:text');
				if(searchBox == null)
					return;
				//searchBox_text is declared in masterpage, gets resource string.				
				searchBox[0].defaultValue= searchBox_text;
				
				//if its a first time or text is blank, set default text
				if(searchBox[0].value == '')
			    {
			    	searchBox[0].value= searchBox_text;
				}
				
				//if text is standart_text(Search:) - clear it on focus, else - select
				searchBox.focus(function(){if(searchBox[0].value == searchBox_text) searchBox[0].value = ''; else searchBox.select();});
				
				//set default text on lost focus if a text is empty.
				searchBox.blur(function(){if(searchBox[0].value.trim() == ''){searchBox[0].value= searchBox_text;}});
}
function master_onload()
{
handleSearchBox();

}
function print()
{
	        window.open("/print/print.html",null,"height=400,width=500,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");
	        }

var Calendar = {
            Init: function ()
            {
                $(".Calendar td:has(a.Event)").hover(Calendar.ShowEvents,Calendar.HideEvents);
                //$(".Calendar td ul:first").show();
            },

            ShowEvents: function (e)
            {
                $(this).find("ul").show();
            },

            HideEvents: function (e)
            {
                $(this).find("ul").hide();
            }
        };
