﻿// ----------------------------------------------------------------------------------------------
// iBTG.js
// Copyright iMedia 2009
// ----------------------------------------------------------------------------------------------

jQuery(document).ready(function()
{

});

// ----------------------------------------------------------------------------------------------

function toggle(strDiv)
{
	// show or hide panel
	if ($("#" + strDiv).is(":visible"))
	{
		$("#" + strDiv).slideUp("fast");
	}
	else
	{
		$("#" + strDiv).slideDown("fast");
	}
}

function iAlert(alert,url)
{
	if(confirm(alert))
	{
		document.location = url;
	}
}

function filterDownloadDocs()
{
	var strSearch = "test";
	$.ajax(
	{
		method: "get",
		url: "download.asp",
		dataType: "html",
		data: "sectionid=2&pageid=18&search=" + strSearch + "&ajax=1",
		success: function(html)
		{
			$("#downloaddocs").html(strSearch);
		},
		error: function() { alert('An error has occurred.') }
	});
}

function enterPressed(e)
{
	var keycode;
	if (window.event) {
		keycode = window.event.keyCode;
	}
	else if (e) {
		keycode = e.which;
	}
	else {
		return false;
	}
	return (keycode == 13);
}

















