﻿function OpenWindow(strNavigateURL, intWindowWidth, intWindowHeight)
{        
	if(strNavigateURL.indexOf("?") == -1)
	{
		window.open(strNavigateURL, '_blank', 'toolbar=0, location=0, menubar=0, width=' + intWindowWidth + ', height=' + intWindowHeight + ', scrollbars=1, resizable=1');
	}
	else
	{
		window.open(strNavigateURL, '_blank', 'toolbar=0, location=0, menubar=0, width=' + intWindowWidth + ', height=' + intWindowHeight + ', scrollbars=1, resizable=1');
	}
}

function selectKeywords(objThis,strDefault) 
{
	if (objThis.value == strDefault) 
	{
		objThis.value = "";
		objThis.focus();
	}
}

function blurKeywords(objThis,strDefault)
{
	if (objThis.value.replace(" ","") == "")
	{
		objThis.value = strDefault;
	}
}

function validateKeywords(strThisID, strDefault)
{
	var objThis = document.getElementById(strThisID);
	
	if ((objThis.value == strDefault) || (objThis.value.replace(" ", "") == ""))
	{
		alert("Please insert at least one keyword.");
		objThis.select();
		objThis.focus();
		return false;
	}
}

function validateFilter(strThisID)
{
	if (document.getElementById(strThisID).selectedIndex == 0)
	{
		alert("Please choose a class from the list.");
		return false;
	}

	return true;
}