/**
* Common Messages
*/
var LBL = {
	USERNAME:"User Name",
	REAL:"Real",
	REGISTRATION:"Registration",
	KEYWORD: "KeyWord",
	EMAILS : "Emails",
	TITLE:"Title",
	LOCATION:"Location",
	VISIBLETO:"Visible To",
	ID: "id",
	NAME: "Name",
	REVIEW: "Review",
	PRIMARY :"Primary",
	TOP :"Top",
	SUB :"Sub",
	CATEGORY :"Category",
	COMMENT:"Comment",
	DESCRIPTION: "Description",
	STATUS: "Status",
	FIRST: "First",
	LAST: "Last",
    RSS:"Rss",
	ADDRESS1: "Address1",
	APPROVAL: "Approval",
	CITY: "City",
	ZIP: "Zip",
	GENDER: "Gender",
	STATE: "State",
	COUNTRY: "Country",
	PASSWORD: "Password",
	CONFIRM: "Confirm",
	LINK: "Link",
	COMMENT: "Comment",
	DISPLAY: "Display",
	YEAR: "Year",
	MONTH: "Month",
	DAY: "Day",
	EXPIRE: "Expire",
	DATE: "Date",
	CONTACT_PERSON: "Contact Person",
	CI_METHOD: "CI Method",
	RATING: "Rating",
	EMAIL: "Email",
	USER: "User",
	USER_NAME: "Username",
	TITLE: "Title",
	SECURITY: "Security Code",
	COMMENT:"Comments",
	LINK:"Link",
	NAME:"Name",
	CREATED_ON:"Created On",
	MESSAGE: "Message",
	WORD: "Word",
	TAG: "Tag",
	URL:"url_parse",
	URL_LINK:"url link",
	FAV:"fav_",
	BOOK:"book",
	MOVIE:"movie",
	MUSIC:"music",
	PEOPLE:"people",
	TVSHOW:"tvshow",
	FRIENDNAME:"Friend Name",
	FILEPATH:"File Path",
	PASSWORD_NOT_LESSTHAN:"Pass Not Less than 6",
	ACTION:"Action",
	ALBUM_NAME: "Album Name"
};

/**
* Common Messages
*/
var XHRState = {
	SUCCESS: "success",
	ERROR: "error"
};

var StatusMsg = {
	REC_ADDEDD: "Record successfully added.",
	REC_MODIFIED: "Record successfully modified.",
	REC_DELETED: "Record(s) successfully deleted.",
	REC_ACTIVATED: "Record successfully activated.",
	REC_DEACTIVATED: "Record successfully deactivated.",
	REC_APPROVED: "Record successfully approved.",
	REC_DISAPPROVED: "Record successfully disapproved.",
	REC_RESTORED: "Record successfully restored.",
	INVALID_PARAMETERS: "Invalid Parameters.",
	INVALID_ACTION: "Invalid Action",
	ERROR: "Error",
	SELECTION_CONFIRMATION: "Please select record(s) to perform the action.",
	SEARCH_RESULT: "Your search for \'%%1\' yielded below result(s).",
	NO_RECORD_FOUND: "oops! No record found."
};
	
var MSG = {
	/*TAG:"You must enter at least one tag.",
	BLANK_FILE: "Please select the file to upload"*/
	OLDPASS:"Please Enter Old Password",
	NEWPASS:"Please Enter New Password",
	CONPASS:"Please Enter Confirm Password",
	CHECK:"New Password And Confirm Password Should Be Same",
	FIRST_NAME:"Please Enter First Name",
	LAST_NAME:"Please Enter Last Name",
	DRIVER_ID:"Please Enter  Driver ID",
	PHONE:"Please Enter  Phone Number",
	MOBILE:"Please Enter  Mobile Number",
	LICENSE_CLASS:"Please select license class",
	BIRTH_DATE:"Please Enter Date Of Birth (mm-dd-yyyy).",
	HIRE_DATE:"Please select hire date",
	LICENSE_STATE:"Please select license state",
	LICENSE_NUMBER:"Please fill license number",
	ENDOESEMENTS:"Please select license_endorsement",
	EXPIRATION_DATE:"Please Select Expiration Date",
	DOT_DATE:"Please Select Last DOT Physical Date",
	DOT_EXPIRATION_DATE:"Please Select DOT Expiration Date",
	CITY:"Please enter your city",
	STREET:"Please enter your Street name",
	STATE:"Please Enter A State",
	COUNTRY:"Please Enter Your Country",
	ZIP:"Please enter the 5-digit zip code",
	STATUS:"Please Enter  Driver Status",
	TYPE:"Please Enter Driver Owner Type",
	OMIT_SYMBOL:"Sorry, but the following characters\n\r\n\r@ $ % ^ & * # ( ) [ ] \\ { + } ` ~ =  | \n\r\n\rare not allowed!\n",
	OMIT_CHARACTER:"Please omit special characters",
	DRIVER_ID_IS:"Driver ID not less than 6 character",
	ZIP_CODE_IS:"Zip code not less than 5 digit",
	ZIP_CODE_NUMERIC:"Zip code take Numeric value",
	DRIVER_NUMERIC:"Driver take Numeric value",
	//injury label
	FILE_NUMBER:"Please enter Report number",
	SELECT_DRIVER:"Please Select Driver",
	SELECT_DATE:"Please Select Date",
	SELECT_TIME:"Please insert time in 12 hour",
	SELECT_DESCRIPTION:"Please enter description",
	ESTIMATED_COST:"Please enter estimated cost",
	ATUAL_COST:"Please enter your actual cost",
	SELECT_COMMENT:"Please enter your comment",
	SELECT_TITLE:"Please enter title",
	SELECT_CLASSIFICATION:"Please Select atleast one  classification from drop down list",
	SELECT_SUB_CLASSIFICATION:"Please Select atleast one Sub Classiication from drop down list ",
	SELECT_TYPE:"Please enter your type",
	NUMERIC_TIME:" Time takes numeric value",
	NUMERIC_ESTIMATED_COST:"Estimated cost takes numeric value",
	NUMERIC_ACTUAL_COST:"Actual cost takes numeric value",
	REPORTED_BY:"Please select Reported_by",
	SELECT_COMPLAIN:"Select complain not empty",
	SELECT_ATTENDED:"Please select is_attended ",
	TRUCKMODEL:"Please Enter  Truckmodel",
	TRUCKNO:"Please Enter  Truck  Number",
	INSEPECTED_BY:"Please Select Inspected by",
	APPEARANCE_ACCEPTED:"Please Select is_accepted",
	SHORT_NAME:"Please enter short name",
	FULL_NAME:"Please enter full name",
	TRUCK_NO:"Please Select Truck",
	SELECT_VIOLATION:"Please select violation",
    DELETE_CONFIRMATION: "Are you sure you want to delete the selected record(s)?"
	};

/** Function builds a Message from provided arguments
    *  sText : The Bare Message 	 
	*  sSlot1 : Dynamic Slot1 to replace
	*  sSlot2 : Dynamic Slot2 to replace
	*  sSlot3 : Dynamic Slot3 to replace
	*  sSlot4 : Dynamic Slot4 to replace
	*  sSlot5 : Dynamic Slot5 to replace
   */
  function fnGetMessage(sText, sSlot1, sSlot2, sSlot3, sSlot4, sSlot5 ){
     var   cKey   = '\0';
     var   sValue = null;

     sText = sText.trim() + "X";
   
     var nPos = sText.indexOf( "%%" );
     while ( nPos != -1 ){  
        cKey = sText.charAt( nPos + 2 );
        switch ( cKey ){
           case '1' : sValue = sSlot1; break;
           case '2' : sValue = sSlot2; break;
           case '3' : sValue = sSlot3; break;
           case '4' : sValue = sSlot4; break;
           case '5' : sValue = sSlot5; break;
        }
        
        if ( sValue != null ){
           sText = sText.substring( 0, nPos ) + sValue + sText.substring( nPos + 3 ); 
           nPos = sText.indexOf( "%%", nPos + sValue.length );
        }
        else
           nPos = sText.indexOf( "%%", nPos + 2 );
     }
     sText = sText.substring( 0, sText.length - 1 );
     return sText;
}

var SPZ_URL={};