var localMessage;
var browserLang="en_US";

// 
var Country = Class.create();
Country.construct = function() {
    var _name;
	var _lang;
	//用户登陆
	this.loguser="Please enter the correct username!";
	this.logpass="Please enter the correct password!";
	this.test="Please enter the correct PIN code!";
	//用户注册
	this.usererror="We're sorry,This user account has already been deleted!";
	this.emailerror="We're sorry. This email address has already been used!";
	this.chklogname="6-20 Characters, english alphabets, numbers and '_' is allowed. Please start with english alphabet.";
	this.chklognameing="Verifying username...";
	this.chkpass="6-20 characters. Alphabets, numbers, and simbols are allowed. Case sensitive.";
	this.chkpass2="Re-enter the password to match the password above.";
	this.chkemailing="verifying email address...";
	this.chkemail="Please enter the correct email address!";
	this.chkemail2="Re-enter the email address above.";
	this.regok="Valid!";
	this.chksysing="Please wait while our system verifies the information...";
	this.regerror1="The informaton provided is invalid.";
	this.regerror2="The requirements are not met, please check again!";
	this.noagree="Please read and agree to our terms and conditions before you proceed!";
	this.no18="You are under 18 years old!";
	//开通服务
	this.nameerror="Please enter your real name!";
	this.selectcountry="Please select your country!";
	//找回密码
	this.answererror="please enter your Q&A!";
	//用户升级
	this.vcFirstName="Please enter your surname!";
	this.vcLastName="Please enter your name!";
	this.zone_Country_Id="Please enter your country or region!";
	this.vcCityCode="Please enter your city!";
	this.vcPostCode="Please enter your zipcode!";
	this.vcUserPhone="Please enter your phone number!";
	this.vcTradePwd="Please enter your trading password!";
	this.vcReTradePwd="Please re-enter your trading password!";
	this.trdPwdAnswer="Please enter the answer to your Security Question!";
	//appeal
	this.strPath="Uploaded files must have an extension!";
	this.strPath2="Sorry, We are only able to accept files in JPEG (.jpg) and gif format!";
	this.strPath3="Sorry, We are only able to accept files in JPEG (.jpg) , gif and png format!";
	this.vcAppealTextDesc="Please enter your description!";
	this.vcAppealTextDesc2="Description can't be longer than 500 characters, please try again.";
	this.vcAppealTextDesc3="Description contains unsupported characters!";
	this.beyondfile="File size limit exceeded! Please provide a smaller file or reduce the file size.";
	this.overResumTimes="We're sorry, you have exceeded the recovery attempts provided to you and are unable recover this transaction. Kindly contact Item4u Support.";
	//itemtrade
	this.character="Character name cannot be blank!";
	this.numTotal="Quantity cannot be blank!";
	this.numTotal2="Quantity must be an interger, no smaller than '1'.";
	this.numMiniTradeCnt="Minimum Quantity cannot be blank!";
	this.numMiniTradeCnt2="Minimum Quantity must be an interger, no smaller than '1'";
	this.numMiniTradeCnt3="Minimum Quantity cannot exceed total quantity!";
	this.numAvailableHour="Listing period cannot be left blank!";
	this.vcDescContext="Description cannot be longer than 200 character or 100 Chinese characters, please try again!";
	this.vcDescContext2="Description contains unsupported characters!";
	this.numPrice="Buying price cannot be left blank!";
	this.numPrice2="Buying price must be a value higher than '1', maximum of 2 decimals.";
	this.numPrice_1="Buy out cannot be left blank!";
	this.numPrice_2="Buy out must be a value higher than '1',  maximum of 2 decimals.";
	
	this.numStartPrice="Starting bid cannot be left blank!";
	this.numStartPrice2="Starting bid must be a value higher than 1', maximum of 2 decimals.";
	this.numFeeAutoIncStep="Bid increment cannot be empty.";
	this.numFeeAutoIncStep2="Bid increment must be more than 0.";
	this.numMiniTradeCnt_1="Minimum purchase amount cannot be left blank!";
	this.numMiniTradeCnt_2="minimum purchase amount must be an interger, no smaller than '1'.";
	this.numMiniTradeCnt_3="Minimum purchase amount cannot exceed total amount!";
	this.vcGameServerId="Game server cannot be left blank!";
	this.vcImmeTradeFlag="Trade period cannot be left blank!";
	this.viewcart="We're sorry, your purchase amount has to be between";
	this.viewcart2="and";
	this.viewcart3="";
	
	//userpanel
	this.vcDetail="Details cannot be left blank!";
	this.formFile="Please upload a picture!";
	this.p_UpFileObj="Please select a file to upload!";
	this.vcUserSex="Please select your gender!";
	this.vcRealName="Please enter your real surname!";
	this.vcRealName2="Your surname contains unsupported characters. Only '_', '-', English alphabets, numbers and Chinese characters are accepted.";
	this.vcCardCode="Please enter your identification card number!";
	this.vcCardCode2="Please enter a 15 or 18 digit identification card number!";
	this.vcCardCode3="Please enter the correct identification number!";
	this.vcUserMobile="Please enter your mobile phone number!";
	this.vcUserMobile2="Mobile phone number must be 11 digits!";
	this.vcUserMobile3="Please enter the correct mobile phone number!";
	this.vcUserPhone_1="Please enter the correct area code!";
	this.vcUserPhone_2="Please enter the correct phone number!";
	this.vcUserPhone_3="Please enter the correct extension!";
	this.vcUserPhone1Null="Please enter the correct area code!";
	this.vcUserPhone2Null="Please enter the correct phone number!";
	this.vcDefNumFlag="Please select the best contact method.";
	this.uploadFile="Please upload the picture or scan of your identification card.";
	this.firstName="Please enter the correct name!";
	this.dtBirthDateError="Date provided is invalid!";
	this.vcPostCode2="Please enter a 6 digit postal code!";
	this.vcPostCode3="Please enter the correct postal code!";
	this.vcAddress="Please enter the correct and valid mailing address!";
	this.vcOtherLink="Please enter the correct and vaid alternative contact information!";
	this.confirmdel="Are you sure you want to delete this?";
	this.confirmedit="Are you sure you want to edit this?";
	this.vcPassWord="Please enter your password.";
	this.newEmail="Please enter your new email address.";
	this.newEmail2="Invalid email format!";
	this.vcPwdAnswer="please enter your Q&A!";
	this.newPass="Please enter your new password!";
	this.newPass2="New password must be a minimumof 6 characters.";
	this.rePassWord="Please enter the correct password!";
	this.vcGameCharID="Please enter your in-game character name.";
	this.confirmcancel="Are you sure you want to cancel this?";
	this.confirmnocancel="Do you accept the cancellation of this order?";
	this.confirmTrade="Do you confirm this transaction?";
	this.confirmCancelTrade="Are you sure you want to cancel this transaction?";
	this.vcPwdAnswerName="Please select a security question!";
	this.vcPwdAnswer2="Please enter the security answer!";
	this.vcSecurityEmail="Please enter the security e-mail adress!";
	this.vcSecurityEmail2="Please enter the security e-mail adress!";
	this.vcNewPwdAnswerName="Please enter your new security answer.";
	this.vcNewSecurityEmail="Please enter your new security email address!";
	this.vcNewSecurityEmail2="Invalid new security email format!";
	this.vcNewSecurityEmail3="Use registered email as safety email?";
	this.confirmGoDown="Are you sure you want to un-list this listing?";
	
	this.numUserAmount="Please enter withdrawal amount!";
	this.numUserAmount2="Enter the correct withdrawal amount, i.e. 100.00";
	this.numUserAmount3="Withdrawal amount must be more than $1.00!";
	this.numUserAmount4="Withdrawal amount cannot exceed your available credit amount!";
	this.numUserAmount5="Withdrawal amount must be a value higher than '1', maximum 2 decimals.";
	
	this.payAry="Please select a payment method!";
	this.vcBindBankEmail1="Please enter your bank email!";
	this.vcBindBankEmail2="Please enter the account holder's name!";
	this.vcBindBankAccount2="Please enter your payment account!";
	this.vcBankCity="Please enter your the city where your bank is located!";
	this.vcBindBankEmail3="Please enter the name of the bank!";
	this.vcBindBankAccount3="Please enter your bank account number!";
	
	this.trdPwdAnswer1="Please enter your current security answer, minimum of 4 characters.";
	this.vcPwdQuestionCode="Please select a new security question!";
	this.vcPwdAnswer1="Please enter your new security answer, minimum of 4 characters.";
	this.newMobile="Please enter your new mobile phone number!";
	this.newMobile2="Mobile phone number must be 11 digits!";
	this.newMobile3="Please enter the correct mobile phone number!";
	
	this.sc_numMiniTradeCnt="We're sorry, purchased amount must be more than the minimum quantity set by the seller!";
	this.sc_numTotal="We're sorry, purchased amount must not exceed the available quantity!";
	this.curTotal="Please enter the correct amount!";
	this.alertDialog="The connection to Item4u Item Trade Station was lost! Please try again later...";
	
	//js
	this.bidQty="Please purchase at least 1 item!";
	this.maxQty="We're sorry, purchase amount must not exceed the issued amount!(";
	this.bidPrice="Please enter the correct amount!";				
	this.curPrice="We're sorry, your offered price must not be lesser than the current price!(";	
	this.js_select = "Please select..";	
	this.selectServer = "Please select a server.";	
	this.selectRegion = "Please select a region.";	
	this.selectGame = "Please select a game.";	
	this.selectUnits = "Please select a unit.";	

	this.selectType = "Please select a type.";	
	this.selectProduct = "Please select a product.";	

	this.allServer = "All Servers";
	this.js_server = "server";
	this.js_game = "Game";
	this.noServer = "No servers avalable";
	this.noGame = "No games available";
	this.sellItem = "Sell";
	this.js_region = "Region";
	this.js_item = "Item";
	this.js_addServer1 = "Server list is full";
	this.js_addServer2 = "";
	this.js_addServer3 = "The server has been saved before!";

	//搜索控件
	this.js_gameNav_sell = "Sell";
	this.js_gameNav_buy = "Buy";
	this.js_gameNav_noGame = "No game found";
	this.js_gameNav_noServer = "No server found";
	this.js_gameNav_a_selectArea = "Please select one country at least.";
	this.js_gameNav_l_cus_area = "Config your selection";
	
	//ajax loading
	this.js_ajax_loading = "loading"
	
	//按钮
	this.js_gameNav_b_cancel = "Cancel";
	this.js_gameNav_b_ok = "Submit";
	
	//国家名称
	this.js_cn = "China";
	this.js_us = "USA";
	this.js_jp = "Japen";
	this.js_kr = "Korea";
	this.js_tw = "Taiwan";
	this.js_ur = "Europe";
	
	//游戏主页
	this.hide_servers = "Hide Servers";
	this.view_servers = "View All Servers";
	
	//评论
	this.review_message = "Review cannot be empty.";
	
	//购物车&订单
	this.js_no_item = "No Item";
	this.js_view_cart = "View Cart";
	this.js_items = "Items:";
	this.js_sign = "Sign in now";
	this.js_topics = "Help topics";
	this.js_seller = "Sellers";
	this.js_awaiting = "Awaiting Payment:";
	this.js_delivery = "Needing Delivery:";
	this.js_buyer = "Buyers";
	this.js_payment = "Needing Payment:";
	this.js_acknowledgement = "Needing Acknowledgement:";
	this.js_checkOut = "CheckOut";
	this.js_withdrawal = "Reloading and Withdrawal";
	this.js_totalAmount = "Total Amount:";
	
	//社区
	this.js_sticky = "Sticky";
	this.js_Nosticky = "Cancel Sticky";
	
	//可交易时间
	this.js_right_time = "Invalid time period, try again.";
	this.js_choose_oneDay = "Please select a time period that is within the day.";
	
	//代练
	this.tradeErr = "Trading password is error!";
	this.chooseClass = "Choose at least one profession";
	this.inpPrice = "Please enter the price";
	this.pricePlus = "Price should be a positive number(>1)";
	this.hundredth = "Round to the nearest hundredth";
	this.inpTime = "Please fill in the time";
	this.dayPlue = "The number of days should be integral number (≥0)";
	this.hourPlue = "The number of hours should be a positive whole number";
	this.hourLimit = "The number of hours should be a positive whole number (<24)";
	this.dayAndhour = "The numbers of days and hours can't equal to 0 at the same time";
	this.inpNum = "Please enter a number";
	this.selectClass = "Please select class!";
	
	this.js_gameM = "Game:";
	
	this.js_itemStatus="Item Status:";
	this.js_time="Time";
	this.js_orderInformation="Order Information";
	this.js_product="Product:";
	this.js_classes="Class:";
	this.js_price="Price:";
	this.js_times="Time:";
	this.js_specifications="Product Specifications:";
	this.js_username="Account Username:";
	this.js_userPass="Account Password:";
	this.js_servers="Server:";
	this.js_charName="Character Name:";
	this.js_comments="Additional Comments or Character Info:";
	this.js_start="  Start  ";
	this.js_buyerM="Buyer:";
	this.js_tradePass="Trading password:";
	this.js_viewCharInfo="Please enter the Trading password to view character information.";
	this.js_sellerM="Seller:";
	this.js_report="Report:";
	this.js_viewReport="View Power Leveling Report";
	this.js_enterPass="Please enter the Trading password to Acknowledge Done.";
	this.js_confirmDone="Confirm Done";
	this.js_proccessing="Processing";
	this.js_done="Done";
	this.js_include="Include";
	this.js_basePrice="Please enter base price!";
	this.js_baseTime="Please enter base time!";
	this.js_perPrice="Please enter per level price!";
	this.js_perTime="Please enter per level time!";
	this.js_allLevels="Please enter information about all levels!";
	this.js_rightPrice="Please enter the right price!";
	this.js_rightTime="Please enter the right time!";
	this.js_inputNull="The input frame can't be blank!";
	this.js_MaxLevel="The highest level, can't add any more!";
	this.js_startLv="Starting Level:";
	this.js_limitLv="Limit Desired Level:";
	this.js_bsPrice="Base Price:";
	this.js_bsTime="Base Time:";
	this.js_lv="Level";
	this.js_preLvPrice="Price /Per  level";
	this.js_preLvTime="Time /Per level";
	this.js_add="Add";
	this.js_endLv="End Level:";
	this.js_addClass="Add Class";
	this.js_remove="Remove";
	this.js_ySelection="Your Selection";
	
	this.js_selectSta="Please choose the current level!";
	this.js_selectEnd="Please choose the desired level!";

	//发布代练
	this.js_selectClass="Select Class(es)"
	this.js_allClass="All Classes";

	this.js_imgLimit="The attachment should be 2M maximum!";
	this.js_reportCont="Please enter power leveling report!";
	
	//任务
	this.js_selectTask = "please choose a task";
	this.js_TaskMenu = "Task Menu:";
	this.js_TaskNumber="Number";
	this.js_TaskTitle="Title";


	this.initialize = function(lang, name) {
        _name = name;
		_lang = lang;
    };
    this.returnName = function() {
        return _name;
    };
	this.returnLang = function() {
        return _lang;
    };
    this.toStringCustom = function() {
        return this.returnName()+"-"+this.returnLang();
    };
    this.speak = function(){
		alert(this.toStringCustom());
	
	};
}


//
if (navigator.appName == 'Netscape') 
	var language = navigator.language; 
else 
	var language = navigator.browserLanguage; 

if (language.indexOf('en') > -1) browserLang="en_US";
else if (language.indexOf('zh') > -1) browserLang="zh_CN";
else { browserLang="en_US";}


