

function openWin( windowURL, windowName, windowFeatures ) { 
	return window.open( windowURL, windowName, windowFeatures ) ; 
} 

function checkInteger(checkString){
    newString = "";    
    count = 0;         
    for (i = 0; i < checkString.value.length; i++) {
        ch = checkString.value.substring(i, i+1);
        if (ch >= "0" && ch <= "9") {
            newString += ch;
        }
    } 	
    if (checkString.value != newString) {
      	alert("The value you have entered contains invalid characters. \nPlease remove them! \nCorrect Example: 12");
		checkString.focus();
        return newString;
    }
    return checkString;
}

function isWhitespace(expS) {
	var allWhitespace = true;
    if ( isWhitespace.arguments[0] != null ) {
		if (typeof expS != "string") expS = expS.toString();
		if (expS.length != 0) {
			var i = 0;
			var whitespace = " \t\n\r";
	    	for (i=0; i<expS.length; i++) {
		        if (whitespace.indexOf( expS.charAt(i) ) == -1) {
					allWhitespace = false;
					break;
				}
		    }
		}
	}
    return allWhitespace;
}

function returnInteger(checkString){
    newString = "";    
    count = 0;         
    for (i = 0; i < checkString.value.length; i++) {
        ch = checkString.value.substring(i, i+1);
        if (ch >= "0" && ch <= "9") {
            newString += ch;
        }
    } 	
    if (checkString.value != newString) {
        return false;
    }
    return true;
}

function regular(string) {
    if (!string) return false;
    var Chars = "0123456789-";

    for (var i = 0; i < string.length; i++) {
       if (Chars.indexOf(string.charAt(i)) == -1)
          return false;
    }
    return true;
} 

/* <a href="JavaScript: newWindow = openWin( 'Pop_Window.cfm?Show=', 'PopWindow', 'width=400,height=300,toolbar=0,location=0,directories=0,status=0,menuBar=1,scrollBars=1,resizable=1' ); newWindow.focus()"></a> 
*/


