// Javascript File
var __ComboTextBox = null;
var __ComboList;
var __ComboArray = new Array();
var __ComboListIndex = -1;
var __ComboListMode = true;
var __ComboComType;

function MWJ_findObj( oName, oFrame, oDoc ) {
	if( !oDoc ) { if( oFrame ) { oDoc = oFrame.document; } else { oDoc = window.document; } }
	if( oDoc[oName] ) { return oDoc[oName]; } if( oDoc.all && oDoc.all[oName] ) { return oDoc.all[oName]; }
	if( oDoc.getElementById && oDoc.getElementById(oName) ) { return oDoc.getElementById(oName); }
	for( var x = 0; x < oDoc.forms.length; x++ ) { if( oDoc.forms[x][oName] ) { return oDoc.forms[x][oName]; } }
	for( var x = 0; x < oDoc.anchors.length; x++ ) { if( oDoc.anchors[x].name == oName ) { return oDoc.anchors[x]; } }
	for( var x = 0; document.layers && x < oDoc.layers.length; x++ ) {
		var theOb = MWJ_findObj( oName, null, oDoc.layers[x].document ); if( theOb ) { return theOb; } }
	if( !oFrame && window[oName] ) { return window[oName]; } if( oFrame && oFrame[oName] ) { return oFrame[oName]; }
	for( var x = 0; oFrame && oFrame.frames && x < oFrame.frames.length; x++ ) {
		var theOb = MWJ_findObj( oName, oFrame.frames[x], oFrame.frames[x].document ); if( theOb ) { return theOb; } }
	return null;
}

function __ComboEventKeyUp(e, Url)
{
    var Code = __ComboGetKeyCode(e);


    //alert(Url);
    clearTimeout(__keyUpTimeout); // Clears previous timeout if presents

    // Don't send a query if arrow keys are used
        if (((Code < 37) || (Code > 40)) && (Code != 13))
        { 
//            __keyUpTimeout = setTimeout(__AjaxGet(Url), 500);
	     __AjaxGet(Url);	
        }
        else {
	    return false; // blocks default behavior
	}
}

function __location_opt_fill(AxlResponse)
{
//	alert(AxlResponse);

    MWJ_findObj("location_opt_div").innerHTML = AxlResponse;
    return true;
}

function __objInfoFill(AxlResponse)
{
//	alert(AxlResponse);

    MWJ_findObj("objInfoDiv").innerHTML = AxlResponse;
    return true;
}

function __cnddbQueryFill(AxlResponse)
{
//	alert(AxlResponse);

    MWJ_findObj("gfQueryDiv").innerHTML = AxlResponse;
    return true;
}

function __calwater_fill(AxlResponse)
{
//	alert(AxlResponse);

    MWJ_findObj("calwater_div").innerHTML = AxlResponse;
    return true;
}

function __map_div_fill(AxlResponse)
{
//	alert(AxlResponse);

    MWJ_findObj("map_div").innerHTML = AxlResponse;
    return true;
}

function __related_div_fill(AxlResponse)
{
//	alert(AxlResponse);
    MWJ_findObj("related_div").innerHTML = AxlResponse;
    return true;
}

function __relatedObjFillGF(AxlResponse)
{
//	alert(AxlResponse);
    relatedObj = {};
    relatedObj = eval( '(' + AxlResponse + ')' );
    listRelatedGF();
    return true;
}

function __relatedObjFill(AxlResponse)
{
//  alert(AxlResponse);
    relatedObj = {};
    relatedObj = eval( '(' + AxlResponse + ')' );
    listRelated(MWJ_findObj("relateSelect").value);
    return true;
}

function __nameMatchObjFill(AxlResponse)
{
//  alert(AxlResponse);
    nameMatchObj = {};
    nameMatchObj = eval( '(' + AxlResponse + ')' );
    listMatchObj();
    return true;
}

function __org2dsObjFill(AxlResponse)
{
//  alert(AxlResponse);
    org2dsObj = {};
    org2dsObj = eval( '(' + AxlResponse + ')' );
    listOrg2Ds();
    return true;
}

function __dsMatchObjFill(AxlResponse)
{
//  alert(AxlResponse);
    dsMatchObj = {};
    dsMatchObj = eval( '(' + AxlResponse + ')' );
    listDsMatchObj('matchListDiv');
    return true;
}

function __dsMatchObjFillGF(AxlResponse)
{
//  alert(AxlResponse);
    dsMatchObj = {};
    dsMatchObj = eval( '(' + AxlResponse + ')' );
    listDsMatchObj('gfQueryDiv');
    return true;
}

function __thesMatchObjFill(AxlResponse)
{
//  alert(AxlResponse);
    thesMatchObj = {};
    thesMatchObj = eval( '(' + AxlResponse + ')' );
    listThesMatchObj();
    return true;
}

function __placeMatchObjFill(AxlResponse)
{
//  alert(AxlResponse);
    placeMatchObj = {};
    placeMatchObj = eval( '(' + AxlResponse + ')' );
    listPlaceNameMatch();
    return true;
}

function __orgMatchObjFill(AxlResponse)
{
//  alert(AxlResponse);
    orgMatchObj = {};
    orgMatchObj = eval( '(' + AxlResponse + ')' );
    listOrgNameMatch();
    return true;
}
function __clipMatchObjFill(AxlResponse)
{
//  alert(AxlResponse);
    placeMatchObj = {};
    placeMatchObj = eval( '(' + AxlResponse + ')' );
    listClipNameMatch();
    return true;
}

function __cross_map_fill(AxlResponse)
{
//	alert(AxlResponse);
    MWJ_findObj("cross_map_div").innerHTML = AxlResponse;
    return true;
}

