var locString = location.toString();
if (locString.indexOf(".local") > -1) {
	//JDAY InvalidPop Include
	document.write("<script language='javascript' src='http://dev.informationrequest.local/js/invalidpop/invalidpop.js'></script>");
	//JDAY AreaPrefix Ajax Checker Include
	document.write("<script language='javascript' src='http://dev.informationrequest.local/js/yahoo/yahoo/yahoo-min.js'></script>");
	document.write("<script language='javascript' src='http://dev.informationrequest.local/js/yahoo/connection/connection-min.js'></script>");
	//Lawrence Browser Detection Include
	document.write("<script language='javascript' src='http://dev.informationrequest.local/emd_includes/browser_detect.js'></script>");
}else{
	//JDAY InvalidPop Include
	document.write("<script language='javascript' src='http://www.informationrequest.info/js/invalidpop/invalidpop.js'></script>");
	//JDAY AreaPrefix Ajax Checker Include
	document.write("<script language='javascript' src='http://www.informationrequest.info/js/yahoo/yahoo/yahoo-min.js'></script>");
	document.write("<script language='javascript' src='http://www.informationrequest.info/js/yahoo/connection/connection-min.js'></script>");
	//Lawrence Browser Detection Include
	document.write("<script language='javascript' src='http://www.informationrequest.info/emd_includes/browser_detect.js'></script>");
}



/****************/
/* DATE CHECKER */
/****************/

function makeArray(n) {
   for (var i = 1; i <= n; i++) {
      this[i] = 0
   } 
   return this
}

var daysInMonth = makeArray(12);
daysInMonth[1] = 31;
daysInMonth[2] = 29;   // must programmatically check this
daysInMonth[3] = 31;
daysInMonth[4] = 30;
daysInMonth[5] = 31;
daysInMonth[6] = 30;
daysInMonth[7] = 31;
daysInMonth[8] = 31;
daysInMonth[9] = 30;
daysInMonth[10] = 31;
daysInMonth[11] = 30;
daysInMonth[12] = 31;

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 );
}

function isMonth (s) {   
	if (s > 0 && s < 13) return true;
	return false; 
}

function isDay (s) {   
	if (s > 0 && s < 32) return true;
	return false; 
}

function isDate (year, month, day) {   
	// get rid of '0' in the month if there is one
	if (month.substring(0, 1) == "0")
		month = month.substring(1, 2);

	// catch invalid months and days.
    if (! isMonth(month)) return false;
	if (! isDay(day)) return false;

    // catch invalid days, except for February
    if (day > daysInMonth[month]) return false; 

    if ((month == 2) && (day > daysInFebruary(year))) return false;

    return true;
}

// Returns true if character c is a digit 
// (0 .. 9).
function isDigit (c) {   
	return ((c >= "0") && (c <= "9"))
}

function isNumber(s) {   
    // 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 (var 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;
}

function validateDate(date) {

	var testMonth = date.value.substring(0, date.value.indexOf("/"));
	var testDay = date.value.substring(date.value.indexOf("/")+1, date.value.lastIndexOf("/"));
	var testYear = date.value.substring(date.value.length - 4,date.value.length);
	if (!isNumber(testMonth)) {
		return false;
		}	
	if (!isNumber(testDay)) {
		return false;
		}	
	if (!isNumber(testYear) || (testYear.length < 4)) {
		return false;
		}
		
	// validate the date
	if (!isDate(testYear, testMonth, testDay)) {
		return false;
		}
		
	return true;

}
/******************/
/*END DATE CHECKER*/
/******************/

//Area code checker
function  AreaCheck(area){
 PhoneArea = new Array('000','111','123','222','333','444','555','666','777','999','911');
		for (var i=0; i<this.PhoneArea.length; i++)
		{
			if (area == this.PhoneArea[i]) return true;
		}
}

//Prefix Checker
function  PrefixCheck(prefix){
 PhonePrefix = new Array('000','911','555');
		for (var i=0; i<this.PhonePrefix.length; i++)
		{
			if (prefix == this.PhonePrefix[i]) return true;
		}
}

//Phone7 Checker
function  Phone7(phone){
 PhoneInvalid = new Array('1111111','2222222','3333333','4444444','5555555','6666666','7777777','8888888','9999999','0000000');
		for (var i=0; i<this.PhoneInvalid.length; i++)
		{
			if (phone == this.PhoneInvalid[i]) return true;
		}
}

//Phone10 Checker
function  Phone10(phone){
 PhoneInvalid = new Array('1111111111','2222222222','3333333333','4444444444','5555555555','6666666666','7777777777','8888888888','9999999999','0000000000','1234567890');
		for (var i=0; i<this.PhoneInvalid.length; i++)
		{
			if (phone == this.PhoneInvalid[i]) return true;
		}
}



function checknum(numfieldArray,numfieldDisplayArray,form){
	var i = 0; 
	var strValidChars = "0123456789";
	var strChar;
	var blnResult = true;

for(i=0; i<numfieldArray.length; i++){
strString = eval("form." + numfieldArray[i] + ".value")

//  test strString consists of valid characters listed above
   for (a = 0; a < strString.length  && blnResult == true; a++)
      {
      strChar = strString.charAt(a);
      if (strValidChars.indexOf(strChar) == -1)
         {
		 document.getElementById('basic_info').style.display = 'block';
		 alert("The field " + numfieldDisplayArray[i] + " must be a numeric.");
         blnResult = false;
         }
      }
   return blnResult;
   }

}

function intl_num_check(s){
	//LOOK FOR BAD CHARACTERS
	var regex = new RegExp("[^0123456789.+ \(\)]");
	if (regex.test(s))
	{
		//found invalid characters
		return false;
	}
	//LOOK FOR AT LEAST 3 NUMERICAL DIGITS
	var regex = /\d/g;
	if (s.match(regex) == null || s.match(regex).length < 3)
	{
		//found invalid characters
		return false;
	}
}



/////////////////////////////////////////////////////////////////////////////////////////////////////////////





function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable';
	win = window.open(mypage, myname, winprops);
	if (parseInt(navigator.appVersion) >=4 && win != null) { win.window.focus(); }
}

function NewJDAYWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var pathis = location.pathname;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable';
	win = window.open(mypage, myname, winprops);
	//NEW POPUP METHOD
	if (win == null) {
		var replaceArray = new Array("index.cfm","index2.cfm","index3.cfm","index4.cfm","index5.cfm","index.html","index.htm","index_online.cfm");
		for(i=0;i<replaceArray.length;i++) {
			//If path is /whatever/index*, trim it - just use /whatever/
			if (pathis.indexOf(replaceArray[i]) > -1) {
				that = replaceArray[i];
				pathis = pathis.replace(that, "");
			}	
		}	
		hideShowWindow(false,pathis+mypage);
	//OLD POPUP METHOD
	}else{
		if (parseInt(navigator.appVersion) >=4 && win != null) { win.window.focus(); }
	}
}

function invalidOLDPop(error) {
	var df_fname=document.Entry.first_name.value;
	var df_lname=document.Entry.last_name.value;
	var df_email=document.Entry.email.value;
	var df_address=document.Entry.address.value;
	var df_city=document.Entry.city.value;
	var df_state=document.Entry.state.options[document.Entry.state.selectedIndex].value;
	var df_country=document.Entry.country.options[document.Entry.country.selectedIndex].value;
	var df_zip=document.Entry.zip.value;
	var df_day_phone_area=document.Entry.day_phone_area.value;
	var df_day_phone_prefix=document.Entry.day_phone_prefix.value;
	var df_day_phone_suffix=document.Entry.day_phone_suffix.value;
	var df_night_phone_area=document.Entry.night_phone_area.value;
	var df_night_phone_prefix=document.Entry.night_phone_prefix.value;
	var df_night_phone_suffix=document.Entry.night_phone_suffix.value;
	var df_fid=document.Entry.fid.value;
	var df_sid=document.Entry.sid.value;
	var pathis=location.pathname;	
	var url='dsp_pop_invalid.cfm?error='+escape(error)+'&df_fname='+escape(df_fname)+'&df_lname='+escape(df_lname)+'&df_address='+escape(df_address)+'&df_city='+escape(df_city)+'&df_state='+escape(df_state)+'&df_country='+escape(df_country)+'&df_zip='+escape(df_zip)+'&df_city='+escape(df_city)+'&df_day_phone_area='+escape(df_day_phone_area)+'&df_day_phone_prefix='+escape(df_day_phone_prefix)+'&df_day_phone_suffix='+escape(df_day_phone_suffix)+'&df_work_phone_area='+escape(df_night_phone_area)+'&df_work_phone_prefix='+escape(df_night_phone_prefix)+'&df_work_phone_suffix='+escape(df_night_phone_suffix)+'&df_email='+escape(df_email)+'&fid='+escape(df_fid)+'&sid='+escape(df_sid);
	
	//NewWindow(url,'name','600','500','yes');
	NewJDAYWindow(url,'name','600','500','yes');
}

function invalidPop(error) {
	var df_fname=document.Entry.first_name.value;
	var df_lname=document.Entry.last_name.value;
	var df_email=document.Entry.email.value;
	if (typeof document.Entry.address != "undefined") {var df_address=document.Entry.address.value;}else{df_address="";}
	var df_city=document.Entry.city.value;
	if (typeof document.Entry.state != "undefined") {if (typeof document.Entry.state.options != "undefined") {var df_state=document.Entry.state.options[document.Entry.state.selectedIndex].value;}else{var df_state=document.Entry.state;}}else{var df_state="";}
	var df_country=document.Entry.country.options[document.Entry.country.selectedIndex].value;
	if (typeof document.Entry.zip != "undefined"){var df_zip=document.Entry.zip.value;}else{var df_zip="";}
	if (selectedCountry() == "other" && typeof document.Entry.day_phone_intl != "undefined"){
		var df_day_phone_ccode=document.Entry.day_phone_ccode.value;
		var df_day_phone_area_intl=document.Entry.day_phone_area_intl.value;
		var df_day_phone_intl=document.Entry.day_phone_intl.value;
		var df_night_phone_ccode=document.Entry.night_phone_ccode.value;
		var df_night_phone_area_intl=document.Entry.night_phone_area_intl.value;
		var df_night_phone_intl=document.Entry.night_phone_intl.value;
		var df_day_phone_area="";
		var df_day_phone_prefix="";
		var df_day_phone_suffix="";
		var df_night_phone_area="";
		var df_night_phone_prefix="";
		var df_night_phone_suffix="";
	}else{
		var df_day_phone_area=document.Entry.day_phone_area.value;
		var df_day_phone_prefix=document.Entry.day_phone_prefix.value;
		var df_day_phone_suffix=document.Entry.day_phone_suffix.value;
		var df_night_phone_area=document.Entry.night_phone_area.value;
		var df_night_phone_prefix=document.Entry.night_phone_prefix.value;
		var df_night_phone_suffix=document.Entry.night_phone_suffix.value;
		var df_day_phone_ccode="";
		var df_day_phone_area_intl="";
		var df_day_phone_intl="";
		var df_night_phone_ccode="";
		var df_night_phone_area_intl="";
		var df_night_phone_intl="";
	}
	var df_fid=document.Entry.fid.value;
	var df_sid=document.Entry.sid.value;
	var pathis=location.pathname;	
	var url='dsp_pop_invalid.cfm?error='+escape(error)+'&df_fname='+escape(df_fname)+'&df_lname='+escape(df_lname)+'&df_address='+escape(df_address)+'&df_city='+escape(df_city)+'&df_state='+escape(df_state)+'&df_country='+escape(df_country)+'&df_zip='+escape(df_zip)+'&df_city='+escape(df_city)+'&df_day_phone_area='+escape(df_day_phone_area)+'&df_day_phone_prefix='+escape(df_day_phone_prefix)+'&df_day_phone_suffix='+escape(df_day_phone_suffix)+'&df_day_phone_ccode='+escape(df_day_phone_ccode)+'&df_day_phone_area_intl='+escape(df_day_phone_area_intl)+'&df_day_phone_intl='+escape(df_day_phone_intl)+'&df_work_phone_area='+escape(df_night_phone_area)+'&df_work_phone_prefix='+escape(df_night_phone_prefix)+'&df_work_phone_suffix='+escape(df_night_phone_suffix)+'&df_work_phone_ccode='+escape(df_night_phone_ccode)+'&df_work_phone_area_intl='+escape(df_night_phone_area_intl)+'&df_work_phone_intl='+escape(df_night_phone_intl)+'&df_email='+escape(df_email)+'&fid='+escape(df_fid)+'&sid='+escape(df_sid);
	
	//NewWindow(url,'name','600','500','yes');
	NewJDAYWindow(url,'name','600','500','yes');
}

//Controls tabbing for phone fields etc.
function TabOut(field,tabtofield,maxlength)
{
	if(field.value.length==maxlength){
		tabtofield.focus();
		tabtofield.select();
	}
}

function email_check(s) {	
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	if (filter.test(s))
	{
		//alert('email check true');
		return true;
	}
	else
	{
		//alert('email check false');
		return false;
	}
}

function trim(str)
{
	var newstr;
	newstr = str.replace(/^\s*/, "").replace(/\s*$/, ""); 
	newstr = newstr.replace(/\s{2,}/, " "); 
	return newstr;
}




/*     INTERNATIONAL CODE      */

function selectedCountry() {
	//Returns US, CAN, or other depending on what country is selected
	var mycountry = trim(document.Entry.country.options[document.Entry.country.selectedIndex].text);
	var sel_country = 'US';
	switch (mycountry.toUpperCase())
	{
		case 'UNITED STATES':
		case 'U.S.A.':
		case 'USA':
		case 'U.S.':
		case 'US':
		case 'UNITED STATES OF AMERICA':
			sel_country = 'US';
			break;
		case 'CANADA':
		case 'CAN':
		case 'CA':
			sel_country = 'CAN';
			break;
		default:
			sel_country = 'other';
			break;
	}
	return sel_country;
}



//swap phone div's to INTL
function gointl()
{
	//US & Canada
	if (selectedCountry() != "other")
	{
		document.getElementById("div_day_phone_intl").style.display = "none";
		document.getElementById("div_work_phone_intl").style.display = "none";
		document.getElementById("div_day_phone_uscanada").style.display = "block";
		document.getElementById("div_work_phone_uscanada").style.display = "block";
	//INTL
	}else{
		document.getElementById("div_day_phone_uscanada").style.display = "none";
		document.getElementById("div_work_phone_uscanada").style.display = "none";
		document.getElementById("div_day_phone_intl").style.display = "block";
		document.getElementById("div_work_phone_intl").style.display = "block";
		document.Entry.day_phone_ccode.value = getCountryCode(document.Entry.country.options[document.Entry.country.selectedIndex].value);
		document.Entry.night_phone_ccode.value = getCountryCode(document.Entry.country.options[document.Entry.country.selectedIndex].value);
  	}
}


function clearUnusedCountryCodes() {
	//go thru phone number fields... if no *_phone_area_intl or *_phone_intl...then clear *_phone_ccode
	if (document.Entry.day_phone_ccode.value > "" && document.Entry.day_phone_area_intl.value == "" && document.Entry.day_phone_intl.value == "") {document.Entry.day_phone_ccode.value="";}
	if (document.Entry.night_phone_ccode.value > "" && document.Entry.night_phone_area_intl.value == "" && document.Entry.night_phone_intl.value == "") {document.Entry.night_phone_ccode.value="";}
}

function getCountryCode(country) {
	if (typeof PhoneFormatTable[country] != "undefined") {
		return PhoneFormatTable[country];
	}else{
		return "";
	}
}

var PhoneFormatTable = new Object();
PhoneFormatTable["AF"] = "93";
PhoneFormatTable["AL"] = "355";
PhoneFormatTable["DZ"] = "213";
PhoneFormatTable["AS"] = "684";
PhoneFormatTable["AD"] = "376";
PhoneFormatTable["AO"] = "244";
PhoneFormatTable["AI"] = "264";
PhoneFormatTable["AQ"] = "672";
PhoneFormatTable["AG"] = "268";
PhoneFormatTable["AR"] = "54";
PhoneFormatTable["AM"] = "374";
PhoneFormatTable["AW"] = "297";
PhoneFormatTable["AU"] = "61";
PhoneFormatTable["AT"] = "43";
PhoneFormatTable["AZ"] = "994";
PhoneFormatTable["BS"] = "242";
PhoneFormatTable["BH"] = "973";
PhoneFormatTable["BD"] = "880";
PhoneFormatTable["BB"] = "246";
PhoneFormatTable["BY"] = "375";
PhoneFormatTable["BE"] = "32";
PhoneFormatTable["BZ"] = "501";
PhoneFormatTable["BJ"] = "229";
PhoneFormatTable["BM"] = "441";
PhoneFormatTable["BT"] = "975";
PhoneFormatTable["BO"] = "591";
PhoneFormatTable["BA"] = "387";
PhoneFormatTable["BW"] = "267";
PhoneFormatTable["BV"] = "000";
PhoneFormatTable["BR"] = "55";
PhoneFormatTable["IO"] = "000";
PhoneFormatTable["BN"] = "673";
PhoneFormatTable["BG"] = "359";
PhoneFormatTable["BF"] = "226";
PhoneFormatTable["BI"] = "257";
PhoneFormatTable["KH"] = "855";
PhoneFormatTable["CM"] = "237";
PhoneFormatTable["CA"] = "";
PhoneFormatTable["CV"] = "238";
PhoneFormatTable["KY"] = "345";
PhoneFormatTable["CF"] = "236";
PhoneFormatTable["TD"] = "235";
PhoneFormatTable["CL"] = "56";
PhoneFormatTable["CN"] = "86";
PhoneFormatTable["CX"] = "672";
PhoneFormatTable["CC"] = "672";
PhoneFormatTable["CO"] = "57";
PhoneFormatTable["KM"] = "269";
PhoneFormatTable["CG"] = "242";
PhoneFormatTable["CD"] = "242";
PhoneFormatTable["CK"] = "682";
PhoneFormatTable["CR"] = "506";
PhoneFormatTable["CI"] = "225";
PhoneFormatTable["HR"] = "385";
PhoneFormatTable["CU"] = "53";
PhoneFormatTable["CY"] = "357";
PhoneFormatTable["CZ"] = "420";
PhoneFormatTable["DK"] = "45";
PhoneFormatTable["DJ"] = "253";
PhoneFormatTable["DM"] = "767";
PhoneFormatTable["DO"] = "809";
PhoneFormatTable["EC"] = "593";
PhoneFormatTable["EG"] = "20";
PhoneFormatTable["SV"] = "503";
PhoneFormatTable["GQ"] = "245";
PhoneFormatTable["ER"] = "291";
PhoneFormatTable["EE"] = "372";
PhoneFormatTable["ET"] = "251";
PhoneFormatTable["FK"] = "500";
PhoneFormatTable["FO"] = "298";
PhoneFormatTable["FM"] = "691";
PhoneFormatTable["FJ"] = "679";
PhoneFormatTable["FI"] = "358";
PhoneFormatTable["FR"] = "33";
PhoneFormatTable["GF"] = "594";
PhoneFormatTable["PF"] = "689";
PhoneFormatTable["TF"] = "596";
PhoneFormatTable["GA"] = "241";
PhoneFormatTable["GM"] = "220";
PhoneFormatTable["GE"] = "995";
PhoneFormatTable["DE"] = "49";
PhoneFormatTable["GH"] = "233";
PhoneFormatTable["GI"] = "350";
PhoneFormatTable["GR"] = "30";
PhoneFormatTable["GL"] = "299";
PhoneFormatTable["GD"] = "473";
PhoneFormatTable["GP"] = "590";
PhoneFormatTable["GU"] = "671";
PhoneFormatTable["GT"] = "502";
PhoneFormatTable["GN"] = "224";
PhoneFormatTable["GW"] = "245";
PhoneFormatTable["GY"] = "592";
PhoneFormatTable["HT"] = "509";
PhoneFormatTable["HM"] = "000";
PhoneFormatTable["VA"] = "39";
PhoneFormatTable["HN"] = "504";
PhoneFormatTable["HK"] = "852";
PhoneFormatTable["HU"] = "36";
PhoneFormatTable["IS"] = "354";
PhoneFormatTable["IN"] = "91";
PhoneFormatTable["ID"] = "62";
PhoneFormatTable["IR"] = "98";
PhoneFormatTable["IQ"] = "964";
PhoneFormatTable["IE"] = "353";
PhoneFormatTable["IL"] = "972";
PhoneFormatTable["IT"] = "39";
PhoneFormatTable["JM"] = "876";
PhoneFormatTable["JP"] = "81";
PhoneFormatTable["JO"] = "962";
PhoneFormatTable["KZ"] = "7";
PhoneFormatTable["KE"] = "254";
PhoneFormatTable["KI"] = "686";
PhoneFormatTable["KP"] = "82";
PhoneFormatTable["KR"] = "850";
PhoneFormatTable["KW"] = "965";
PhoneFormatTable["KG"] = "7";
PhoneFormatTable["LA"] = "856";
PhoneFormatTable["LV"] = "371";
PhoneFormatTable["LB"] = "961";
PhoneFormatTable["LS"] = "266";
PhoneFormatTable["LR"] = "231";
PhoneFormatTable["LY"] = "218";
PhoneFormatTable["LI"] = "423";
PhoneFormatTable["LT"] = "370";
PhoneFormatTable["LU"] = "352";
PhoneFormatTable["MO"] = "853";
PhoneFormatTable["MK"] = "389";
PhoneFormatTable["MG"] = "261";
PhoneFormatTable["MW"] = "265";
PhoneFormatTable["MY"] = "60";
PhoneFormatTable["MV"] = "90";
PhoneFormatTable["ML"] = "223";
PhoneFormatTable["MT"] = "356";
PhoneFormatTable["MH"] = "692";
PhoneFormatTable["MQ"] = "596";
PhoneFormatTable["MR"] = "222";
PhoneFormatTable["MU"] = "230";
PhoneFormatTable["YT"] = "269";
PhoneFormatTable["MX"] = "52";
PhoneFormatTable["MD"] = "373";
PhoneFormatTable["MC"] = "33";
PhoneFormatTable["MN"] = "976";
PhoneFormatTable["MS"] = "473";
PhoneFormatTable["MA"] = "212";
PhoneFormatTable["MZ"] = "258";
PhoneFormatTable["MM"] = "95";
PhoneFormatTable["NA"] = "264";
PhoneFormatTable["NR"] = "674";
PhoneFormatTable["NP"] = "977";
PhoneFormatTable["NL"] = "31";
PhoneFormatTable["AN"] = "599";
PhoneFormatTable["NC"] = "687";
PhoneFormatTable["NZ"] = "64";
PhoneFormatTable["NI"] = "505";
PhoneFormatTable["NE"] = "227";
PhoneFormatTable["NG"] = "234";
PhoneFormatTable["NU"] = "683";
PhoneFormatTable["NF"] = "672";
PhoneFormatTable["MP"] = "670";
PhoneFormatTable["NO"] = "47";
PhoneFormatTable["OM"] = "968";
PhoneFormatTable["PK"] = "92";
PhoneFormatTable["PW"] = "680";
PhoneFormatTable["PA"] = "507";
PhoneFormatTable["PG"] = "675";
PhoneFormatTable["PY"] = "595";
PhoneFormatTable["PE"] = "51";
PhoneFormatTable["PH"] = "63";
PhoneFormatTable["PN"] = "649";
PhoneFormatTable["PL"] = "48";
PhoneFormatTable["PT"] = "351";
PhoneFormatTable["PR"] = "787";
PhoneFormatTable["QA"] = "974";
PhoneFormatTable["RE"] = "262";
PhoneFormatTable["RO"] = "40";
PhoneFormatTable["RU"] = "7";
PhoneFormatTable["RW"] = "250";
PhoneFormatTable["GS"] = "500";
PhoneFormatTable["KN"] = "869";
PhoneFormatTable["LC"] = "758";
PhoneFormatTable["VC"] = "809";
PhoneFormatTable["SM"] = "378";
PhoneFormatTable["ST"] = "239";
PhoneFormatTable["SA"] = "966";
PhoneFormatTable["SN"] = "221";
PhoneFormatTable["SC"] = "248";
PhoneFormatTable["SL"] = "232";
PhoneFormatTable["SG"] = "65";
PhoneFormatTable["SK"] = "421";
PhoneFormatTable["SI"] = "386";
PhoneFormatTable["SB"] = "677";
PhoneFormatTable["SO"] = "252";
PhoneFormatTable["ZA"] = "27";
PhoneFormatTable["ES"] = "34";
PhoneFormatTable["LK"] = "94";
PhoneFormatTable["SH"] = "290";
PhoneFormatTable["PM"] = "508";
PhoneFormatTable["SD"] = "249";
PhoneFormatTable["SR"] = "597";
PhoneFormatTable["SJ"] = "79";
PhoneFormatTable["SZ"] = "268";
PhoneFormatTable["SE"] = "46";
PhoneFormatTable["CH"] = "41";
PhoneFormatTable["SY"] = "963";
PhoneFormatTable["TW"] = "886";
PhoneFormatTable["TJ"] = "992";
PhoneFormatTable["TZ"] = "255";
PhoneFormatTable["TH"] = "66";
PhoneFormatTable["TG"] = "228";
PhoneFormatTable["TK"] = "690";
PhoneFormatTable["TO"] = "676";
PhoneFormatTable["TT"] = "868";
PhoneFormatTable["TN"] = "216";
PhoneFormatTable["TR"] = "90";
PhoneFormatTable["TM"] = "993";
PhoneFormatTable["TC"] = "649";
PhoneFormatTable["TV"] = "688";
PhoneFormatTable["UG"] = "256";
PhoneFormatTable["UA"] = "380";
PhoneFormatTable["AE"] = "971";
PhoneFormatTable["GB"] = "44";
PhoneFormatTable["US"] = "";
PhoneFormatTable["UM"] = "808";
PhoneFormatTable["UY"] = "598";
PhoneFormatTable["UZ"] = "998";
PhoneFormatTable["VU"] = "678";
PhoneFormatTable["VE"] = "58";
PhoneFormatTable["VN"] = "84";
PhoneFormatTable["VG"] = "284";
PhoneFormatTable["VI"] = "340";
PhoneFormatTable["WF"] = "681";
PhoneFormatTable["EH"] = "212";
PhoneFormatTable["WS"] = "685";
PhoneFormatTable["YE"] = "967";
PhoneFormatTable["YU"] = "381";
PhoneFormatTable["ZM"] = "260";
PhoneFormatTable["ZW"] = "263";
PhoneFormatTable["Other"] = "0";