﻿
function ajaxSearch(searchString, url, siteID)
{
    SearchService.Search(searchString, url, siteID, OnAjaxSearchComplete, OnAjaxSearchError, OnAjaxSearchTimeout);
}

function OnAjaxSearchComplete(args)
{
    window.location.href = window.location.href;
}

function OnAjaxSearchError(args)
{
    
}

function OnAjaxSearchTimeout(args)
{
    
}

function SetTextBox(id, s)
{
    document.getElementById(id).value = s;
    HideTreeView();
}	

function ToggleTreeView()
{
    if (document.getElementById("bzmTreeDiv").style.visibility == "visible")
        HideTreeView();      
    else      
        ShowTreeView();      
}

function ShowTreeView()
{
    document.getElementById("bzmTreeDiv").style.visibility = "visible";
}

function HideTreeView()
{
    document.getElementById("bzmTreeDiv").style.visibility = "hidden";
}

function changeDate()
{
    $get('ctl00_MainContentPlaceHolder_te2').value = $get('ctl00_MainContentPlaceHolder_txtDateDummy').value;
}

function printPage(pId) {
    window.open("print.aspx?pageId=" + pId,"","scrollbars=1,width=620, height=600");
}

function printPageLinks(pId) {
    window.open("printLinks.aspx?pageId=" + pId,"","scrollbars=1,width=620, height=600");
}