
//--------------------------------------------------------------
function awButtonSubmit(id1, event)
{
    var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
    if (keyCode == 13 || keyCode == 3) 
    {
		event.returnValue=false;
		id1.returnValue=false;
	   	id1.click();
		if (document.all && document.getElementById)
		{
		}
	}
}  

//--------------------------------------------------------------
function awDualButtonSubmit(id1, id2, event)
{
    var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
    if (keyCode == 13 || keyCode == 3) 
    {
		event.returnValue=false;
		if (id1 != undefined)
		{
			id1.returnValue=false;
	   		id1.click();
	   	}
	   	else if (id2 != undefined)
	   	{
			id2.returnValue=false;
	   		id2.click();
	   	}
	}
}  

//--------------------------------------------------------------
function SetQSBox(Obj, Val)
{
    obj.value = Val;
}  


var isInput;

//--------------------------------------------------------------
function IsInputSubmit()
{
	if (isInput)
	{
		return true;
	}
	else
	{
		return false;
	}
}  

var isQSInput;

//--------------------------------------------------------------
function awQSClick(rootpath, Keywords, InitialValue)
{

	if (isQSInput)
	{
		isQSInput=true;
		if (Keywords.value == InitialValue)
		{
			document.location = rootpath + "/Default.aspx?sID=5";
		}
		else
		{
		isInput = true;
		}
	}
	else
	{
		return false;
	}
	
}  

//--------------------------------------------------------------
function awPopUpWindow(url, target, features) {
	//"location=0,  statusbar=0,  menubar=0,  width=800,  height=300";
  	var theWindow =
    window.open(url, target, features);
 	theWindow.focus();
  	return theWindow;
}

//--------------------------------------------------------------	
function awOpenMailWin(x, y, params) 
{
	if (params =="")
		window.open(x,y,'status=no,scrollbars=no,resizable=no,width=400,height=425');
	else
		window.open(x, y, params);
}
