function mShow(){
	/*The following line is needed to re-assign the object variable for IE 5.5/6
	when the function is called because of swapping an IMG with a SPAN and AlphaImageLoader 
	for PNG transparency. Firefox and IE 7+ already support PNG transparency.*/
	oTbP=document.getElementById("TaskBarPart");
	if(window.gHide){clearInterval(gHide);}
	tCntr=gGr-1;
	gShow=setInterval("fShow()",gG1);
//	window.event.cancelBubble=true;
}
function mHide(){
	/*The following line is needed to re-assign the object variable for IE 5.5/6
	when the function is called because of swapping an IMG with a SPAN and AlphaImageLoader 
	for PNG transparency. Firefox and IE 7+ already support PNG transparency.*/
	oTbP=document.getElementById("TaskBarPart");
	if(window.gShow){clearInterval(gShow);}
	tCntr=1;
	gHide=setInterval("fHide()",gG1);
//	window.event.cancelBubble=true;
}
function fShow(){
	tCntr=tCntr<1?1:tCntr-2;
	if(oTbPD){
		if(oTbPD.clientHeight<oTbPh){oTbPD.style.height=(oTbPD.clientHeight+((gGr-tCntr)*2))+"px";}
		else if(window.gShow){
			oTbPD.style.height=oTbPh+"px";
			clearInterval(gShow);
		}
	}
}

function fHide(){
	tCntr=tCntr>gGr?gGr:tCntr+2;
	if(oTbPD){
		if(oTbPD.clientHeight>1){
			var mDf=parseInt(oTbPD.clientHeight-(gGr+tCntr));
			mDf=mDf<1?1:mDf;
			oTbPD.style.height=mDf+"px";
		}
		else if(window.gHide){
			oTbPD.style.height="1px";
			clearInterval(gHide);
		}
	}
}

//This is code taken from the WebForm_FireDefaultButton in the WebResource.axd.
var gDefaultFired=false;
function SearchTextBox_OnKeyPress(event, target){
    if (!gDefaultFired&&event.keyCode==13&&!(event.srcElement&&(event.srcElement.tagName.toLowerCase()=="textarea"))){
        var defaultButton=document.getElementById(target);
        if (defaultButton&&typeof(defaultButton.click)!="undefined"){
            gDefaultFired=true;
            defaultButton.click();
            event.cancelBubble=true;
            if(event.stopPropagation){event.stopPropagation();}
            return false;
        }
    }
    return true;
}
function SearchButton_OnClick(e){
	var sUrl;var thisHost=window.location.hostname;
	if(searchUrl!=null&&searchUrl.length>0){sUrl=searchUrl;}
	else{sUrl="http://"+thisHost+"/Search/Default.aspx";}
	window.location=sUrl+"?q="+document.forms[0].SearchTextBox.value;
}