var rcd = String.fromCharCode(2);
var fld = String.fromCharCode(1);
var DESIGN_MODE = false;
function OpenCentredWindow(m_URL,m_ID,ow_WIDTH,ow_HEIGHT,ow_FEATURES){
var strFeatures = "dependent=yes,status=no,titlebar=no,width=" + ow_WIDTH + ",height=" + ow_HEIGHT + ",left=" + GetLeft(ow_WIDTH) + ",top=" + GetTop(ow_HEIGHT);
if(ow_FEATURES != ""){
strFeatures += "," + ow_FEATURES;
}
var ow_Window = window.open(m_URL,m_ID,strFeatures);
return ow_Window;
}
function GetLeft(WIN_WIDTH){
var m_LEFT = ((screen.width - WIN_WIDTH) / 2);
m_LEFT = parseInt(m_LEFT);
return m_LEFT
}
function GetTop(WIN_HEIGHT){
var m_TOP = ((screen.height - WIN_HEIGHT) / 2);
m_TOP = parseInt(m_TOP);
return m_TOP;
}
function GetLocation(){
var mLocation = window.location;
mLocation = mLocation.toString();
mLocation = unescape(mLocation);
mLocation = mLocation.toLowerCase();
var arrLocation;
arrLocation = mLocation.split("/admin/");
return arrLocation[0];
}
function ESCAPE(STR_VALUE){
while(STR_VALUE.indexOf(" ") > -1){
STR_VALUE = STR_VALUE.replace(" ","_");
}
STR_VALUE = STR_VALUE.toLowerCase();
while(STR_VALUE.indexOf("/") > -1){
STR_VALUE = STR_VALUE.replace("/","");
}
while(STR_VALUE.indexOf(".") > -1){
STR_VALUE = STR_VALUE.replace(".","");
}
while(STR_VALUE.indexOf(" ") > -1){
STR_VALUE = STR_VALUE.replace(" ","_");
}
while(STR_VALUE.indexOf("&") > -1){
STR_VALUE = STR_VALUE.replace("&","and");
}
while(STR_VALUE.indexOf("£") > -1){
STR_VALUE = STR_VALUE.replace("£","");
}
while(STR_VALUE.indexOf("$") > -1){
STR_VALUE = STR_VALUE.replace("$","");
}
return STR_VALUE;
}
function ReturnChars(VALUE){
var SQUOTE = String.fromCharCode(39);
var QUOTE = """;
VALUE = Trim(VALUE);
while(VALUE.indexOf(String.fromCharCode(15)) > -1){
VALUE = VALUE.replace(String.fromCharCode(15),SQUOTE);
}
while(VALUE.indexOf(String.fromCharCode(16)) > -1){
VALUE = VALUE.replace(String.fromCharCode(16),"'");
}
while(VALUE.indexOf(String.fromCharCode(17)) > -1){
VALUE = VALUE.replace(String.fromCharCode(17),String.fromCharCode(13));
}
while(VALUE.indexOf(String.fromCharCode(4)) > -1){
VALUE = VALUE.replace(String.fromCharCode(4),SQUOTE);
}
while(VALUE.indexOf(String.fromCharCode(5)) > -1){
VALUE = VALUE.replace(String.fromCharCode(5),QUOTE);
}
while(VALUE.indexOf(String.fromCharCode(6)) > -1){
VALUE = VALUE.replace(String.fromCharCode(6), "
");
}
return VALUE;
}
function ValEmail(eVALUE) {
var ErrMessage = "Please enter a valid email address for ";
var ValidEmail = new
RegExp("^(([a-z_0-9-']+)|([a-z_0-9-']+[\.]([a-z_0-9-']+[\.]){0,}[a-z_0-9-']{1,}))[@]((([a-z_0-9-']+)[\.]){1,})(([a-z_0-9-']+))$","ig");
return ValidEmail.test(eVALUE);
}
function Trim(TRIM_VALUE){
TRIM_VALUE = String(TRIM_VALUE);
if(TRIM_VALUE.length < 1){
return"";
}
TRIM_VALUE = RTrim(TRIM_VALUE);
TRIM_VALUE = LTrim(TRIM_VALUE);
if(TRIM_VALUE==""){
return "";
}
else{
return TRIM_VALUE;
}
}
function RTrim(VALUE){
var w_space = String.fromCharCode(32);
var v_length = VALUE.length;
var strTemp = "";
if(v_length < 0){
return"";
}
var iTemp = v_length -1;
while(iTemp > -1){
if(VALUE.charAt(iTemp) == w_space){
}
else{
strTemp = VALUE.substring(0,iTemp +1);
break;
}
iTemp = iTemp-1;
} //End While
return strTemp;
} //End Function
function LTrim(VALUE){
var w_space = String.fromCharCode(32);
if(v_length < 1){
return"";
}
var v_length = VALUE.length;
var strTemp = "";
var iTemp = 0;
while(iTemp < v_length){
if(VALUE.charAt(iTemp) == w_space){
}
else{
strTemp = VALUE.substring(iTemp,v_length);
break;
}
iTemp = iTemp + 1;
} //End While
return strTemp;
} //End Function
function WriteInnerHTML(TARGET,CONTENT){
TARGET.open();
TARGET.write(CONTENT);
TARGET.close();
}
function StripWhite(VALUE){
while(VALUE.indexOf(" ")>-1){
VALUE = VALUE.replace(" ","");
}
return VALUE;
}
function valNumeric(VALUE){
for(var ivA = 0; ivA < VALUE.length;ivA ++){
if(VALUE.charCodeAt(ivA) < 48 || VALUE.charCodeAt(ivA) > 57){
if(VALUE.charCodeAt(ivA) != 46 && VALUE.charCodeAt(ivA) != 32 && VALUE.charCodeAt(ivA) != 44){
return false;
}
}
}
return true;
}
function valAlpha(VALUE){
var ErrMessage = "Only alphabet characters allowed for "
for(var ivA = 0; ivA < VALUE.length;ivA ++){
if((VALUE.charCodeAt(ivA) < 65 || VALUE.charCodeAt(ivA) > 122) && VALUE.charCodeAt(ivA) != 32){
return false;
}
if(VALUE.charCodeAt(ivA) > 90 && VALUE.charCodeAt(ivA) < 97){
return false;
}
}
return true;
}
function Round(Number){
if(!valNumeric(Number)){
return "0";
}
Number = Math.round(Number*Math.pow(10,2))/Math.pow(10,2);
return Number;
} // End Function
function FormatCurrency(Figure){
var strTemp = Figure.toString();
while(strTemp.indexOf(",") > -1){
strTemp = strTemp.replace(",","");
}
strTemp = parseFloat(strTemp);
Figure = Round(Figure);
Figure = Figure.toString();
var Place = Figure.indexOf(".");
if(Place >-1){
if((Figure.length - Place) == 2){
Figure += "0";
}
}
else{
Figure += ".00";
}
if(Figure=="0.00"){
return"";
}
return Figure;
} //End Function
var strNumbers = "4,2,1,3,4,1,4,1,2,1,3,2,1,3";
function CleanNumericInput(m_VALUE){
var m_Whitey = String.fromCharCode(32);
var m_Comma = String.fromCharCode(44);
while(m_VALUE.indexOf(m_Whitey) > -1){
m_VALUE = m_VALUE.replace(m_Whitey,"");
}
while(m_VALUE.indexOf(m_Comma) > -1){
m_VALUE = m_VALUE.replace(m_Comma,"");
}
return m_VALUE;
}
function EmptySelect(Control){
for(var i=0;i < Control.options.length;){
Control.options[i] = null;
}
}
function FillSelect(Control, DATA){
var arrRecords = DATA.split(rcd);
var arrFields;
for(var i=0;i-1){
arrFields[1] = arrFields[1].replace("_"," ");
}
Control.options[i] = new Option(arrFields[1],arrFields[0]);
}
Control.selectedIndex=0;
}
function KillFrame(){parent.rdo.src = "";}
function ValWPID(){
var strTemp = btrim(WPID);
strTemp = strTemp.toLowerCase();
WPId = WPId.toLowerCase();
if(WPId != strTemp){
alert(strError);
return false;
}
else{
return true;
}
}
function MakeRequest(strUrl,ASP){
if(ASP){
strUrl += "&RequestID=" + GetRequestID();
}
parent.frames["rdo"].location.href = strUrl;
}
function GetRequestID(){var NewTime = new Date();NewTime = NewTime.getTime();return NewTime;}
var CrLf = String.fromCharCode(13);
function StripNonLegalCharacters(TEXTVALUE) {
TEXTVALUE = Trim(TEXTVALUE);
TEXTVALUE = TEXTVALUE.replace(/"/g, '');
TEXTVALUE = TEXTVALUE.replace(/'/g, ''');
TEXTVALUE = TEXTVALUE.replace(//g, '>');
return TEXTVALUE;
} //End Function
var strA = UserEmail;
var strB = strACode;
if(strA==""){
strA = "Unknown";
}
function btrim(STRING){
}