<!--
function searchSubmitClick() {
    window.location = '/search/results.aspx?k=' + document.getElementById('searchTerm').value + '&s=All OSEP TA%26D Sites';
}

function searchSubmitEnter(evt) {
	//alert((window.event) ? event.keyCode:evt.which);
	var keycode = (window.event) ? event.keyCode : evt.which
    if (keycode == 13) { 
//        window.event.cancelBubble = true; 
//        window.event.returnValue = false; 
        window.location =  '/search/results.aspx?k=' + document.getElementById('searchTerm').value + '&s=All OSEP TA%26D Sites';
       return false;
    }
    return true;
}

function setCookie(c_name,value,expiredays)
{
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+
		((expiredays==null) ? "" : ";path=/;expires="+exdate.toGMTString());
}

function getCookie(c_name)
{
	if (document.cookie.length>0)
	{
		c_start=document.cookie.indexOf(c_name + "=");
		if (c_start!=-1)
		{ 
			c_start=c_start + c_name.length+1;
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end==-1) c_end=document.cookie.length;
			return unescape(document.cookie.substring(c_start,c_end));
		}
	}
	return "";
}
function changeFontSize(val)
{
	document.body.style.fontSize = val+"px";
	setCookie("fontsize", val, 365);
}
function setFontSizeFromCookie()
{
	var val = getCookie("fontsize");
	if (val!="") {
	document.body.style.fontSize =  val+"px";
	}
	if (val=="") {
	document.body.style.fontSize =  "14px";
	}
}

function showThis()
{
	var val = getCookie("fontsize");
	alert(val);
}


function parseUri (str) {
	var	o   = parseUri.options,
		m   = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
		uri = {},
		i   = 14;

	while (i--) uri[o.key[i]] = m[i] || "";

	uri[o.q.name] = {};
	uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
		if ($1) uri[o.q.name][$1] = $2;
	});

	return uri;
};

parseUri.options = {
	strictMode: false,
	key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
	q:   {
		name:   "queryKey",
		parser: /(?:^|&)([^&=]*)=?([^&]*)/g
	},
	parser: {
		strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
		loose:  /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
	}
};

function GetBDCResultLink(resultUrl, title)
{
	document.write("<a href='" + parseUri(resultUrl).relative + "'>" + title + "</a>");
}

function GetBDCSearchURL(resultUrl)
{
	var newUrl = window.location.protocol + "//" + window.location.host + "/" + parseUri(resultUrl).relative
	document.write("<a href='" + newUrl +"'>" + newUrl  + "</a>");
}


//-->