﻿/*****************************************************************************/
function openWindow(url, name, w, h)
{
	return openWindow(url, name, w, h, false);
}
function openWindow(url, name, w, h, scrollable)
{
	return window.open(url, name, "toolbar=0,scrollbars="+(scrollable?"1":"0")+",status=0,width="+w+",height="+h);
}
/*****************************************************************************/
function openBidLiveWindow(url, id)
{
	var win = openWindow(url, 'BidLive_'+id, 812, 608);
	if (win.focus) win.focus();

	return false;
}
/*****************************************************************************/
function clearTextBox(txt, onlyfirsttime)
{
	if(!txt._clearedonce)
	{
		txt.value = "";
		txt._clearedonce = true;
	}
}
/*****************************************************************************/
function goSearch(query)
{
	if(query.length > 0)
	{
		document.location.href = "search.aspx?q=" + query;
	}
}
/*****************************************************************************/
function trackOutgoing(url)
{
	$.ajax({type:"GET",url:url});
}
/*****************************************************************************/
function includeJS(jspath)
{
	var ele = document.createElement("script");
	ele.setAttribute("type", "text/javascript");
	ele.setAttribute("src", jspath);
	document.getElementsByTagName("head")[0].appendChild(ele);
}
/*****************************************************************************/
function out2D(num) { return (num < 10) ? ("0" + num) : num; }
/*****************************************************************************/
function reloadPage() { document.location.href = document.location.href; }
/*****************************************************************************/
function showhide(show, ele)
{
	ele.style.display = show ? "none" : "";
}
/*****************************************************************************/