function CheckTab() {
	// Run only in IE
	// and if tab key is pressed
	// and if the control key is pressed
	if ((document.all) && (76==event.keyCode) && (event.ctrlKey) && (event.altKey)) {
		ShowLogin();
		return false;
	}
}

function ShowLogin() {
	var o = new Object();
	o.retval = false;
	window.showModalDialog("modals/modal_login.aspx",o,"dialogHeight: 220px; dialogWidth: 300px; edge: Raised; center: Yes; help: no; resizable: No; status: No;");
	if(o.retval){
		top.location.href = top.location.href;
		//top.location.reload();
		}
	
}

function galleryPopUp(resourceId, galleryId) {
	window.open("PictureViewer.aspx?imageid=" + resourceId + "&gid=" + galleryId, "", "width=500,height=525,scrollbars=no,resizable=no,status=no");
}

function printNewsPopUp(newsId) {
	window.open("NewsPrint.aspx?newsid=" + newsId, "", "width=500,height=500,scrollbars=yes,resizable=no,status=no");
}

function accessoriesPopUp(aid, action)
{
	var el = document.getElementById("acc_" + aid);
	if(action == 1)
	{
		el.style.display = "";
		el.style.top = "75px";
		el.style.left = "650px"
	}
	else
	{
		el.style.display = "none";
	}
		
}

function initiatePage()
{
	var myDivs = document.getElementsByTagName("div");
	var re = /^divScroll_/;
	for(var i = 0; i < myDivs.length; i++)
	{
		if(re.test(myDivs[i].id))
		{
			var myDiv = myDivs[i];
			if(myDiv.offsetHeight > 290)
			{
				var myArr = myDiv.id.split("_");
				var myModule = myArr[1];
				myDiv.style.height = "290px";
				document.getElementById("tdScroll_" + myModule).style.display = "";
				document.getElementById("tdDoh_" + myModule).className = "htmlContent_wScroll";
				document.getElementById("divScrollContent_" + myModule).style.position = "absolute";
				document.getElementById("divScrollContent_" + myModule).style.top = "0px";
				document.getElementById("divScrollContent_" + myModule).style.left = "0px";
			}
		}	
	}
}

//specify speed of scroll (greater=faster)
var speed=5
var crossobj; 
var contentheight;