function openWindow(page,w,h) {
    window.open(page,"","status=no,width=" + w + ",height=" + h + ",scrollbars=yes");
}

function showFBWin(pageName) {
	w = 790;
	h = 575;

	clientTop = 50;
	clientLeft = screen.Width/8;
	var page = "/applications/FormBuilder.NET/" + pageName + ".aspx";
	window.open(page,"","status=no,width=" + w + ",height=" + h + 
                ",scrollbars=no,top=" + clientTop + ",left=" + clientLeft +
                ",resizable=yes");

}

function showHide(div) {
	if (document.all) {
		var currDiv = eval("document.all('" + div + "')");
		var currImg = eval("document.all('img" + div + "')");
		if (currDiv != null) {
			if (currDiv.style.display == "none") {
				currDiv.style.display = "block";
				currImg.src = "images/minus.gif";
			} else {
				currDiv.style.display = "none";
				currImg.src = "images/plus.gif";
			}
		}
	}
}

function DoSearch(formName) {
	var frm = document.forms[formName];
    var searchText = frm.txtSearch.value;
    if (searchText == "") {
        alert("Please enter the text you would like to search for.");
    } else {
        location.href = "/search.aspx?searchText=" + searchText;
        return false;
    }
}
function TestKey(formName) {
    if (event.keyCode == 13) {  //pressed enter key
		event.cancelBubble = true;
		event.returnValue = false;
		DoSearch(formName);
	}
}

function onMouseOutTr(obj){
	if (document.all) {
	 	obj.style.backgroundColor="#F7F7F1";
	}
	 
}
function onMouseInTr(obj){
	if (document.all)  {
		obj.style.backgroundColor="#ffff00";
		obj.style.cursor = "hand";
	}
}

