javascript:window.history.forward(1);

function DefaultKey(e){
    try {
	    if (e.keyCode == 13)
	    {
    		eval('var theButton = e.srcElement.document.getElementById("btnSearch")')
    		theButton.click()
		    event.returnValue = false
	    }
	}
	catch(error) {
	    alert(error)
	}
}

function validateCLB(){
    try{
	    var chkAll=clbPermits.rows(0).cells(0).childNodes(0)
	    if(chkAll.checked==true){
		    for (var i = 1; i < clbPermits.cells.length; i++) {
			    var chkTemp=clbPermits.rows(0).cells(i).childNodes(0)	
			    chkTemp.checked=false			
			    chkTemp.disabled=true
		    }
	    }
	    else{
		    for (var i = 1; i < clbPermits.cells.length; i++) {
			    var chkTemp=clbPermits.rows(0).cells(i).childNodes(0)	
			    chkTemp.disabled=false
		    }
	    }
	}
    catch(error){
        alert(error)
    }
}

function popup(url,width,height){
	try{
	    var browserName=navigator.appName; 

	    if (browserName=="Microsoft Internet Explorer")
	    {
		    var strTemp='dialogWidth:' + width + ';dialogHeight:' + height + ';'
		    window.showModalDialog(url, "", strTemp);
	    }
	    else
	    {
		    var strTemp='location=no,width=' + width + ',height=' + height + ',scrollbars=yes'
		    window.open("PublicLandSurveyHelp.htm", "", strTemp);
	    }
    }
    catch(error){
        alert(error)
    }
}

function viewMap(propertyInternalId) {//minX, minY, maxX, maxY){ //propertyInternalId){
	try{
	    debugger;
	    //alert(propertyInternalId);
	    var url="http://localhost/landrecordshtmlviewer/landrecordshtmlviewer/default.htm";
	    var browserName=navigator.appName; 
        
        url+="?PropertyInternalId=" + propertyInternalId;
        
        //var att="18-1262-0";
        
        //url+="?Layers=1111111111"
        //url+="&ActiveLayer=3";
        //url+="&QueryZoom=Yes";
        //url+="&Query='TAXID%20%3D%20" + propertyInternalId + "'";
        //url+="&Query=ATTRIBUTE%3D%22" + att + "%22";
        //url+="&Query=ATTRIBUTE%3D%22Lake%20Neshonoc%22";
        //url+="&Query=LAND%3D%22Lake%20Neshonoc%22";
        
        //url+="&Extent=Auto";
        
	    if (browserName=="Microsoft Internet Explorer")
	    {
		    //var strTemp='dialogWidth:' + width + ';dialogHeight:' + height + ';'
		    var strTemp='dialogWidth:' + '500px' + ';dialogHeight:' + '500px' + ';'
		    window.showModalDialog(url, "", strTemp);
	    }
	    else
	    {
		    //var strTemp='location=no,width=' + width + ',height=' + height + ',scrollbars=yes'
		    var strTemp='location=no,width=' + '500px' + ',height=' + '500px' + ',scrollbars=yes'
		    //window.open("PublicLandSurveyHelp.htm", "", strTemp);
		    window.open("url", "", strTemp);
	    }
    }
    catch(error){
        alert(error)
    }
}


function numericOnly(oEdit, keycode, oEvent) {
    //try{
    //	if ((keycode >= 48 && keycode < 57 /*0-9*/ ) || 
    //        (keycode >= 37 && keycode <= 40 /*Arrow keys*/) || 
    //         keycode == 8 /*backspace*/ ||
    //         keycode == 9 /*tab*/ || 
    //		 keycode == 27 /*escape*/) {
    //			
    //		oEvent.cancel=false
    //	}
    //	else {
    //		//return false; // allow these keystrokes 
    //		//return true;    // disallow all others
    //		oEvent.cancel=true;
    //	}
    //}
    //catch(error){
    //
    //}
}

//function numericOnly(oEdit, keyCode, oEvent)
//{
	//alert(oEdit);
	//alert(keyCode);
	//alert(oEvent);
	
	//var keyCode = this.event.keyCode;
	
	// Ajust for the key codes for the numeric keypad because they
	// are different from the key codes across the top of the keyboard.
	//if (keyCode >= 96 && keyCode <=105) 
	//{
	//	keyCode = keyCode - 48;
	//}
	
//	if ((keyCode >= 48 && keyCode <= 57  /*0-9*/ ) || 
//		(keyCode >= 37 && keyCode <= 40 /*Arrow keys*/)  || 
//			keyCode == 8  /*backspace*/ ||
//			keyCode == 9  /*tab*/ || keyCode == 27 /*escape*/ ||
//			keyCode == 13 /*enter*/ ) {		
		
//		return false;
		//alert('OK');
		//this.event.returnValue=true;
		//oEvent=true;
//	}
//	return true;
	//else {
		//return false;
		//alert('Not OK');
		//document.all.ding.src='../ding.wav'
		//this.event.returnValue=false;
		//oEvent=false;
	//}
//}

