function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}

function MM_displayStatusMsg(msgStr) { //v1.0
	status=msgStr;
	document.MM_returnValue = true;
}

function bioLink(url)
{
	if(opener){
		if(opener.top){
			//alert("opener.top is an object  url : " + url);
			opener.top.location.href = url;
		}
		else if(opener.parent){
			//alert("opener.parent is an object url : " + url);
			opener.parent.location.href = url;
		}
		else{
			//alert("opener is an object  url : " + url);
			opener.document.location.href = url;
		}
		window.close();
	}
	else
		//alert("opener is not an object");
		//var i = self.parent.tb_remove();
		top.location.href = url;
	
	
}

function submitComicSearchForm(form){
	//read parameters, create a URL with query string, and bring up popup form
	

	// Do not continue if input(s) has invalid character(s)
	if(hasInvalidCharacters(form))
	{
		return;
	}	
	var category = form.filterName.value;
	var keyword = form.keywords.value;
		
	var showAllCheckBox = form.showAll;
	
	var showAll = "false";
	if(showAllCheckBox != null && showAllCheckBox.checked)
	{
		showAll = "true";
	}
	else
	{
		showAll = "false";
	}

	//alert(showAll);
	//alert(keyword);
	//alert(category);
	var url = "";
	
    top.name = "attractions";
	var width = 420;//420
	var height = 480;//480
	var x = (screen.availWidth - width)/2;
	var y = (screen.availHeight - height)/2;	
		
	if(!category)
		category = "Name";
	
	if(!keyword)
		keyword = "";	
		
	//	'/popups/GroupSales.aspx?keepThis=true&amp;TB_iframe=true&amp;height=458&amp;width=575&amp;modal=true'
	
	if(keyword == "")
	{
		url = "../searchResults/SearchEngine.aspx?index=" + category + "&field_keywords=&#032" + "&showAll=" + showAll;
    }
	else
	{
		url = "../searchResults/SearchEngine.aspx?index=" + category + "&field_keywords=" + keyword.replace(/ /g, '+') + "&showAll=" + showAll;
    }
    url += "&keepThis=true&amp;TB_iframe=true&amp;height=458&amp;width=575"
    
    //alert("url="+url);

	//if(keyword == "")
	//	url = "../searchResults/SearchEngine.aspx?index=" + category + "&field_keywords=&#032";
	//else
		//url = "../searchResults/SearchEngine.aspx?index=" + category + "&field_keywords=" + keyword.replace(/ /g, '+');
	
	//MM_openBrWindow(url, "SearchResults", "width="+width+",height="+height+",left=" + x + ",screenX=" + x + ",top=" + y + ",screenY=" + y + ",alwaysRaised=yes");	
	callModalDialogBox(url);
}

