function OpenWindowNoToolbars(url,height,width)
{
	window.open(url,'',"height="+height+",width="+width+",status=no,toolbar=no,menubar=no,location=no");
}

function PrintOnLoad()
{
     window.print();	
}

function ResetMyForm()
{
    var theForm = document.forms['aspnetForm'];
if (!theForm) 
    theForm = document.aspnetForm;
	theForm.clear();
}



function VisibleControls(type, tblDateId, tblToDateId, tblRangeDateId)
{
   if(type != "")
   {
       try
       { 
            if(type == 'season')
            {
                if(document.getElementById(tblDateId) !=  null)
                    document.getElementById(tblDateId).style.display = "block";
                if(document.getElementById(tblToDateId) !=  null)
                    document.getElementById(tblToDateId).style.display =  "block";
                if(document.getElementById(tblRangeDateId) !=  null)
                    document.getElementById(tblRangeDateId).style.display =  "none";
            }
            else 
            {
                if(document.getElementById(tblDateId) !=  null)
                    document.getElementById(tblDateId).style.display = "none";
                if(document.getElementById(tblToDateId) !=  null)
                    document.getElementById(tblToDateId).style.display =  "none";
                if(document.getElementById(tblRangeDateId) !=  null)
                    document.getElementById(tblRangeDateId).style.display =  "block";
            }
        }
        catch(e)
        {
            alert(e.message);
        }
    }
}

/**************/
function Trim(TRIM_VALUE){
if(TRIM_VALUE==null || TRIM_VALUE==undefined)
	return"";
if(TRIM_VALUE.length < 1){
return"";
}
TRIM_VALUE = RTrim(TRIM_VALUE);
TRIM_VALUE = LTrim(TRIM_VALUE);
if(TRIM_VALUE==""){
return "";
}
else{
return TRIM_VALUE;
}
} //End Function

function RTrim(VALUE){
var w_space = String.fromCharCode(32);
var v_length = VALUE.length;
var strTemp = "";
if(v_length < 0){
return"";
}
var iTemp = v_length -1;

while(iTemp > -1){
if(VALUE.charAt(iTemp) == w_space){
}
else{
strTemp = VALUE.substring(0,iTemp +1);
break;
}
iTemp = iTemp-1;

} //End While
return strTemp;

} //End Function

function LTrim(VALUE){
var w_space = String.fromCharCode(32);
if(v_length < 1){
return"";
}
var v_length = VALUE.length;
var strTemp = "";

var iTemp = 0;

while(iTemp < v_length){
if(VALUE.charAt(iTemp) == w_space){
}
else{
strTemp = VALUE.substring(iTemp,v_length);
break;
}
iTemp = iTemp + 1;
} //End While
return strTemp;
} //End Function

function isInteger(s){
	var i;
	for (i = 0; i < s.length; i++){
	var c = s.charAt(i);
	if (((c < '0') || (c > '9'))) return false;
	}
	return true;
}

function stripCharsInBag(s, bag){
	var i;
	var returnString = '';
	for (i = 0; i < s.length; i++){
	var c = s.charAt(i);
	if (bag.indexOf(c) == -1) returnString += c;
	}
	return returnString;
}

function IsNumeric(sText)
{
    var ValidChars = '0123456789';
    var IsNumber=true;
    var Char;
    for (i = 0; i < sText.length && IsNumber == true; i++)
    {
    Char = sText.charAt(i);
    if (ValidChars.indexOf(Char) == -1)
    {
    IsNumber = false;
    }
    }
    return IsNumber;
}
/**************************/